From c2fe0f3dc1eb0dc92e243968c872ddfe8148d3b6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 12 Jan 2017 06:37:06 +0000 Subject: [PATCH] Widgets: In `unregister_sidebar()`, rename the `$name` parameter to `$sidebar_id` for consistency with `is_registered_sidebar()`. Also correct the parameter type in `@param` entry. Props Soean, tmatsuur. Fixes #35147. git-svn-id: https://develop.svn.wordpress.org/trunk@39892 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/widgets.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php index 30c1fce53d..1abadfb186 100644 --- a/src/wp-includes/widgets.php +++ b/src/wp-includes/widgets.php @@ -281,12 +281,12 @@ function register_sidebar($args = array()) { * * @global array $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID. * - * @param string $name The ID of the sidebar when it was added. + * @param string|int $sidebar_id The ID of the sidebar when it was registered. */ -function unregister_sidebar( $name ) { +function unregister_sidebar( $sidebar_id ) { global $wp_registered_sidebars; - unset( $wp_registered_sidebars[ $name ] ); + unset( $wp_registered_sidebars[ $sidebar_id ] ); } /**