ninja_forms_insert_sub

Ninja_forms_insert_sub() has been deprecated in favour of Ninja_Forms()->subs()->create( $form_id ); Because submissions are now a CPT, this function will only return false.

Description

ninja_forms_insert_sub( $args ); 

Please replace any instances of this function with the replacement.

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'ninja_forms_insert_sub' ) ) { 
  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_insert_sub($args); 
  9.  

Defined (1)

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

/deprecated/includes/deprecated.php  
  1. function ninja_forms_insert_sub( $args ) { 
  2.  
  3. if ( ! isset ( $args['form_id'] ) ) 
  4. return false; 
  5.  
  6. $form_id = $args['form_id']; 
  7.  
  8. $sub_id = Ninja_Forms()->subs()->create( $form_id ); 
  9. $args['sub_id'] = $sub_id; 
  10.  
  11.  
  12. return $sub_id;