Back compat load actions. Props simonwheatley. fixes #14083 for 3.0.1

git-svn-id: http://svn.automattic.com/wordpress/branches/3.0@15388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-07-12 15:09:57 +00:00
parent a06471dfbf
commit f184263eb6
1 changed files with 10 additions and 0 deletions

View File

@ -200,6 +200,16 @@ if ( isset($plugin_page) ) {
exit();
} else {
do_action("load-$pagenow");
// Backwards compatibility with old load-page-new.php, load-page.php,
// and load-categories.php actions.
if ( $typenow == 'page' ) {
if ( $pagenow == 'post-new.php' )
do_action( 'load-page-new.php' );
elseif ( $pagenow == 'post.php' )
do_action( 'load-page.php' );
} elseif ( $taxnow == 'category' && $pagenow == 'edit-tags.php' ) {
do_action( 'load-categories.php' );
}
}
if ( !empty($_REQUEST['action']) )