Created
September 16, 2011 17:59
-
-
Save rickbenetti/1222702 to your computer and use it in GitHub Desktop.
carregar scripts do Tema no rodapé
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
// 0. Carrega os scripts no wp_head() | |
function carrega_scripts() { | |
if(is_home() || !is_admin()) { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', get_bloginfo('template_url') . '/scripts/jquery.js' , false, '1.6.2', true); | |
wp_enqueue_script('functions', get_bloginfo('template_url') . '/scripts/functions.js', array('jquery'), '1.0', true); | |
} | |
if(is_single() || is_page()) { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', get_bloginfo('template_url') . '/scripts/jquery.js' , false, '1.6.2', true); | |
wp_enqueue_script('functions', get_bloginfo('template_url') . '/scripts/functions.js', array('jquery'), '1.0', true); | |
} | |
} | |
add_action('wp_print_scripts', 'carrega_scripts'); // Adiciona a acao |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment