Track down where script is being enqueued from

There is no filter when a script is registered, so it is hard to track that down. Use a full text search in all your theme and plugin files to find the source.

In addition, you can filter the URL before it is printed:

add_filter( 'script_loader_src', function( $url ) {
    if ( 0 !== strpos( $url, 'http:' ) )
        return $url;

    return substr( $url, 5 );
});

This will create an URL without protocol, so the browser will just use the same protocol (here: HTTPS) as your site.

Leave a Comment