Deprecate PHP4 style contructor in Twenty Eleven's Ephemera widget.
See #31982. Props Frank Klein. Fixes #32881. Built from https://develop.svn.wordpress.org/trunk@33085 git-svn-id: http://core.svn.wordpress.org/trunk@33056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
664b0373dc
commit
cc43eae995
|
@ -13,13 +13,15 @@
|
||||||
class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* PHP5 constructor.
|
||||||
*
|
*
|
||||||
* @since Twenty Eleven 1.0
|
* @since Twenty Eleven 2.2
|
||||||
**/
|
*/
|
||||||
function Twenty_Eleven_Ephemera_Widget() {
|
function __construct() {
|
||||||
$widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ) );
|
parent::__construct( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), array(
|
||||||
$this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops );
|
'classname' => 'widget_twentyeleven_ephemera',
|
||||||
|
'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ),
|
||||||
|
) );
|
||||||
$this->alt_option_name = 'widget_twentyeleven_ephemera';
|
$this->alt_option_name = 'widget_twentyeleven_ephemera';
|
||||||
|
|
||||||
add_action( 'save_post', array( &$this, 'flush_widget_cache' ) );
|
add_action( 'save_post', array( &$this, 'flush_widget_cache' ) );
|
||||||
|
@ -27,6 +29,16 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||||
add_action( 'switch_theme', array( &$this, 'flush_widget_cache' ) );
|
add_action( 'switch_theme', array( &$this, 'flush_widget_cache' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHP4 constructor.
|
||||||
|
*
|
||||||
|
* @since Twenty Eleven 1.0
|
||||||
|
*/
|
||||||
|
function Twenty_Eleven_Ephemera_Widget() {
|
||||||
|
_deprecated_constructor( 'Twenty_Eleven_Ephemera_Widget', '4.3.0' );
|
||||||
|
self::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs the HTML for this widget.
|
* Outputs the HTML for this widget.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-beta1-33084';
|
$wp_version = '4.3-beta1-33085';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue