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

@@ -6,7 +6,6 @@ $theme_name = next(explode('/themes/', get_template_directory()));
include_once('inc/roots-activation.php'); // activation
include_once('inc/roots-admin.php'); // admin additions/mods
include_once('inc/roots-options.php'); // theme options menu
include_once('inc/roots-ob.php'); // output buffer
include_once('inc/roots-cleanup.php'); // code cleanup/removal
include_once('inc/roots-htaccess.php'); // h5bp htaccess
include_once('inc/roots-hooks.php'); // hooks

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');
?>