Last active
May 10, 2018 13:14
-
-
Save thiagotmendes/08352b8c33dcce95c1d8bca6ef1eb940 to your computer and use it in GitHub Desktop.
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 | |
function jQuery3(){ | |
// Apenas para mudar a versão automaticamente | |
$date = date("dmy"); | |
// Le a função apenas no front do site | |
if (!is_admin()){ | |
// Tira o registro do Jquery que estava funcionando | |
wp_deregister_script('jquery'); | |
// Registra o novo script | |
wp_register_script('jquery', "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js", false, $date); | |
// Aponta o carregamento do script | |
wp_enqueue_script('jquery'); | |
} | |
} | |
add_action('init', 'jQuery3'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment