From 5decb14b990deb9d3e723534511572ebb4a8bbc7 Mon Sep 17 00:00:00 2001 From: Jordan Graham Date: Fri, 23 Aug 2019 14:11:09 -0600 Subject: [PATCH] Added a helper function in class-cherry-team-widget.php to avoid using deprecated create_function(). --- public/includes/class-cherry-team-widget.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/includes/class-cherry-team-widget.php b/public/includes/class-cherry-team-widget.php index c2b823c..31a9759 100644 --- a/public/includes/class-cherry-team-widget.php +++ b/public/includes/class-cherry-team-widget.php @@ -318,4 +318,11 @@ protected function get_order_options() { } } -add_action( 'widgets_init', create_function( '', 'register_widget("Cherry_Team_Widget");' ) ); +add_action( 'widgets_init', 'class_cherry_team_widget_register_widget' ); + +/** + * Helper function to register the Cherry Team Widget. + */ +function class_cherry_team_widget_register_widget() { + register_widget("Cherry_Team_Widget"); +}