Ticket #16773: 16773.2.diff
File 16773.2.diff, 884 bytes (added by , 9 years ago) |
---|
-
wp-includes/class-wp-widget.php
152 152 * information on accepted arguments. Default empty array. 153 153 */ 154 154 public function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) { 155 $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', s trtolower(get_class($this)) ) : strtolower($id_base);155 $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', sanitize_key( get_class( $this ) ) ) : sanitize_key( $id_base ); 156 156 $this->name = $name; 157 157 $this->option_name = 'widget_' . $this->id_base; 158 158 $this->widget_options = wp_parse_args( $widget_options, array('classname' => $this->option_name) );