WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/13/2015 01:32:27 AM (5 years ago)
Author:
wonderboymusic
Message:

Widgets: add a function, is_registered_sidebar() - helps us avoid touching the $wp_registered_sidebars global.

Props GaryJ, wonderboymusic.
Fixes #24878.

File:
1 edited

Legend:

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

    r35015 r35102  
    9090        continue;
    9191
    92     if ( !isset( $wp_registered_sidebars[ $sidebar_id ] ) ) {
     92    if ( ! is_registered_sidebar( $sidebar_id ) ) {
    9393        if ( ! empty( $widgets ) ) { // register the inactive_widgets area as sidebar
    9494            register_sidebar(array(
     
    156156        /**
    157157         * Fires immediately after a widget has been marked for deletion.
    158          * 
     158         *
    159159         * @since 4.4.0
    160160         *
Note: See TracChangeset for help on using the changeset viewer.