Skip to content
Snippets Groups Projects
Commit 77fb08da authored by dyszczo's avatar dyszczo
Browse files

support for number as string values

parent 44d0417c
No related branches found
No related tags found
1 merge request!2Feature/field and templates
Pipeline #4361 failed
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<?php foreach ( $field->get_possible_values() as $possible_value => $label ): ?> <?php foreach ( $field->get_possible_values() as $possible_value => $label ): ?>
<option <option
<?php if ( $possible_value === $value ): ?>selected="selected"<?php endif; ?> <?php if ( $possible_value === $value || (is_numeric($possible_value) && is_numeric($value) && (int) $possible_value === (int) $value )): ?>selected="selected"<?php endif; ?>
value="<?php echo esc_attr( $possible_value ); ?>" value="<?php echo esc_attr( $possible_value ); ?>"
><?php echo esc_html( $label ); ?></option> ><?php echo esc_html( $label ); ?></option>
<?php endforeach; ?> <?php endforeach; ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment