removing output buffer include
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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');
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user