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. Built from https://develop.svn.wordpress.org/trunk@39892 git-svn-id: http://core.svn.wordpress.org/trunk@39829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
11d81ecc7c
commit
a1319d63a0
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-alpha-39891';
|
||||
$wp_version = '4.8-alpha-39892';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
@ -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