script_loader_src WordPress Filter Hook

The script_loader_src hook is a great way to modify the way your WordPress site loads scripts. This hook allows you to change the script src attribute, which can be used to load scripts from a different location or to load a different script altogether. This is a great way to improve the performance of your site or to change the way your site looks and functions.

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

Filters the script loader source.


Parameters

$src

(string)Script loader source path.

$handle

(string)Script handle.


Top ↑

Source

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

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.