Widgets: Rename the $name
parameter in is_registered_sidebar()
to $sidebar_id
and adjust the accepted types to string|int
as sidebar IDs can be numeric.
See #24878. git-svn-id: https://develop.svn.wordpress.org/trunk@35104 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b272dc68b9
commit
72c81e01d4
@ -213,13 +213,13 @@ function unregister_sidebar( $name ) {
|
||||
*
|
||||
* @global array $wp_registered_sidebars Registered sidebars.
|
||||
*
|
||||
* @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.
|
||||
* @return bool True if the sidebar is registered, false otherwise.
|
||||
*/
|
||||
function is_registered_sidebar( $name ) {
|
||||
function is_registered_sidebar( $sidebar_id ) {
|
||||
global $wp_registered_sidebars;
|
||||
return isset( $wp_registered_sidebars[ $name ] );
|
||||
|
||||
return isset( $wp_registered_sidebars[ $sidebar_id ] );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user