removing output buffer include

This commit is contained in:
Ben Word
2011-05-26 22:29:02 -06:00
parent 3c5298ee58
commit 0f3ea1bf0a
2 changed files with 0 additions and 26 deletions

View File

@@ -1,25 +0,0 @@
<?php
// http://www.dagondesign.com/articles/wordpress-hook-for-entire-page-using-output-buffering/
function roots_callback($buffer) {
if (class_exists('All_in_One_SEO_Pack')) {
$temp = preg_replace('/<!-- All in One[^>]+?>\s+/', '', $buffer);
return preg_replace('/<!-- \/all in one seo pack -->\n/', '', $temp);
} else {
return $buffer;
}
}
function roots_buffer_start() {
ob_start('roots_callback');
}
function roots_buffer_end() {
ob_end_flush();
}
add_action('wp_head', 'roots_buffer_start', -999);
add_action('wp_footer', 'roots_buffer_end');
?>