Created
October 24, 2013 12:29
-
-
Save seoagentur-hamburg/7136323 to your computer and use it in GitHub Desktop.
Toolbox-Modul um alles JavaScript in den Footer von WordPress einzubinden.
This file contains 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 | |
/* | |
Module Name: JavaScript in Footer | |
Description: Verfrachtet alles JavaScript in den Footer von WordPress [Frontend] | |
Author: Andreas Hecht | |
Author URI: http://hechtmediaarts.com/ | |
*/ | |
/* Sicherheitsabfrage */ | |
if ( !class_exists('Toolbox') ) { | |
die(); | |
} | |
/* Ab hier kann's los gehen */ | |
function evolution_clean_head() { | |
remove_action('wp_head', 'wp_print_scripts'); | |
remove_action('wp_head', 'wp_print_head_scripts', 9); | |
remove_action('wp_head', 'wp_enqueue_scripts', 1); | |
} | |
add_action( 'wp_enqueue_scripts', 'evolution_clean_head' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment