WordPress.org

Make WordPress Core

Changeset 35104


Ignore:
Timestamp:
10/13/2015 01:44:44 AM (4 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widget-functions.php

    r35102 r35104  
    214214 * @global array $wp_registered_sidebars Registered sidebars.
    215215 *
    216  * @param string $name The ID of the sidebar when it was added.
    217  *
     216 * @param string|int $sidebar_id The ID of the sidebar when it was registered.
    218217 * @return bool True if the sidebar is registered, false otherwise.
    219218 */
    220 function is_registered_sidebar( $name ) {
     219function is_registered_sidebar( $sidebar_id ) {
    221220    global $wp_registered_sidebars;
    222     return isset( $wp_registered_sidebars[ $name ] );
     221
     222    return isset( $wp_registered_sidebars[ $sidebar_id ] );
    223223}
    224224
Note: See TracChangeset for help on using the changeset viewer.