-
-
Save justinrains/b00ca879f83c741d0dc139a25ec642c6 to your computer and use it in GitHub Desktop.
Remove Yoast HTML Comments “This site is optimized with the Yoast WordPress SEO plugin”
This file contains hidden or 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
// https://gist.github.com/justinrains/b00ca879f83c741d0dc139a25ec642c6 | |
// Remove All Yoast HTML Comments | |
add_filter( 'wpseo_debug_markers', '__return_false' ); | |
add_action('wp_head',function() { ob_start(function($o) { | |
return preg_replace('/\n?<.*?yoast seo plugin.*?>/mi','',$o); | |
}); },~PHP_INT_MAX); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment