From 40a738c21cb7e02a4ee95a8f8335e45dcf1fab87 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 13 May 2014 06:28:15 +0000 Subject: [PATCH] Clarify inline documentation for back-compat `load-*` action hooks. See #26869. Built from https://develop.svn.wordpress.org/trunk@28393 git-svn-id: http://core.svn.wordpress.org/trunk@28221 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/wp-admin/admin.php b/wp-admin/admin.php index cef77fcbcf..960f88fedb 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -288,8 +288,9 @@ if ( isset($plugin_page) ) { * * @param bool false Whether to force data to be filtered through kses. Default false. */ - if ( apply_filters( 'force_filtered_html_on_import', false ) ) + if ( apply_filters( 'force_filtered_html_on_import', false ) ) { kses_init_filters(); // Always filter imported data with kses on multisite. + } call_user_func($wp_importers[$importer][2]); @@ -307,13 +308,17 @@ if ( isset($plugin_page) ) { * * The dynamic portion of the hook name, $pagenow, is a global variable * referring to the filename of the current page, such as 'admin.php', - * 'post-new.php' etc. A complete hook for the latter would be 'load-post-new.php'. + * 'post-new.php' etc. A complete hook for the latter would be + * 'load-post-new.php'. * * @since 2.1.0 */ do_action( 'load-' . $pagenow ); - // Backwards compatibility with old load-page-new.php, load-page.php, - // and load-categories.php actions. + + /* + * The following hooks are fired to ensure backward compatibility. + * In all other cases, 'load-' . $pagenow should be used instead. + */ if ( $typenow == 'page' ) { if ( $pagenow == 'post-new.php' ) do_action( 'load-page-new.php' );