Definition:
function content_url($path = '') {}
Retrieve the url to the content directory.
Parameters
- string $path: Optional. Path relative to the content url.
Return values
returns:Content url link with optional path appended.
Defined filters
- content_url
apply_filters('content_url', $url, $path)
Source code
function content_url($path = '') {
$url = WP_CONTENT_URL;
if ( 0 === strpos($url, 'http') && is_ssl() )
$url = str_replace( 'http://', 'https://', $url );
if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
$url .= '/' . ltrim($path, '/');
return apply_filters('content_url', $url, $path);
}
719

February 11, 2011 


No comments yet... Be the first to leave a reply!