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:
Konstantin Obenland 2015-07-04 20:29:23 +00:00
parent 664b0373dc
commit cc43eae995
2 changed files with 19 additions and 7 deletions

View File

@ -13,13 +13,15 @@
class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
/**
* Constructor
* PHP5 constructor.
*
* @since Twenty Eleven 1.0
**/
function Twenty_Eleven_Ephemera_Widget() {
$widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ) );
$this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops );
* @since Twenty Eleven 2.2
*/
function __construct() {
parent::__construct( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), array(
'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';
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' ) );
}
/**
* 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.
*

View File

@ -4,7 +4,7 @@
*
* @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.