content_url
Filter HookDescription
Filters the URL to the content directory.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3658 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$url
|
The complete URL to the content directory including scheme and path. |
string
|
$path
|
Path relative to the URL to the content directory. Blank string if no path is specified. |
Usage Examples
Basic Usage
<?php
// Hook into content_url
add_filter('content_url', 'my_custom_filter', 10, 2);
function my_custom_filter($url, $path) {
// Your custom filtering logic here
return $url;
}
Source Code Context
wp-includes/link-template.php:3658
- How this hook is used in WordPress core
<?php
3653 *
3654 * @param string $url The complete URL to the content directory including scheme and path.
3655 * @param string $path Path relative to the URL to the content directory. Blank string
3656 * if no path is specified.
3657 */
3658 return apply_filters( 'content_url', $url, $path );
3659 }
3660
3661 /**
3662 * Retrieves a URL within the plugins or mu-plugins directory.
3663 *
PHP Documentation
<?php
/**
* Filters the URL to the content directory.
*
* @since 2.8.0
*
* @param string $url The complete URL to the content directory including scheme and path.
* @param string $path Path relative to the URL to the content directory. Blank string
* if no path is specified.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.