WordPress.org

Make WordPress Core

Ticket #32480: 32480.diff

File 32480.diff, 1.1 KB (added by welcher, 6 years ago)
  • wp-includes/default-widgets.php

     
    455455
    456456        public function __construct() {
    457457                $widget_ops = array('classname' => 'widget_calendar', 'description' => __( 'A calendar of your site’s Posts.') );
    458                 parent::__construct('calendar', __('Calendar'), $widget_ops);
     458                parent::WP_Widget('calendar', __('Calendar'), $widget_ops);
    459459        }
    460460
    461461        public function widget( $args, $instance ) {
  • wp-includes/widgets.php

     
    173173         * @param array  $control_options
    174174         */
    175175        public function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) {
     176                _doing_it_wrong( 'WP_Widget', esc_html__( 'This is a PHP4 style constructor, please use __construct instead' ), '4.3' );
    176177                WP_Widget::__construct( $id_base, $name, $widget_options, $control_options );
    177178        }
    178179