Make WordPress Core


Ignore:
Timestamp:
06/06/2016 09:50:29 PM (10 years ago)
Author:
ocean90
Message:

Widgets: Revert [37425] and [37427].

The change can cause fatal errors under certain conditions, like when the subclass has a different function signature for widget() or doesn't even implement the method.

See #35981.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-widget.php

    r37492 r37648  
    1717 * @since 2.8.0
    1818 * @since 4.4.0 Moved to its own file from wp-includes/widgets.php
    19  * @abstract
    2019 */
    21 abstract class WP_Widget {
     20class WP_Widget {
    2221
    2322        /**
    … …  
    9897         * @since 2.8.0
    9998         * @access public
    100          * @abstract
    10199         *
    102100         * @param array $args     Display arguments including 'before_title', 'after_title',
    … …  
    104102         * @param array $instance The settings for the particular instance of the widget.
    105103         */
    106         abstract public function widget( $args, $instance );
     104        public function widget( $args, $instance ) {
     105                die('function WP_Widget::widget() must be over-ridden in a sub-class.');
     106        }
    107107
    108108        /**
Note: See TracChangeset for help on using the changeset viewer.