ninja_forms_sidebar_display_fields

The Ninja Forms ninja forms sidebar display fields function.

Description

ninja_forms_sidebar_display_fields( $slug ); 

Parameters (1)

0. $slug
The slug.

Usage

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

Defined (1)

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

/deprecated/includes/admin/sidebar-fields.php  
  1. function ninja_forms_sidebar_display_fields($slug) { 
  2. global $ninja_forms_fields, $current_tab; 
  3. if(is_array($ninja_forms_fields) AND isset($_REQUEST['form_id'])) { 
  4. foreach($ninja_forms_fields as $field_slug => $field) { 
  5. if($field['sidebar'] == $slug) { 
  6. if(isset($field['limit'])) { 
  7. $limit = $field['limit']; 
  8. }else{ 
  9. $limit = ''; 
  10. ?> 
  11. <p class="button-controls"> 
  12. <a class="button-secondary ninja-forms-new-field" id="<?php _e($field_slug, 'ninja-forms');?>" data-limit="<?php echo $limit; ?>" data-type="<?php echo $field_slug; ?>" href="#"><?php _e($field['name'], 'ninja-forms');?></a> 
  13. </p> 
  14. <?php