From 37d45c4198699c0e8c228ef5c59ed8ec51b46b8d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 14 Feb 2019 10:50:14 -0500 Subject: [PATCH] Update class-woothemes-widget-testimonials.php update class-woothemes-widget-testimonials.php replacing create_function() method which was deprecated in PHP 7.2.0, instead using an inline anonymous function, which still meets the "callable" criteria of the add_action method's second parameter. --- classes/class-woothemes-widget-testimonials.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/class-woothemes-widget-testimonials.php b/classes/class-woothemes-widget-testimonials.php index 53e022b..a558651 100644 --- a/classes/class-woothemes-widget-testimonials.php +++ b/classes/class-woothemes-widget-testimonials.php @@ -267,5 +267,5 @@ protected function get_order_options () { } // End Class /* Register the widget. */ -add_action( 'widgets_init', create_function( '', 'return register_widget("Woothemes_Widget_Testimonials");' ), 1 ); -?> \ No newline at end of file +add_action( 'widgets_init', function() { return register_widget("Woothemes_Widget_Testimonials"); }, 1 ); +?>