content_url
Filters the URL to the content directory.
Usage
add_filter( 'content_url', 'wp_kama_content_url_filter', 10, 2 ); /** * Function for `content_url` filter-hook. * * @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. * * @return string */ function wp_kama_content_url_filter( $url, $path ){ // filter... return $url; }
- $url(string)
- The complete URL to the content directory including scheme and path.
- $path(string)
- Path relative to the URL to the content directory. Blank string if no path is specified.
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
content_url
wp-includes/link-template.php 3658
return apply_filters( 'content_url', $url, $path );