Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Load jQuery & jQuery UI
- function load_my_jquery() {
- wp_deregister_script("jquery");
- wp_deregister_script("jquery-ui");
- wp_deregister_script("jquery-ui-core");
- wp_deregister_script("jquery-ui-tabs");
- wp_deregister_script("jquery-ui-sortable");
- wp_deregister_script("jquery-ui-draggable");
- wp_deregister_script("jquery-ui-droppable");
- wp_deregister_script("jquery-ui-selectable");
- wp_deregister_script("jquery-ui-resizable");
- wp_deregister_script("jquery-ui-dialog");
- wp_register_script("jquery", "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", array(), "1.7.1", true);
- wp_register_script("jquery-ui", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js", array("jquery"), "1.8.18", true);
- }
- function print_my_jquery() {
- global $add_my_jquery;
- if (!$add_my_jquery) { return; }
- wp_print_scripts('jquery', 'jquery-ui');
- }
- if (!is_admin()) {
- add_action("init", "load_my_jquery");
- add_action("wp_footer", "print_my_jquery");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement