ninja_forms_update_form

Old update form function.

Description

ninja_forms_update_form( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'ninja_forms_update_form' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/deprecated.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = ninja_forms_update_form($args); 
  9.  

Defined (1)

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

/deprecated/includes/deprecated.php  
  1. function ninja_forms_update_form( $args ) { 
  2. // Get our form id 
  3. $form_id = $args['where']['id']; 
  4. $update_array = $args['update_array']; 
  5. if ( isset ( $update_array['data'] ) ) { 
  6. $data = maybe_unserialize( $update_array['data'] ); 
  7. if ( is_array( $data ) ) { 
  8. foreach ( $data as $key => $val ) { 
  9. Ninja_Forms()->form( $form_id )->update_setting( $key, $val ); 
  10. }  
  11. unset( $update_array['data'] );  
  12.  
  13. foreach ( $update_array as $key => $val ) { 
  14. Ninja_Forms()->form( $form_id )->update_setting( $key, $val ); 
  15.  
  16. Ninja_Forms()->form( $form_id )->dump_cache(); 
  17.