Add plugin page load hooks. Useful for queueing scripts for a particular plugin page.

git-svn-id: http://svn.automattic.com/wordpress/trunk@4110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-08-22 17:38:09 +00:00
parent c8ef7e92d6
commit e31723d61e
1 changed files with 3 additions and 0 deletions

View File

@ -42,6 +42,7 @@ if (isset($plugin_page)) {
$page_hook = get_plugin_page_hook($plugin_page, $pagenow);
if ( $page_hook ) {
do_action('load-' . $page_hook);
if (! isset($_GET['noheader']))
require_once(ABSPATH . '/wp-admin/admin-header.php');
@ -54,6 +55,8 @@ if (isset($plugin_page)) {
if (! file_exists(ABSPATH . "wp-content/plugins/$plugin_page"))
wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
do_action('load-' . $plugin_page);
if (! isset($_GET['noheader']))
require_once(ABSPATH . '/wp-admin/admin-header.php');