acf

The Advanced Custom Fields acf function.

Description

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: $acf = acf" title="acf" class="code function">acf(); ?>


Usage

  1. if ( !function_exists( 'acf' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'advanced-custom-fields/acf.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = acf(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/acf.php  
  1. function acf() 
  2. global $acf; 
  3.  
  4. if( !isset($acf) ) 
  5. $acf = new acf(); 
  6.  
  7. return $acf;