diff --git a/inc/class-ipt-kb-affix-widget.php b/inc/class-ipt-kb-affix-widget.php index f7467fe..bc19aa4 100644 --- a/inc/class-ipt-kb-affix-widget.php +++ b/inc/class-ipt-kb-affix-widget.php @@ -309,7 +309,7 @@ function form( $instance ) { } } -add_action( 'widgets_init', create_function( '', "register_widget( 'IPT_KB_Affix_Widget' );" ) ); +add_action( 'widgets_init', function() { register_widget( "IPT_KB_Affix_Widget" ); } ); /** * TOC content filter diff --git a/inc/class-ipt-kb-knowledgebase-widget.php b/inc/class-ipt-kb-knowledgebase-widget.php index 381f5dd..16a0b87 100644 --- a/inc/class-ipt-kb-knowledgebase-widget.php +++ b/inc/class-ipt-kb-knowledgebase-widget.php @@ -144,4 +144,4 @@ function form( $instance ) { } } -add_action( 'widgets_init', create_function( '', "register_widget( 'IPT_KB_KnowledgeBase_Widget' );" ) ); +add_action( 'widgets_init', function() { register_widget( "IPT_KB_KnowledgeBase_Widget" ); } ); diff --git a/inc/class-ipt-kb-popular-widget.php b/inc/class-ipt-kb-popular-widget.php index 7cce7fb..fbb6894 100644 --- a/inc/class-ipt-kb-popular-widget.php +++ b/inc/class-ipt-kb-popular-widget.php @@ -125,4 +125,4 @@ function form( $instance ) { } } -add_action( 'widgets_init', create_function( '', "register_widget( 'IPT_KB_Popular_Widget' );" ) ); +add_action( 'widgets_init', function() { register_widget( "IPT_KB_Popular_Widget" ); } ); diff --git a/inc/class-ipt-kb-social-widget.php b/inc/class-ipt-kb-social-widget.php index 61059c2..b770b45 100644 --- a/inc/class-ipt-kb-social-widget.php +++ b/inc/class-ipt-kb-social-widget.php @@ -142,4 +142,4 @@ function form( $instance ) { } } -add_action( 'widgets_init', create_function( '', "register_widget( 'IPT_KB_Social_Widget' );" ) ); +add_action( 'widgets_init', function() { register_widget( "IPT_KB_Social_Widget" ); } );