acf_get_url()ACF 5.6.8

acf_get_url

Returns the plugin url to a specified file. This function also defines the ACF_URL constant.

No Hooks.

Returns

string.

Usage

acf_get_url( $filename );
$filename(string)
The specified file.
Default: ''

Changelog

Since 5.6.8 Introduced.

acf_get_url() code ACF 6.8.8

function acf_get_url( $filename = '' ) {
	if ( ! defined( 'ACF_URL' ) ) {
		define( 'ACF_URL', acf_get_setting( 'url' ) );
	}
	return ACF_URL . ltrim( $filename, '/' );
}