Quantcast
Channel: WordPress.org Forums » [Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Support
Viewing all articles
Browse latest Browse all 42467

Jayce53 on "[Plugin: WordPress SEO by Yoast] SEO plugin trashes other plugins' output buffering"

$
0
0

WordPress SEO uses ob_get_contents() followed by ob_end_clean() during its <title> rewrite.

This is fine - except that it will trash any other use of output buffering.

A better way for this plugin to do this would be to handle the title rewrite in a callback passed to ob_start()

It only requires a few minor changes to class-frontend.php (version 1.3.4.4) and it will be much better behaved:

comment out line 85: // add_action( 'wp_footer', array( $this, 'flush_cache' ) );
change line 1153 to: function flush_cache($content) {
comment out line 1159:  // $content = ob_get_contents();
comment out line 1180: // ob_end_clean();
change line 1184 to: return $content;
change line 1193 to:  ob_start(array($this,'flush_cache'));

These changes will allow other plugins/themes to do their own output buffer handling as well.


Viewing all articles
Browse latest Browse all 42467

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>