Ticket #16773: 16773.diff
File 16773.diff, 834 bytes (added by , 14 years ago) |
---|
-
wp-includes/widgets.php
91 91 * - height: currently not used but may be needed in the future 92 92 */ 93 93 function __construct( $id_base = false, $name, $widget_options = array(), $control_options = array() ) { 94 $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', s trtolower(get_class($this)) ) : strtolower($id_base);94 $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', sanitize_key( get_class( $this ) ) ) : sanitize_key( $id_base ); 95 95 $this->name = $name; 96 96 $this->option_name = 'widget_' . $this->id_base; 97 97 $this->widget_options = wp_parse_args( $widget_options, array('classname' => $this->option_name) );