Ticket #37893: 37893.patch
File 37893.patch, 1.0 KB (added by , 8 years ago) |
---|
-
wp-includes/widgets.php
278 278 * Removes a sidebar from the list. 279 279 * 280 280 * @since 2.2.0 281 * @since x.y.0 The `$name` parameter was changed to also accept a numeric sidebar ID. 281 282 * 282 283 * @global array $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID. 283 284 * 284 * @param string $name The ID of the sidebar when it was added.285 * @param string|int $name The ID of the sidebar when it was registered. 285 286 */ 286 287 function unregister_sidebar( $name ) { 287 288 global $wp_registered_sidebars; 288 289 290 $name = ( is_int($name) ) ? "sidebar-$name" : sanitize_title($name); 289 291 unset( $wp_registered_sidebars[ $name ] ); 290 292 } 291 293 … … 302 304 function is_registered_sidebar( $sidebar_id ) { 303 305 global $wp_registered_sidebars; 304 306 307 $sidebar_id = ( is_int($sidebar_id) ) ? "sidebar-$sidebar_id" : sanitize_title($sidebar_id); 305 308 return isset( $wp_registered_sidebars[ $sidebar_id ] ); 306 309 } 307 310