Skip to content

Commit 3e3a3f4

Browse files
committed
Loop through available PHP versions
1 parent 26e5334 commit 3e3a3f4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

wpengine-phpcompat.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,10 @@ function settings_page() {
275275
<tr>
276276
<th scope="row"><label for="phptest_version"><?php esc_attr_e( 'PHP Version', 'php-compatibility-checker' ); ?></label></th>
277277
<td>
278-
<label><input type="radio" name="phptest_version" value="7.0" <?php checked( $test_version, '7.0', true ); ?>> PHP 7.0</label><br>
279-
<label><input type="radio" name="phptest_version" value="5.6" <?php checked( $test_version, '5.6', true ); ?>> PHP 5.6</label><br>
280-
<label><input type="radio" name="phptest_version" value="5.5" <?php checked( $test_version, '5.5', true ); ?>> PHP 5.5</label><br>
281-
<label><input type="radio" name="phptest_version" value="5.4" <?php checked( $test_version, '5.4', true ); ?>> PHP 5.4</label><br>
282-
<label><input type="radio" name="phptest_version" value="5.3" <?php checked( $test_version, '5.3', true ); ?>> PHP 5.3</label>
278+
<?php foreach( $phpversions as $name => $version ) {
279+
printf( '<label><input type="radio" name="phptest_version" value="%s" %s /> %s</label><br>', $version, checked( $test_version, $version, false ), $name );
280+
}
281+
?>
283282
</td>
284283
</tr>
285284
<tr>

0 commit comments

Comments
 (0)