From a2d810d024ab513c1b90ca339db9a46faa4f14ef Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Fri, 28 Mar 2014 19:46:26 +0000 Subject: [PATCH] The `sidebar_admin_setup` hook should only be documented once in wp-admin/widgets.php. All others are duplicates. See #25374, #25501, #27531. git-svn-id: https://develop.svn.wordpress.org/trunk@27823 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 6 +----- src/wp-admin/widgets.php | 3 ++- src/wp-includes/class-wp-customize-widgets.php | 4 ++++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index a6b47f9c17..9d0e156630 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -1523,11 +1523,7 @@ function wp_ajax_save_widget() { */ do_action( 'widgets.php' ); - /** - * Fires early when editing the widgets displayed in sidebars. - * - * @since 2.2.0 - */ + /** This action is documented in wp-admin/widgets.php */ do_action( 'sidebar_admin_setup' ); $id_base = $_POST['id_base']; diff --git a/src/wp-admin/widgets.php b/src/wp-admin/widgets.php index b861b38928..9383d7436c 100644 --- a/src/wp-admin/widgets.php +++ b/src/wp-admin/widgets.php @@ -35,7 +35,8 @@ if ( 'on' == $widgets_access ) { } /** - * Fires early before the Widgets administration screen loads, after scripts are enqueued. + * Fires early before the Widgets administration screen loads, + * after scripts are enqueued. * * @since 2.2.0 */ diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php index 3a1321098f..c76425f46e 100644 --- a/src/wp-includes/class-wp-customize-widgets.php +++ b/src/wp-includes/class-wp-customize-widgets.php @@ -281,6 +281,8 @@ final class WP_Customize_Widgets { public function customize_controls_init() { do_action( 'load-widgets.php' ); do_action( 'widgets.php' ); + + /** This action is documented in wp-admin/widgets.php */ do_action( 'sidebar_admin_setup' ); } @@ -1158,6 +1160,8 @@ final class WP_Customize_Widgets { do_action( 'load-widgets.php' ); do_action( 'widgets.php' ); + + /** This action is documented in wp-admin/widgets.php */ do_action( 'sidebar_admin_setup' ); $widget_id = $this->get_post_value( 'widget-id' );