Ticket #18187: sidebars_sanitize_title.diff
File sidebars_sanitize_title.diff, 830 bytes (added by , 13 years ago) |
---|
-
wp-includes/widgets.php
554 554 ); 555 555 556 556 $sidebar = wp_parse_args( $args, $defaults ); 557 558 $sidebar['id'] = sanitize_title($sidebar['id']); 557 559 558 560 $wp_registered_sidebars[$sidebar['id']] = $sidebar; 559 561 … … 576 578 function unregister_sidebar( $name ) { 577 579 global $wp_registered_sidebars; 578 580 581 $name = sanitize_title($name); 582 579 583 if ( isset( $wp_registered_sidebars[$name] ) ) 580 584 unset( $wp_registered_sidebars[$name] ); 581 585 } … … 675 679 return; 676 680 677 681 global $wp_registered_sidebars; 682 683 $id = sanitize_title($id); 678 684 679 685 if ( isset($wp_registered_sidebars[$id]['description']) ) 680 686 return esc_html( $wp_registered_sidebars[$id]['description'] );