From b6d89c22070abb2578d91a3ff30436f2ab49095f Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 8 Oct 2019 16:21:21 -0400 Subject: [PATCH] Update the action for cookie popup Need to use wp_footer action. --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index cb55607..1ac9154 100755 --- a/index.php +++ b/index.php @@ -169,7 +169,7 @@ function glmServerStatsScripts() */ // If this is an admin request and the cookie pop-ups have been enabled - Popup test in scripting on page -if ((!empty($_REQUEST['force_cookie']) || $websiteSettings['show_cookie_popup']) && !is_admin()) { +if ( ( !empty( $_REQUEST['force_cookie'] ) || $websiteSettings['show_cookie_popup'] ) && !is_admin() ) { // Make sure that the jQuery scripts are included function enqueueJquery() { @@ -179,9 +179,9 @@ if ((!empty($_REQUEST['force_cookie']) || $websiteSettings['show_cookie_popup']) // Have WordPress include the cookie pop-up code just before the footer. function doCookiePopUp() { - include(GLM_SERVERSTATS_PLUGIN_MODEL_PATH.'/frontCookiePopUp.php'); + include GLM_SERVERSTATS_PLUGIN_MODEL_PATH . '/frontCookiePopUp.php'; } - add_action( 'get_footer', 'doCookiePopUp' ); + add_action( 'wp_footer', 'doCookiePopUp' ); } -- 2.17.1