'; $id = ( ! empty( $content ) ) ? $content : $atts[0]; // Parse a URL if ( ! is_numeric( $id ) ) $id = preg_replace( '#https?://gist.github.com/([a-zA-Z0-9]+)#', '$1', $id ); if ( ! $id ) return ''; $embed_url = "https://gist.github.com/{$id}.js"; if ( ! empty( $atts['file'] ) ) $embed_url = add_query_arg( 'file', urlencode( $atts['file'] ), $embed_url ); // inline style to prevent the bottom margin to the embed that themes like TwentyTen, et al., add to tables return '' . ''; }