acf_get_url()
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() 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, '/' );
}