ninja_forms_display_field_desc

The Ninja Forms ninja forms display field desc function.

Description

ninja_forms_display_field_desc( $field_id, $data ); 

Parameters (2)

0. $field_id
The field id.
1. $data
The data.

Usage

  1. if ( !function_exists( 'ninja_forms_display_field_desc' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/display/fields/desc.php'; 
  3.  
  4. // The field id. 
  5. $field_id = null; 
  6.  
  7. // The data. 
  8. $data = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = ninja_forms_display_field_desc($field_id, $data); 
  12.  

Defined (1)

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

/deprecated/includes/display/fields/desc.php  
  1. function ninja_forms_display_field_desc( $field_id, $data ) { 
  2. $plugin_settings = nf_get_settings(); 
  3.  
  4. $class = apply_filters( 'ninja_forms_display_field_desc_class', 'ninja-forms-field-description', $field_id ); 
  5.  
  6. if ( ( isset( $data['show_desc'] ) and $data['show_desc'] == 1 ) and isset( $data['desc_text'] ) ) { 
  7. echo '<div class="' . $class . '">'; 
  8. echo do_shortcode( wpautop( $data['desc_text'] ) ); 
  9. echo '</div>';