the_row

The Advanced Custom Fields the row function.

Description

the_row(); 

This function will progress the global repeater or flexible content value 1 row


Usage

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

Defined (1)

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

/core/api.php  
  1. function the_row() { 
  2.  
  3. // vars 
  4. $depth = count( $GLOBALS['acf_field'] ) - 1; 
  5.  
  6.  
  7.  
  8. // increase row 
  9. $GLOBALS['acf_field'][ $depth ]['i']++; 
  10.  
  11.  
  12. // get row 
  13. $value = $GLOBALS['acf_field'][ $depth ]['value']; 
  14. $i = $GLOBALS['acf_field'][ $depth ]['i']; 
  15.  
  16.  
  17. // return 
  18. return $value[ $i ];