Created
May 21, 2021 03:36
-
-
Save wtmujeebu/894ecc580880cefde18f8d41264021c9 to your computer and use it in GitHub Desktop.
To move admin scripts to footer - CookieYes GDPR Cookie Consent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wt_move_gdpr_script_to_footer() { | |
if (class_exists('Cookie_Law_Info')) { | |
wp_dequeue_script('cookie-law-info'); | |
wp_enqueue_script('cookie-law-info', '', array(), false, true); | |
} | |
} | |
add_action( 'admin_enqueue_scripts', 'wt_move_gdpr_script_to_footer', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment