Created
May 17, 2018 16:21
-
-
Save nextend/fce67d264b3f7f6d2a76dcc52168eb71 to your computer and use it in GitHub Desktop.
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 | |
//Original | |
function zeo_final_title(){ | |
// Use object to avoid namespace collisions | |
$zeo_rewrite_title = new zeo_rewrite_title(); | |
// We want to act when the page is 99% complete | |
add_action('wp_footer', array(&$zeo_rewrite_title, 'wpzeo_footer')); | |
// There is no action hook for "start of processing", | |
// so we use this implicitly. | |
$zeo_rewrite_title->starting(); | |
} | |
// This is the good | |
function zeo_final_title(){ | |
$priority = 10; | |
add_action('template_redirect', array($zeo_rewrite_title, 'starting'), $priority); | |
add_action('shutdown', array(&$zeo_rewrite_title, 'wpzeo_footer'), -1 * $priority); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment