From e31723d61eeae2a5415b3f366fc12f85b0482e6f Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 22 Aug 2006 17:38:09 +0000 Subject: [PATCH] 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 --- wp-admin/admin.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 0d7694d794..e24e209deb 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -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');