includes_url
Filter HookDescription
Filters the URL to the includes directory.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3631 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$url
|
The complete URL to the includes directory including scheme and path. |
string
|
$path
|
Path relative to the URL to the wp-includes directory. Blank string if no path is specified. |
string|null
|
$scheme
|
Scheme to give the includes URL context. Accepts 'http', 'https', 'relative', or null. Default null. |
Usage Examples
Basic Usage
<?php
// Hook into includes_url
add_filter('includes_url', 'my_custom_filter', 10, 3);
function my_custom_filter($url, $path, $scheme) {
// Your custom filtering logic here
return $url;
}
Source Code Context
wp-includes/link-template.php:3631
- How this hook is used in WordPress core
<?php
3626 * @param string $path Path relative to the URL to the wp-includes directory. Blank string
3627 * if no path is specified.
3628 * @param string|null $scheme Scheme to give the includes URL context. Accepts
3629 * 'http', 'https', 'relative', or null. Default null.
3630 */
3631 return apply_filters( 'includes_url', $url, $path, $scheme );
3632 }
3633
3634 /**
3635 * Retrieves the URL to the content directory.
3636 *
PHP Documentation
<?php
/**
* Filters the URL to the includes directory.
*
* @since 2.8.0
* @since 5.8.0 The `$scheme` parameter was added.
*
* @param string $url The complete URL to the includes directory including scheme and path.
* @param string $path Path relative to the URL to the wp-includes directory. Blank string
* if no path is specified.
* @param string|null $scheme Scheme to give the includes URL context. Accepts
* 'http', 'https', 'relative', or null. Default null.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.