WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
SEO plugin trashes other plugins' output buffering (1 post)

  1. Jayce53
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.