Deprecate PHP4 style contructor in Twenty Eleven's Ephemera widget.

See #31982.

Props Frank Klein.
Fixes #32881.



git-svn-id: https://develop.svn.wordpress.org/trunk@33085 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland 2015-07-04 20:28:17 +00:00
parent 9d101ee78e
commit 9b40a4f79f

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.
*