Support » Plugin: Yoast SEO » SEO plugin trashes other plugins' output buffering

  • 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 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.

  • The topic ‘SEO plugin trashes other plugins' output buffering’ is closed to new replies.