Add page specific admin_head action. Add admin_print_scripts actions.

git-svn-id: http://svn.automattic.com/wordpress/trunk@4120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-08-28 23:08:48 +00:00
parent 8460a0750d
commit 4f10239e93
2 changed files with 15 additions and 1 deletions

View File

@ -10,6 +10,7 @@ if ( $editing ) {
}
get_admin_page_title();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
@ -24,7 +25,19 @@ function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}el
</script>
<?php if ( ($parent_file != 'link-manager.php') && ($parent_file != 'options-general.php') ) : ?>
<style type="text/css">* html { overflow-x: hidden; }</style>
<?php endif; wp_print_scripts(); do_action('admin_head'); ?>
<?php endif;
if ( isset($page_hook) )
do_action('admin_print_scripts-' . $page_hook);
else if ( isset($plugin_page) )
do_action('admin_print_scripts-' . $plugin_page);
do_action('admin_print_scripts');
if ( isset($page_hook) )
do_action('admin_head-' . $page_hook);
else if ( isset($plugin_page) )
do_action('admin_head-' . $plugin_page);
do_action('admin_head');
?>
</head>
<body>
<div id="wphead">

View File

@ -156,4 +156,5 @@ add_action('do_feed_atom', 'do_feed_atom', 10, 1);
add_action('do_pings', 'do_all_pings', 10, 1);
add_action('do_robots', 'do_robots');
add_action('sanitize_comment_cookies', 'sanitize_comment_cookies');
add_action('admin_print_scripts', 'wp_print_scripts', 20);
?>