plugins_url
Filter HookDescription
Filters the URL to the plugins directory.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3711 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$url
|
The complete URL to the plugins directory including scheme and path. |
string
|
$path
|
Path relative to the URL to the plugins directory. Blank string if no path is specified. |
string
|
$plugin
|
The plugin file path to be relative to. Blank string if no plugin is specified. |
Usage Examples
Basic Usage
<?php
// Hook into plugins_url
add_filter('plugins_url', 'my_custom_filter', 10, 3);
function my_custom_filter($url, $path, $plugin) {
// Your custom filtering logic here
return $url;
}
Source Code Context
wp-includes/link-template.php:3711
- How this hook is used in WordPress core
<?php
3706 * @param string $path Path relative to the URL to the plugins directory. Blank string
3707 * if no path is specified.
3708 * @param string $plugin The plugin file path to be relative to. Blank string if no plugin
3709 * is specified.
3710 */
3711 return apply_filters( 'plugins_url', $url, $path, $plugin );
3712 }
3713
3714 /**
3715 * Retrieves the site URL for the current network.
3716 *
PHP Documentation
<?php
/**
* Filters the URL to the plugins directory.
*
* @since 2.8.0
*
* @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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.