-
-
Save anonymous/cbc45dd4e7bf0a4e3c8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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