plugins_url filter-hookWP 2.8.0

Filters the URL to the plugins directory.

Usage

add_filter( 'plugins_url', 'wp_kama_plugins_url_filter', 10, 3 );

/**
 * Function for `plugins_url` filter-hook.
 * 
 * @param string $url    The complete URL to the plugins directory including scheme and path.
 * @param string $path   Path relative to the URL to the plugins directory. Blank string if no path is specified.
 * @param string $plugin The plugin file path to be relative to. Blank string if no plugin is specified.
 *
 * @return string
 */
function wp_kama_plugins_url_filter( $url, $path, $plugin ){

	// filter...
	return $url;
}
$url(string)
The complete URL to the plugins directory including scheme and path.
$path(string)
Path relative to the URL to the plugins directory. Blank string if no path is specified.
$plugin(string)
The plugin file path to be relative to. Blank string if no plugin is specified.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

plugins_url()
plugins_url
wp-includes/link-template.php 3687
return apply_filters( 'plugins_url', $url, $path, $plugin );

Where the hook is used in WordPress

Usage not found.