Advertisements

content_url

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

Advertisements

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: