Changeset 2125904
- Timestamp:
- 07/19/2019 07:27:32 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cf7-phone-mask-field/trunk/cf7-phone-mask-field.php
r2125903 r2125904 102 102 // the attributes of the tag 103 103 $atts = array( 104 'type' => 'text', 105 'name' => $tag->name, 106 'id' => $tag->get_id_option(), 107 'class' => $tag->get_class_option( $class ), 108 'size' => $tag->get_size_option( '40' ), 109 'tabindex' => $tag->get_option( 'tabindex', 'int', true ), 110 'maxlength' => $tag->get_maxlength_option(), 111 'minlength' => $tag->get_minlength_option(), 112 'aria-invalid' => (string)$validation_error, 113 'value' => '', 104 'type' => 'text', 105 'name' => $tag->name, 106 'id' => $tag->get_id_option(), 107 'class' => $tag->get_class_option( $class ), 108 'size' => $tag->get_size_option( '40' ), 109 'tabindex' => $tag->get_option( 'tabindex', 'int', true ), 110 'maxlength' => $tag->get_maxlength_option(), 111 'minlength' => $tag->get_minlength_option(), 112 'aria-required' => (string)$tag->is_required(), 113 'aria-invalid' => (string)$validation_error, 114 'value' => '', 114 115 ); 115 116 116 117 if ( $atts['maxlength'] && $atts['minlength'] && $atts['maxlength'] < $atts['minlength'] ) { 117 118 unset( $atts['maxlength'], $atts['minlength'] ); 118 } 119 120 if ( $validation_error ) { 121 $atts['aria-invalid'] = true; 122 } 119 } 123 120 124 121 if ( $tag->has_option( 'readonly' ) ) { 125 122 $atts['readonly'] = 'readonly'; 126 }127 128 if ( $tag->is_required() ) {129 $atts['aria-required'] = 'true';130 123 } 131 124
Note: See TracChangeset
for help on using the changeset viewer.