ninja_forms_register_form_duplicate

The Ninja Forms ninja forms register form duplicate function.

Description

ninja_forms_register_form_duplicate(); 

Usage

  1. if ( !function_exists( 'ninja_forms_register_form_duplicate' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/pages/ninja-forms/tabs/form-list/form-list.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_register_form_duplicate(); 
  7.  

Defined (1)

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

/deprecated/includes/admin/pages/ninja-forms/tabs/form-list/form-list.php  
  1. function ninja_forms_register_form_duplicate() { 
  2. if ( isset ( $_REQUEST['duplicate_form'] ) AND $_REQUEST['duplicate_form'] == 1 ) { 
  3. $form_id = absint( $_REQUEST['form_id'] ); 
  4. $form_row = ninja_forms_serialize_form( $form_id ); 
  5. ninja_forms_import_form( $form_row ); 
  6. $url = esc_url_raw( remove_query_arg( array( 'duplicate_form', 'form_id' ) ) ); 
  7. wp_redirect( $url );