ninja_forms_field_filter_list_wrap_class

The Ninja Forms ninja forms field filter list wrap class function.

Description

ninja_forms_field_filter_list_wrap_class( $field_wrap_class, $field_id ); 

Parameters (2)

0. $field_wrap_class
The field wrap class.
1. $field_id
The field id.

Usage

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

Defined (1)

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

/deprecated/includes/fields/list.php  
  1. function ninja_forms_field_filter_list_wrap_class( $field_wrap_class, $field_id ) { 
  2. $field_row = ninja_forms_get_field_by_id( $field_id ); 
  3. $field_type = $field_row['type']; 
  4. if( $field_type == '_list' ) { 
  5. $field_data = $field_row['data']; 
  6. if( isset( $field_data['list_type'] ) ) { 
  7. $list_type = $field_data['list_type']; 
  8. }else{ 
  9. $list_type = ''; 
  10.  
  11. $field_wrap_class = str_replace( 'list-wrap', 'list-'.$list_type.'-wrap', $field_wrap_class ); 
  12.  
  13. return $field_wrap_class;