Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- This snippet is intended to fix themes that override form the default jQuery scripts.
- Add this to your theme's functions.php file.
- */
- // Reregisters default jquery scripts
- // Might cause conflicts with themes that use outdated jQuery plugins
- function use_wp_default_scripts() {
- wp_dequeue_script('jquery');
- wp_deregister_script('jquery');
- wp_dequeue_script('jquery-core');
- wp_deregister_script('jquery-core');
- wp_dequeue_script('jquery-migrate');
- wp_deregister_script('jquery-migrate');
- wp_dequeue_script('jquery-ui-core');
- wp_deregister_script('jquery-ui-core');
- wp_dequeue_script('jquery-ui-datepicker');
- wp_deregister_script('jquery-ui-datepicker');
- wp_register_script(
- 'jquery-migrate',
- '/wp-includes/js/jquery/jquery-migrate.min.js'
- );
- wp_register_script(
- 'jquery-core',
- '/wp-includes/js/jquery/jquery.js'
- );
- wp_register_script(
- 'jquery',
- false,
- array('jquery-core', 'jquery-migrate')
- );
- wp_register_script(
- 'jquery-ui-core',
- '/wp-includes/js/jquery/ui/jquery.ui.core.min.js',
- array('jquery')
- );
- wp_register_script(
- 'jquery-ui-datepicker',
- '/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js',
- array('jquery-ui-core')
- );
- wp_enqueue_script('jquery-core');
- wp_enqueue_script('jquery-migrate');
- wp_enqueue_script('jquery');
- wp_enqueue_script('jquery-ui-core');
- wp_enqueue_script('jquery-ui-datepicker');
- }
- add_action( 'wp_print_scripts', 'hide_tribe_placeholders', 100 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement