NF_AJAX_Processes_UpdateFields

The Ninja Forms NF AJAX Processes UpdateFields class.

Defined (1)

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

/includes/AJAX/Processes/UpdateFields.php  
  1. final class NF_AJAX_Processes_UpdateFields extends WP_Background_Process 
  2. protected $action = 'nf_update_fields'; 
  3.  
  4. protected function task( $item ) 
  5. if( ! isset( $item[ 'id' ] ) ) return false; 
  6. if( ! isset( $item[ 'settings' ] ) ) return false; 
  7.  
  8. $field = Ninja_Forms()->form()->get_field( $item[ 'id' ] ); 
  9.  
  10. $field->update_settings( $item[ 'settings' ] )->save(); 
  11.  
  12. return false;