From 1954f9b7d439f72e132fb7750baf7038774f6f03 Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Tue, 13 May 2014 06:27:11 +0000 Subject: [PATCH] Clarify inline documentation for back-compat `load-*` action hooks. See #26869. git-svn-id: https://develop.svn.wordpress.org/trunk@28393 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/admin.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/admin.php b/src/wp-admin/admin.php index cef77fcbcf..960f88fedb 100644 --- a/src/wp-admin/admin.php +++ b/src/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' );