ninja_forms_get_all_forms

The Ninja Forms ninja forms get all function.

Description

ninja_forms_get_all_forms( (bool) $debug = false ); 

Parameters (1)

0. $debug — Optional. (bool) => false
The debug.

Usage

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

Defined (2)

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

/deprecated/includes/deprecated.php  
  1. function ninja_forms_get_all_forms( $debug = false ) { 
  2. $forms = Ninja_Forms()->forms()->get_all(); 
  3.  
  4. $tmp_array = array(); 
  5. $x = 0; 
  6. foreach ( $forms as $form_id ) { 
  7. $tmp_array[ $x ]['id'] = $form_id; 
  8. $tmp_array[ $x ]['data'] = Ninja_Forms()->form( $form_id )->get_all_settings(); 
  9. $tmp_array[ $x ]['name'] = Ninja_Forms()->form( $form_id )->get_setting( 'form_title' ); 
  10. $x++; 
  11.  
  12. return $tmp_array; 
/includes/deprecated.php  
  1. function ninja_forms_get_all_forms() { 
  2. // Ninja_Forms::deprecated_notice( 'ninja_forms_get_all_forms', '3.0', 'Ninja_Forms()->form()->get_forms()', debug_backtrace() ); 
  3. $forms = array(); 
  4. foreach( Ninja_Forms()->form()->get_forms() as $form ) { 
  5. $forms[] = array( 
  6. 'id' => $form->get_id(),  
  7. 'data' => $form->get_settings(),  
  8. 'name' => $form->get_setting( 'title' ) 
  9. ); 
  10. return $forms;