acf()
The main function responsible for returning the one true acf Instance to functions everywhere. Use this function like you would a global variable, except without needing to declare the global.
Example: <?php $acf = acf(); ?>
No Hooks.
Returns
ACF.
Usage
acf();
Changelog
| Since 4.3.0 | Introduced. |
acf() acf code ACF 6.8.8
function acf() {
global $acf;
// Instantiate only once.
if ( ! isset( $acf ) ) {
$acf = new ACF();
$acf->initialize();
}
return $acf;
}