Ticket #9704: 9704.2.patch
File 9704.2.patch, 1.2 KB (added by , 15 years ago) |
---|
-
wp-includes/widgets.php
73 73 /** 74 74 * PHP4 constructor 75 75 */ 76 function WP_Widget( $id_base = false, $name , $widget_options = array(), $control_options = array() ) {76 function WP_Widget( $id_base = false, $name = null, $widget_options = array(), $control_options = array() ) { 77 77 $this->__construct( $id_base, $name, $widget_options, $control_options ); 78 78 } 79 79 … … 86 86 * - width 87 87 * - height 88 88 */ 89 function __construct( $id_base = false, $name , $widget_options = array(), $control_options = array() ) {89 function __construct( $id_base = false, $name = null, $widget_options = array(), $control_options = array() ) { 90 90 $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : $id_base; 91 $this->name = $name;91 $this->name = is_null($name) ? $this->id_base : $name; 92 92 $this->option_name = 'widget_' . $this->id_base; 93 93 $this->widget_options = wp_parse_args( $widget_options, array('classname' => $this->option_name) ); 94 94 $this->control_options = wp_parse_args( $control_options, array('id_base' => $this->id_base) );