apply_filters( 'script_loader_src', string $src, string $handle )

Filters the script loader source.


Parameters Parameters

$src

(string) Script loader source path.

$handle

(string) Script handle.


Top ↑

Source Source

File: wp-includes/class.wp-scripts.php

View on Trac



Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Ravi Makwana
    // Remove query string from static jquery files 
    function remove_query_string_from_static_jquery_files( $src ) {
        if( strpos( $src, '?ver=' ) )
            $src = remove_query_arg( 'ver', $src );
        return $src;
    }
    add_filter( 'script_loader_src', 'remove_query_string_from_static_jquery_files', 10 );

You must log in before being able to contribute a note or feedback.