From 0f842fa932bace4c61e547dbaf3c6f7db5721304 Mon Sep 17 00:00:00 2001 From: Mark Praschan <32518093+MarkPraschan@users.noreply.github.com> Date: Fri, 15 Mar 2019 14:41:02 -0500 Subject: [PATCH] fix deprecated create_function() --- widgets/SectionMenuWidget.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widgets/SectionMenuWidget.php b/widgets/SectionMenuWidget.php index 23ca15b..5984eeb 100644 --- a/widgets/SectionMenuWidget.php +++ b/widgets/SectionMenuWidget.php @@ -213,4 +213,7 @@ public function update( $new_instance, $old_instance ) { } -add_action( 'widgets_init', create_function( '', 'register_widget( "JC_Section_Menu_Widget" );' ) ); \ No newline at end of file +add_action( 'widgets_init', 'register_jc_section_menu' ); +function register_jc_section_menu() { + register_widget( "JC_Section_Menu_Widget" ); +}