Add action hook in admin footer so plugins can output scripts there on specific pages only, props GamerZ, fixes #8859

git-svn-id: http://svn.automattic.com/wordpress/trunk@10362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-01-15 00:08:20 +00:00
parent b1806928e0
commit 3f7facfbe6
3 changed files with 3 additions and 3 deletions

View File

@ -25,11 +25,12 @@ echo '<span id="footer-thankyou">' . __('Thank you for creating with <a href="ht
<?php
do_action('admin_footer', '');
do_action('admin_print_footer_scripts');
do_action("admin_footer-$hook_suffix");
if ( false === get_option('can_compress_scripts') )
compression_test();
?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
</body>
</html>

View File

@ -3381,7 +3381,6 @@ function screen_icon($name = '') {
else
$name = str_replace(array('.php', '-new', '-add'), '', $hook_suffix);
}
unset($hook_suffix);
?>
<div id="icon-<?php echo $name; ?>" class="icon32"><br /></div>
<?php

View File

@ -160,7 +160,7 @@ class WP_Scripts extends WP_Dependencies {
if ( !empty($this->in_footer) ) {
foreach( $this->in_footer as $key => $handle ) {
if ( !in_array($handle, $this->done, true) && isset($this->registered[$handle]) ) {
$this->do_item($handle, false, $this->doecho);
$this->do_item($handle);
$this->done[] = $handle;
unset( $this->in_footer[$key] );
}