ninja_forms_register_field_desc

The Ninja Forms ninja forms register field desc function.

Description

ninja_forms_register_field_desc(); 

Usage

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

Defined (1)

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

/deprecated/includes/fields/desc.php  
  1. function ninja_forms_register_field_desc() { 
  2. $args = array( 
  3. 'name' => __( 'Text', 'ninja-forms' ),  
  4. 'sidebar' => 'layout_fields',  
  5. 'edit_function' => '',  
  6. 'edit_options' => array( 
  7. array( 
  8. 'type' => 'rte',  
  9. 'name' => 'default_value',  
  10. 'label' => __( 'Default Value', 'ninja-forms' ),  
  11. 'width' => 'wide',  
  12. 'class' => 'widefat',  
  13. ),  
  14. array( 
  15. 'type' => 'select',  
  16. 'name' => 'desc_el',  
  17. 'label' => __( 'Text Element', 'ninja-forms' ),  
  18. 'width' => 'thin',  
  19. 'class' => '',  
  20. 'options' => array( 
  21. array('name' => 'div', 'value' => 'div'),  
  22. array('name' => 'h1', 'value' => 'h1'),  
  23. array('name' => 'h2', 'value' => 'h2'),  
  24. array('name' => 'h3', 'value' => 'h3'),  
  25. array('name' => 'h4', 'value' => 'h4'),  
  26. array('name' => 'h5', 'value' => 'h5'),  
  27. array('name' => 'h6', 'value' => 'h6'),  
  28. array('name' => 'p', 'value' => 'p'),  
  29. array('name' => 'span', 'value' => 'span'),  
  30. ),  
  31. ),  
  32. ),  
  33. 'display_function' => 'ninja_forms_field_desc_display',  
  34. 'group' => 'layout_elements',  
  35. 'display_label' => false,  
  36. 'display_wrap' => false,  
  37. 'edit_label' => true,  
  38. 'edit_label_pos' => false,  
  39. 'edit_req' => false,  
  40. 'edit_custom_class' => true,  
  41. 'edit_help' => false,  
  42. 'edit_meta' => false,  
  43. 'edit_conditional' => true,  
  44. 'process_field' => false,  
  45. 'pre_process' => 'ninja_forms_field_desc_pre_process',  
  46. 'esc_html' => false,  
  47. ); 
  48.  
  49. ninja_forms_register_field('_desc', $args);