• I’m having a huge error while replacing the standard included jquery with a google library jquery (for site speed reasons) :
    my code

    function modify_jquery() {
        if (!is_admin()) {
            wp_deregister_script('jquery');
            wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', false, '1.10.2');
            wp_enqueue_script('jquery');
        }
    }
    add_action('init', 'modify_jquery');

    When tryin to log in, I get an error saying you can not deregister jquery from admin. That can make sense, but the problem is i’m not yet logged when going to /wp-admin and it then also give the following error

    Warning: Cannot modify header information – headers already sent by (output started at [site location]/wp-includes/functions.php:3370) in [site location]/wp-login.php on line 431

    Any idea on how to fix this ? what change between 3.9 and 4 so that this doesn’t work anymore ?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Error with 4.0 and jquery google library’ is closed to new replies.