mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
Move recent posts widget to WP_Widget. see #8441
git-svn-id: https://develop.svn.wordpress.org/trunk@11087 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -87,9 +87,9 @@ class WP_Widget {
|
||||
* - height
|
||||
*/
|
||||
function __construct( $id_base = false, $name, $widget_options = array(), $control_options = array() ) {
|
||||
$this->id_base = $id_base === false ? str_replace( 'wp_widget_', '', strtolower(get_class($this)) ) : $id_base;
|
||||
$this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : $id_base;
|
||||
$this->name = $name;
|
||||
$this->option_name = 'widget_' . $id_base;
|
||||
$this->option_name = 'widget_' . $this->id_base;
|
||||
$this->widget_options = wp_parse_args( $widget_options, array('classname' => $this->option_name) );
|
||||
$this->control_options = wp_parse_args( $control_options, array('id_base' => $this->id_base) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user