styles should come before scripts should come before head. Props mdawaffe

git-svn-id: http://svn.automattic.com/wordpress/trunk@8008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-05-28 22:15:46 +00:00
parent 2b4f2fd621
commit f3511b048c

View File

@ -45,22 +45,24 @@ addLoadEvent = function(func) {if (typeof jQuery != "undefined") jQuery(document
<style type="text/css">* html { overflow-x: hidden; }</style> <style type="text/css">* html { overflow-x: hidden; }</style>
<?php endif; <?php endif;
if ( isset($page_hook) ) { $hook_suffixes = array();
do_action('admin_print_styles-' . $page_hook);
do_action('admin_print_scripts-' . $page_hook); if ( isset($page_hook) )
do_action('admin_head-' . $page_hook); $hook_suffixes[] = "-$page_hook";
} else if ( isset($plugin_page) ) { else if ( isset($plugin_page) )
do_action('admin_print_styles-' . $plugin_page); $hook_suffixes[] = "-$plugin_page";
do_action('admin_print_scripts-' . $plugin_page); else if ( isset($pagenow) )
do_action('admin_head-' . $plugin_page); $hook_suffixes[] = "-$pagenow";
} else if ( isset($pagenow) ) {
do_action('admin_print_styles-' . $pagenow); $hook_suffixes[] = '';
do_action('admin_print_scripts-' . $pagenow);
do_action('admin_head-' . $pagenow); foreach ( $hook_suffixes as $hook_suffix )
} do_action("admin_print_styles$hook_suffix"); // do_action( 'admin_print_styles-XXX' ); do_action( 'admin_print_styles' );
do_action('admin_print_styles'); foreach ( $hook_suffixes as $hook_suffix )
do_action('admin_print_scripts'); do_action("admin_print_scripts$hook_suffix"); // do_action( 'admin_print_scripts-XXX' ); do_action( 'admin_print_scripts' );
do_action('admin_head'); foreach ( $hook_suffixes as $hook_suffix )
do_action("admin_head$hook_suffix"); // do_action( 'admin_head-XXX' ); do_action( 'admin_head' );
unset($hook_suffixes, $hook_suffix);
?> ?>
</head> </head>