From 8dcb6d99e7c47228d840e7ba274d4f10356bac10 Mon Sep 17 00:00:00 2001 From: "Michael W. Delaney" Date: Mon, 16 Apr 2018 12:16:55 -0400 Subject: [PATCH] create_function() is deprecated in modern PHP --- public/includes/class-cherry-team-widget.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/includes/class-cherry-team-widget.php b/public/includes/class-cherry-team-widget.php index c2b823c..ac99c49 100644 --- a/public/includes/class-cherry-team-widget.php +++ b/public/includes/class-cherry-team-widget.php @@ -318,4 +318,6 @@ protected function get_order_options() { } } -add_action( 'widgets_init', create_function( '', 'register_widget("Cherry_Team_Widget");' ) ); +add_action( 'widgets_init', function() { + register_widget("Cherry_Team_Widget"); +});