Make WordPress Core

Changeset 33085


Ignore:
Timestamp:
07/04/2015 08:28:17 PM (11 years ago)
Author:
obenland
Message:

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

See #31982.

Props Frank Klein.
Fixes #32881.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/inc/widgets.php

    r32116 r33085  
    1414
    1515        /**
    16          * Constructor
     16         * PHP5 constructor.
    1717         *
    18          * @since Twenty Eleven 1.0
    19          **/
    20         function Twenty_Eleven_Ephemera_Widget() {
    21                 $widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ) );
    22                 $this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops );
     18         * @since Twenty Eleven 2.2
     19         */
     20        function __construct() {
     21                parent::__construct( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), array(
     22                        'classname'   => 'widget_twentyeleven_ephemera',
     23                        'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ),
     24                ) );
    2325                $this->alt_option_name = 'widget_twentyeleven_ephemera';
    2426
     
    2628                add_action( 'deleted_post', array( &$this, 'flush_widget_cache' ) );
    2729                add_action( 'switch_theme', array( &$this, 'flush_widget_cache' ) );
     30        }
     31
     32        /**
     33         * PHP4 constructor.
     34         *
     35         * @since Twenty Eleven 1.0
     36         */
     37        function Twenty_Eleven_Ephemera_Widget() {
     38                _deprecated_constructor( 'Twenty_Eleven_Ephemera_Widget', '4.3.0' );
     39                self::__construct();
    2840        }
    2941
Note: See TracChangeset for help on using the changeset viewer.