← All changes
|
src/Admin/Framework/fields/button_set/button_set.php
+3
-7
1.5.3
→
1.3.2
View file →
| @@ -44,15 +44,11 @@ | ||
| 44 | 44 | $extra = ( $args['multiple'] ) ? '[]' : ''; |
| 45 | 45 | $active = ( in_array( $key, $value ) || ( empty( $value ) && empty( $key ) ) ) ? ' darkify--active' : ''; |
| 46 | 46 | $checked = ( in_array( $key, $value ) || ( empty( $value ) && empty( $key ) ) ) ? ' checked' : ''; |
| 47 | 47 | |
| 48 | - $option_label = is_array( $option ) ? ( isset( $option['label'] ) ? $option['label'] : '' ) : $option; | |
| 49 | - $option_disabled = is_array( $option ) && ! empty( $option['disabled'] ) ? ' disabled' : ''; | |
| 50 | - $pro_only_class = $option_disabled ? ' darkify-pro-only' : ''; | |
| 51 | - | |
| 52 | - echo '<div class="darkify--sibling darkify--button' . esc_attr( $active ) . esc_attr( $pro_only_class ) . '">'; | |
| 53 | - echo '<input' . esc_attr( $option_disabled ) . ' type="' . esc_attr( $type ) . '" name="' . esc_attr( $this->field_name( $extra ) ) . '" value="' . esc_attr( $key ) . '"' . wp_kses_post( $this->field_attributes() ) . esc_attr( $checked ) . '/>'; | |
| 54 | - echo esc_html( $option_label ); | |
| 48 | + echo '<div class="darkify--sibling darkify--button' . esc_attr( $active ) . '">'; | |
| 49 | + echo '<input type="' . esc_attr( $type ) . '" name="' . esc_attr( $this->field_name( $extra ) ) . '" value="' . esc_attr( $key ) . '"' . wp_kses_post( $this->field_attributes() ) . esc_attr( $checked ) . '/>'; | |
| 50 | + echo esc_html($option); | |
| 55 | 51 | echo '</div>'; |
| 56 | 52 | |
| 57 | 53 | } |
| 58 | 54 | |