From cb02b1f1e09434b5e103c2785b68a8dede51ffd8 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Mon, 6 Jun 2016 21:51:28 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@37648 git-svn-id: http://core.svn.wordpress.org/trunk@37614 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-widget.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/class-wp-widget.php b/wp-includes/class-wp-widget.php index f1a4f6bcfd..44f3686ddc 100644 --- a/wp-includes/class-wp-widget.php +++ b/wp-includes/class-wp-widget.php @@ -16,9 +16,8 @@ * * @since 2.8.0 * @since 4.4.0 Moved to its own file from wp-includes/widgets.php - * @abstract */ -abstract class WP_Widget { +class WP_Widget { /** * Root ID for all widgets of this type. @@ -97,13 +96,14 @@ abstract class WP_Widget { * * @since 2.8.0 * @access public - * @abstract * * @param array $args Display arguments including 'before_title', 'after_title', * 'before_widget', and 'after_widget'. * @param array $instance The settings for the particular instance of the widget. */ - abstract public function widget( $args, $instance ); + public function widget( $args, $instance ) { + die('function WP_Widget::widget() must be over-ridden in a sub-class.'); + } /** * Updates a particular instance of a widget. diff --git a/wp-includes/version.php b/wp-includes/version.php index b59c1a55bc..2a39c03575 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37647'; +$wp_version = '4.6-alpha-37648'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.