Make WordPress Core

Changeset 39892


Ignore:
Timestamp:
01/12/2017 06:37:06 AM (8 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

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

    r39311 r39892  
    282282 * @global array $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID.
    283283 *
    284  * @param string $name The ID of the sidebar when it was added.
    285  */
    286 function unregister_sidebar( $name ) {
     284 * @param string|int $sidebar_id The ID of the sidebar when it was registered.
     285 */
     286function unregister_sidebar( $sidebar_id ) {
    287287    global $wp_registered_sidebars;
    288288
    289     unset( $wp_registered_sidebars[ $name ] );
     289    unset( $wp_registered_sidebars[ $sidebar_id ] );
    290290}
    291291
Note: See TracChangeset for help on using the changeset viewer.