ninja_forms_sidebar_def_fields

The Ninja Forms ninja forms sidebar def fields function.

Description

ninja_forms_sidebar_def_fields(); 

Usage

  1. if ( !function_exists( 'ninja_forms_sidebar_def_fields' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/def-fields.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_sidebar_def_fields(); 
  7.  

Defined (1)

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

/deprecated/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/def-fields.php  
  1. function ninja_forms_sidebar_def_fields() { 
  2. global $wpdb, $ninja_forms_fields; 
  3. $field_results = ninja_forms_get_all_defs(); 
  4.  
  5. if(is_array($field_results)) { 
  6. foreach($field_results as $field) { 
  7. $data = $field['data']; 
  8. $name = $field['name']; 
  9. $field_id = $field['id']; 
  10. $type = $field['type']; 
  11. $reg_field = $ninja_forms_fields[$type]; 
  12. $limit = $reg_field['limit']; 
  13.  
  14. ?> 
  15. <p class="button-controls" id="ninja_forms_insert_def_field_<?php echo $field_id;?>_p"> 
  16. <a class="button-secondary ninja-forms-insert-def-field" id="ninja_forms_insert_def_field_<?php echo $field_id;?>" data-limit="<?php echo $limit; ?>" data-field="<?php echo $field_id; ?>" data-type="<?php echo $type; ?>" href="#" ><?php _e( $name, 'ninja-forms' ); ?></a> 
  17. </p> 
  18. <?php