wpcf7_listo

The Contact Form 7 wpcf7 listo function.

Description

wpcf7_listo( $data, $options, $args ); 

Parameters (3)

0. $data
The data.
1. $options
The options.
2. $args
The args.

Usage

  1. if ( !function_exists( 'wpcf7_listo' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/modules/listo.php'; 
  3.  
  4. // The data. 
  5. $data = null; 
  6.  
  7. // The options. 
  8. $options = null; 
  9.  
  10. // The args. 
  11. $args = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = wpcf7_listo($data, $options, $args); 
  15.  

Defined (1)

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

/modules/listo.php  
  1. function wpcf7_listo( $data, $options, $args ) { 
  2. if ( ! function_exists( 'listo' ) ) { 
  3. return $data; 
  4.  
  5. $args = wp_parse_args( $args, array() ); 
  6.  
  7. $contact_form = wpcf7_get_current_contact_form(); 
  8. $args['locale'] = $contact_form->locale(); 
  9.  
  10. foreach ( (array) $options as $option ) { 
  11. $option = explode( '.', $option ); 
  12. $type = $option[0]; 
  13. $args['group'] = isset( $option[1] ) ? $option[1] : null; 
  14.  
  15. if ( $list = listo( $type, $args ) ) { 
  16. $data = array_merge( (array) $data, $list ); 
  17.  
  18. return $data;