Coding Standards: Improve escaping in `wp-admin/theme-install.php`.
* Rename a duplicate `$feature_name` variable to `$feature_group` for clarity. * Escape the remaining `$feature_name` variable. Follow-up to [27636], [35273]. Props sabbirshouvo, sabernhardt, mukesh27, afragen. Fixes #54277. Built from https://develop.svn.wordpress.org/trunk@51923 git-svn-id: http://core.svn.wordpress.org/trunk@51516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b54ec08215
commit
e6ede0c816
|
@ -221,15 +221,14 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||||
// and to ensure tags are translated.
|
// and to ensure tags are translated.
|
||||||
$feature_list = get_theme_feature_list( false );
|
$feature_list = get_theme_feature_list( false );
|
||||||
|
|
||||||
foreach ( $feature_list as $feature_name => $features ) {
|
foreach ( $feature_list as $feature_group => $features ) {
|
||||||
echo '<fieldset class="filter-group">';
|
echo '<fieldset class="filter-group">';
|
||||||
$feature_name = esc_html( $feature_name );
|
echo '<legend>' . esc_html( $feature_group ) . '</legend>';
|
||||||
echo '<legend>' . $feature_name . '</legend>';
|
|
||||||
echo '<div class="filter-group-feature">';
|
echo '<div class="filter-group-feature">';
|
||||||
foreach ( $features as $feature => $feature_name ) {
|
foreach ( $features as $feature => $feature_name ) {
|
||||||
$feature = esc_attr( $feature );
|
$feature = esc_attr( $feature );
|
||||||
echo '<input type="checkbox" id="filter-id-' . $feature . '" value="' . $feature . '" /> ';
|
echo '<input type="checkbox" id="filter-id-' . $feature . '" value="' . $feature . '" /> ';
|
||||||
echo '<label for="filter-id-' . $feature . '">' . $feature_name . '</label>';
|
echo '<label for="filter-id-' . $feature . '">' . esc_html( $feature_name ) . '</label>';
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</fieldset>';
|
echo '</fieldset>';
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.9-alpha-51922';
|
$wp_version = '5.9-alpha-51923';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue