[wp-trac] [WordPress Trac] #20390: Add call of shutdown_action_hook() function at the end of 'template_loader.php' file
WordPress Trac
wp-trac at lists.automattic.com
Sat Apr 7 16:32:10 UTC 2012
#20390: Add call of shutdown_action_hook() function at the end of
'template_loader.php' file
-------------------------+-----------------------
Reporter: egorpromo | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: General | Version: 3.3.1
Severity: normal | Resolution:
Keywords: |
-------------------------+-----------------------
Comment (by scribu):
> 1) if I add function on 'shutdown' action hook when happen nothing. I
tried output large portion of HTML-code via this hook but I can't see it.
This works for me:
```
function some_html_content() {
?>
This will show up right at the end of every page.
<?php
}
add_action( 'shutdown', 'some_html_content' );
```
Note that it shows up after the </html> tag, so you can't use it to output
valid HTML. That would be the case even if you placed it right at the end
of template-loader.php
> 2) In documentation made by phpdocumentor ( example 1 and example 2 ) I
can't see any reference to using of shutdown_action_hook() function
In wp-settings.php:
{{{
register_shutdown_function( 'shutdown_action_hook' );
}}}
Don't rely on phpdocumentor next time. Searching directly through the
source code is the only reliable indicator.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20390#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list