@@ 78-91 (lines=14) @@ | ||
75 | // Start field type switch case. |
|
76 | switch ( $args['type'] ) { |
|
77 | /* Targets all select input type elements, except the country and state select input types */ |
|
78 | case 'select' : |
|
79 | // Add a class to the field's html element wrapper - woocommerce |
|
80 | // input types (fields) are often wrapped within a <p></p> tag. |
|
81 | $args['class'][] = 'form-group'; |
|
82 | // Add a class to the form input itself. |
|
83 | $args['input_class'] = array( 'form-control', 'input-lg' ); |
|
84 | $args['label_class'] = array( 'control-label' ); |
|
85 | $args['custom_attributes'] = array( |
|
86 | 'data-plugin' => 'select2', |
|
87 | 'data-allow-clear' => 'true', |
|
88 | 'aria-hidden' => 'true', |
|
89 | // Add custom data attributes to the form input itself. |
|
90 | ); |
|
91 | break; |
|
92 | // By default WooCommerce will populate a select with the country names - $args |
|
93 | // defined for this specific input type targets only the country select element. |
|
94 | case 'country' : |
|
@@ 100-111 (lines=12) @@ | ||
97 | break; |
|
98 | // By default WooCommerce will populate a select with state names - $args defined |
|
99 | // for this specific input type targets only the country select element. |
|
100 | case 'state' : |
|
101 | // Add class to the field's html element wrapper. |
|
102 | $args['class'][] = 'form-group'; |
|
103 | // add class to the form input itself. |
|
104 | $args['input_class'] = array( '', 'input-lg' ); |
|
105 | $args['label_class'] = array( 'control-label' ); |
|
106 | $args['custom_attributes'] = array( |
|
107 | 'data-plugin' => 'select2', |
|
108 | 'data-allow-clear' => 'true', |
|
109 | 'aria-hidden' => 'true', |
|
110 | ); |
|
111 | break; |
|
112 | case 'password' : |
|
113 | case 'text' : |
|
114 | case 'email' : |