Created
July 13, 2012 17:02
-
-
Save supercleanse/3105996 to your computer and use it in GitHub Desktop.
Full page modification in WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('init', 'fpm_start_output'); | |
add_action('shutdown', 'fpm_end_output'); | |
function fpm_start_output() { | |
ob_start('fpm_mod_buffer'); | |
} | |
function fpm_mod_buffer($buffer) { | |
// Modification ... regexp, etc | |
return $buffer; | |
} | |
function fpm_end_output() { | |
ob_end_flush(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment