Skip to content

Instantly share code, notes, and snippets.

Created February 21, 2013 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/cbc45dd4e7bf0a4e3c8f to your computer and use it in GitHub Desktop.
Save anonymous/cbc45dd4e7bf0a4e3c8f to your computer and use it in GitHub Desktop.
Locate this code in wp-content/plugins/wordpress-seo/inc/class-sitemaps.php, around line 362:
$content = $p->post_content;
if ( function_exists( 'get_the_post_thumbnail' ) ) {
$content = '<p>' . get_the_post_thumbnail( $p->ID, 'full' ) . '</p>' . $content;
}
After that code snippet, insert this additional code:
// MODIFICATION: ENABLE EASYROTATOR IMAGE COMPATIBILITY
if (stripos($content, '[easyrotator') !== false)
{
$content = do_shortcode($content);
$content = preg_replace('|<img class="thumb" src=".*? />|i', '', $content);
}
// END MODIFICATION
Then save the file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment