Changeset 52020
- Timestamp:
- 11/05/2021 05:57:40 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/themes.php
r51475 r52020 364 364 365 365 foreach ( $themes as $theme ) : 366 $aria_action = esc_attr( $theme['id'] . '-action' );367 $aria_name = esc_attr( $theme['id'] . '-name' );366 $aria_action = $theme['id'] . '-action'; 367 $aria_name = $theme['id'] . '-name'; 368 368 369 369 $active_class = ''; … … 375 375 <?php if ( ! empty( $theme['screenshot'][0] ) ) { ?> 376 376 <div class="theme-screenshot"> 377 <img src="<?php echo $theme['screenshot'][0]; ?>" alt="" />377 <img src="<?php echo esc_attr( $theme['screenshot'][0] ); ?>" alt="" /> 378 378 </div> 379 379 <?php } else { ?> … … 509 509 $details_aria_label = sprintf( _x( 'View Theme Details for %s', 'theme' ), $theme['name'] ); 510 510 ?> 511 <button type="button" aria-label="<?php echo esc_attr( $details_aria_label ); ?>" class="more-details" id="<?php echo $aria_action; ?>"><?php _e( 'Theme Details' ); ?></button>511 <button type="button" aria-label="<?php echo esc_attr( $details_aria_label ); ?>" class="more-details" id="<?php echo esc_attr( $aria_action ); ?>"><?php _e( 'Theme Details' ); ?></button> 512 512 <div class="theme-author"> 513 513 <?php … … 519 519 <div class="theme-id-container"> 520 520 <?php if ( $theme['active'] ) { ?> 521 <h2 class="theme-name" id="<?php echo $aria_name; ?>">521 <h2 class="theme-name" id="<?php echo esc_attr( $aria_name ); ?>"> 522 522 <span><?php _ex( 'Active:', 'theme' ); ?></span> <?php echo $theme['name']; ?> 523 523 </h2> 524 524 <?php } else { ?> 525 <h2 class="theme-name" id="<?php echo $aria_name; ?>"><?php echo $theme['name']; ?></h2>525 <h2 class="theme-name" id="<?php echo esc_attr( $aria_name ); ?>"><?php echo $theme['name']; ?></h2> 526 526 <?php } ?> 527 527 … … 900 900 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 901 901 ?> 902 <a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>902 <a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a> 903 903 <?php 904 904 /* translators: %s: Theme name. */ … … 1118 1118 ?> 1119 1119 <# if ( data.actions.activate ) { #> 1120 <a href="{{{ data.actions.activate }}}" class="button activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>1120 <a href="{{{ data.actions.activate }}}" class="button activate" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a> 1121 1121 <# } #> 1122 1122 <a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a> … … 1127 1127 ?> 1128 1128 <# if ( data.actions.activate ) { #> 1129 <a class="button disabled" aria-label="<?php echo $aria_label; ?>"><?php _ex( 'Cannot Activate', 'theme' ); ?></a>1129 <a class="button disabled" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Activate', 'theme' ); ?></a> 1130 1130 <# } #> 1131 1131 <a class="button button-primary hide-if-no-customize disabled"><?php _e( 'Live Preview' ); ?></a> … … 1138 1138 $aria_label = sprintf( _x( 'Delete %s', 'theme' ), '{{ data.name }}' ); 1139 1139 ?> 1140 <a href="{{{ data.actions['delete'] }}}" class="button delete-theme" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Delete' ); ?></a>1140 <a href="{{{ data.actions['delete'] }}}" class="button delete-theme" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Delete' ); ?></a> 1141 1141 <# } #> 1142 1142 </div>
Note: See TracChangeset
for help on using the changeset viewer.