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
This commit is contained in:
parent
d788c3ffed
commit
c2fe0f3dc1
@ -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 ] );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user