um_admin_pre_save_field_to_form

The Ultimate Member um admin pre save field to form function.

Description

um_admin_pre_save_field_to_form( $array ); 

Parameters (1)

0. $array
The array.

Usage

  1. if ( !function_exists( 'um_admin_pre_save_field_to_form' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ultimate-member/admin/core/um-admin-filters-fields.php'; 
  3.  
  4. // The array. 
  5. $array = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = um_admin_pre_save_field_to_form($array); 
  9.  

Defined (1)

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

/admin/core/um-admin-filters-fields.php  
  1. function um_admin_pre_save_field_to_form( $array ) { 
  2. unset( $array['conditions'] ); 
  3. if ( isset($array['conditional_field']) && !empty( $array['conditional_action'] ) && !empty( $array['conditional_operator'] ) ) { 
  4. $array['conditions'][] = array( $array['conditional_action'], $array['conditional_field'], $array['conditional_operator'], $array['conditional_value'] ); 
  5.  
  6. if ( isset($array['conditional_field1']) && !empty( $array['conditional_'] ) && !empty( $array['conditional_operator1'] ) ) { 
  7. $array['conditions'][] = array( $array['conditional_'], $array['conditional_field1'], $array['conditional_operator1'], $array['conditional_value1'] ); 
  8.  
  9. if ( isset($array['conditional_field2']) && !empty( $array['conditional_'] ) && !empty( $array['conditional_operator2'] ) ) { 
  10. $array['conditions'][] = array( $array['conditional_'], $array['conditional_field2'], $array['conditional_operator2'], $array['conditional_value2'] ); 
  11.  
  12. if ( isset($array['conditional_field3']) && !empty( $array['conditional_'] ) && !empty( $array['conditional_operator3'] ) ) { 
  13. $array['conditions'][] = array( $array['conditional_'], $array['conditional_field3'], $array['conditional_operator3'], $array['conditional_value3'] ); 
  14.  
  15. if ( isset($array['conditional_field4']) && !empty( $array['conditional_'] ) && !empty( $array['conditional_operator4'] ) ) { 
  16. $array['conditions'][] = array( $array['conditional_'], $array['conditional_field4'], $array['conditional_operator4'], $array['conditional_value4'] ); 
  17.  
  18. return $array;