Ticket #24878: 24878.diff
File 24878.diff, 897 bytes (added by , 11 years ago) |
---|
-
wp-includes/widgets.php
577 577 } 578 578 579 579 /** 580 * Checks if a sidebar is registered. 581 * 582 * @since 3.7.0 583 * 584 * @param string $name The ID of the sidebar when it was added. 585 * 586 * @return boolean True if the sidebar is registered, false otherwise. 587 */ 588 function is_registered_sidebar( $name ) { 589 global $wp_registered_sidebars; 590 591 if ( isset( $wp_registered_sidebars[$name] ) ) 592 return true; 593 return false; 594 } 595 596 /** 580 597 * Removes a sidebar from the list. 581 598 * 582 599 * @since 2.2.0 … … 588 605 function unregister_sidebar( $name ) { 589 606 global $wp_registered_sidebars; 590 607 591 if ( is set( $wp_registered_sidebars[$name]) )608 if ( is_registered_sidebar( $name ) ) 592 609 unset( $wp_registered_sidebars[$name] ); 593 610 } 594 611