NF_AJAX_REST_NewFormTemplates

The Ninja Forms NF AJAX REST NewFormTemplates class.

Defined (1)

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

/includes/AJAX/REST/NewFormTemplates.php  
  1. class NF_AJAX_REST_NewFormTemplates extends NF_AJAX_REST_Controller 
  2. protected $action = 'nf_new_form_templates'; 
  3.  
  4. /** 
  5. * GET new-form-templates/ 
  6. * @return array [ $new_form_templates ] 
  7. */ 
  8. public function get() 
  9. $templates = Ninja_Forms()->config( 'NewFormTemplates' ); 
  10. array_unshift( $templates, array( 
  11. 'id' => 'new',  
  12. 'title' => __( 'Blank Form', 'ninja-forms' ),  
  13. 'template-desc' => __( 'The blank form allows you to create any type of form using our drag & drop builder.' ) 
  14. ) ); 
  15. return array_values( $templates ); // Remove keys so that the JSON is an array. 
  16.