roots 3.0.0

This commit is contained in:
Ben Word
2011-03-27 13:46:21 -06:00
commit 8e177235ff
89 changed files with 7989 additions and 0 deletions

25
includes/roots-ob.php Normal file
View File

@@ -0,0 +1,25 @@
<?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');
?>