From 28d66d804343484d8a119a148d24e4ba429b006c Mon Sep 17 00:00:00 2001 From: Weston Gentry <64536883+weston-gentry@users.noreply.github.com> Date: Thu, 17 Feb 2022 11:14:59 -0600 Subject: [PATCH 1/7] Update class-ipt-kb-affix-widget.php create_function() depreciated. Updated lines 312-316. --- inc/class-ipt-kb-affix-widget.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/class-ipt-kb-affix-widget.php b/inc/class-ipt-kb-affix-widget.php index f7467fe..2079b1a 100644 --- a/inc/class-ipt-kb-affix-widget.php +++ b/inc/class-ipt-kb-affix-widget.php @@ -309,7 +309,11 @@ function form( $instance ) { } } -add_action( 'widgets_init', create_function( '', "register_widget( 'IPT_KB_Affix_Widget' );" ) ); +//UTC MOD 2/17/21 create_function() depreciated START +//add_action( 'widgets_init', create_function( '', "register_widget( 'IPT_KB_Affix_Widget' );" ) ); + +add_action( 'widgets_init', function() { register_widget( "IPT_KB_Affix_Widget" ); } ); +//UTC MOD 2/17/21 create_function() depreciated END /** * TOC content filter From 7350dd43eec1cfac938356c9ff976d2bd8403c73 Mon Sep 17 00:00:00 2001 From: Chris Gilligan <49878588+UTCGilligan@users.noreply.github.com> Date: Thu, 17 Feb 2022 12:31:04 -0500 Subject: [PATCH 2/7] Update deprecated function. --- inc/class-ipt-kb-social-widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ); } ); From d1ed2b1ca533970be5fbb669ba0d98bb91f283ae Mon Sep 17 00:00:00 2001 From: Chris Gilligan <49878588+UTCGilligan@users.noreply.github.com> Date: Thu, 17 Feb 2022 12:34:55 -0500 Subject: [PATCH 3/7] Update class-ipt-kb-knowledgebase-widget.php --- inc/class-ipt-kb-knowledgebase-widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ); } ); From 8e80a74e0438b4014fe0b32c11132192dedaecec Mon Sep 17 00:00:00 2001 From: Chris Gilligan <49878588+UTCGilligan@users.noreply.github.com> Date: Thu, 17 Feb 2022 14:38:41 -0500 Subject: [PATCH 4/7] Update class-ipt-kb-affix-widget.php --- inc/class-ipt-kb-affix-widget.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/inc/class-ipt-kb-affix-widget.php b/inc/class-ipt-kb-affix-widget.php index 2079b1a..2bc2b30 100644 --- a/inc/class-ipt-kb-affix-widget.php +++ b/inc/class-ipt-kb-affix-widget.php @@ -309,11 +309,10 @@ function form( $instance ) { } } -//UTC MOD 2/17/21 create_function() depreciated START -//add_action( 'widgets_init', create_function( '', "register_widget( 'IPT_KB_Affix_Widget' );" ) ); - -add_action( 'widgets_init', function() { register_widget( "IPT_KB_Affix_Widget" ); } ); -//UTC MOD 2/17/21 create_function() depreciated END +add_action( 'widgets_init', 'itkbaffix_register_widgets' ); +function itkbaffix_register_widgets() { + register_widget( 'IPT_KB_Affix_Widget' ); +} /** * TOC content filter From beaf2f179c460f38466b570a72d4c5d31dd79b3d Mon Sep 17 00:00:00 2001 From: Chris Gilligan <49878588+UTCGilligan@users.noreply.github.com> Date: Fri, 18 Feb 2022 08:28:09 -0500 Subject: [PATCH 5/7] Update class-ipt-kb-affix-widget.php Revert to Weston's fix. --- inc/class-ipt-kb-affix-widget.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/inc/class-ipt-kb-affix-widget.php b/inc/class-ipt-kb-affix-widget.php index 2bc2b30..2079b1a 100644 --- a/inc/class-ipt-kb-affix-widget.php +++ b/inc/class-ipt-kb-affix-widget.php @@ -309,10 +309,11 @@ function form( $instance ) { } } -add_action( 'widgets_init', 'itkbaffix_register_widgets' ); -function itkbaffix_register_widgets() { - register_widget( 'IPT_KB_Affix_Widget' ); -} +//UTC MOD 2/17/21 create_function() depreciated START +//add_action( 'widgets_init', create_function( '', "register_widget( 'IPT_KB_Affix_Widget' );" ) ); + +add_action( 'widgets_init', function() { register_widget( "IPT_KB_Affix_Widget" ); } ); +//UTC MOD 2/17/21 create_function() depreciated END /** * TOC content filter From e0ac5e0f364405120f6b2d273572ac53a7433c46 Mon Sep 17 00:00:00 2001 From: Chris Gilligan <49878588+UTCGilligan@users.noreply.github.com> Date: Fri, 18 Feb 2022 08:43:07 -0500 Subject: [PATCH 6/7] change deprecated create_function() --- inc/class-ipt-kb-popular-widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ); } ); From 2a7e86aaad42bc60f3c95c34ad189899d5cc51ab Mon Sep 17 00:00:00 2001 From: Chris Gilligan <49878588+UTCGilligan@users.noreply.github.com> Date: Tue, 22 Feb 2022 19:59:16 -0500 Subject: [PATCH 7/7] Remove code change comments. Temporary comments not needed for final commit. --- inc/class-ipt-kb-affix-widget.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/inc/class-ipt-kb-affix-widget.php b/inc/class-ipt-kb-affix-widget.php index 2079b1a..bc19aa4 100644 --- a/inc/class-ipt-kb-affix-widget.php +++ b/inc/class-ipt-kb-affix-widget.php @@ -309,11 +309,7 @@ function form( $instance ) { } } -//UTC MOD 2/17/21 create_function() depreciated START -//add_action( 'widgets_init', create_function( '', "register_widget( 'IPT_KB_Affix_Widget' );" ) ); - add_action( 'widgets_init', function() { register_widget( "IPT_KB_Affix_Widget" ); } ); -//UTC MOD 2/17/21 create_function() depreciated END /** * TOC content filter