diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
index ea33d9d792..adc11ea021 100644
|
a
|
b
|
function wp_ajax_query_themes() { |
| 3571 | 3571 | ) |
| 3572 | 3572 | ); |
| 3573 | 3573 | |
| 3574 | | $theme->num_ratings = number_format_i18n( $theme->num_ratings ); |
| 3575 | | $theme->preview_url = set_url_scheme( $theme->preview_url ); |
| | 3574 | $theme->num_ratings = number_format_i18n( $theme->num_ratings ); |
| | 3575 | $theme->preview_url = set_url_scheme( $theme->preview_url ); |
| | 3576 | $theme->wp_compatible = is_wp_version_compatible( $theme->requires ); |
| | 3577 | $theme->php_compatible = is_php_version_compatible( $theme->requires_php ); |
| 3576 | 3578 | } |
| 3577 | 3579 | |
| 3578 | 3580 | wp_send_json_success( $api ); |
diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php
index 944e9d7d0a..1516b792a9 100644
|
a
|
b
|
if ( $tab ) { |
| 293 | 293 | <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button> |
| 294 | 294 | <# } #> |
| 295 | 295 | <# } else { #> |
| 296 | | <?php |
| 297 | | /* translators: %s: Theme name. */ |
| 298 | | $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' ); |
| 299 | | ?> |
| 300 | | <a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a> |
| 301 | | <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button> |
| | 296 | <# if ( data.wp_compatible && data.php_compatible ) { #> |
| | 297 | <# /* translators: %s: Theme name. */ #> |
| | 298 | <# <?php $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' ); ?> #> |
| | 299 | <a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a> |
| | 300 | <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button> |
| | 301 | <# } else { #> |
| | 302 | <# /* translators: %s: Theme name. */ #> |
| | 303 | <# <?php $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' ); ?> #> |
| | 304 | <a class="button button-primary disabled" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a> |
| | 305 | <button class="button preview disabled"><?php _e( 'Preview' ); ?></button> |
| | 306 | <# } #> |
| 302 | 307 | <# } #> |
| 303 | 308 | </div> |
| 304 | 309 | </div> |
| … |
… |
if ( $tab ) { |
| 315 | 320 | <button class="previous-theme"><span class="screen-reader-text"><?php _e( 'Previous theme' ); ?></span></button> |
| 316 | 321 | <button class="next-theme"><span class="screen-reader-text"><?php _e( 'Next theme' ); ?></span></button> |
| 317 | 322 | <# if ( data.installed ) { #> |
| 318 | | <a class="button button-primary activate" href="{{ data.activate_url }}"><?php _e( 'Activate' ); ?></a> |
| | 323 | <# if ( data.wp_compatible && data.php_compatible ) { #> |
| | 324 | <a class="button button-primary activate" href="{{ data.activate_url }}"><?php _e( 'Activate' ); ?></a> |
| | 325 | <# } else { #> |
| | 326 | <a class="button button-primary activate disabled" ><?php _e( 'Activate' ); ?></a> |
| | 327 | <# } #> |
| 319 | 328 | <# } else { #> |
| 320 | | <a href="{{ data.install_url }}" class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a> |
| | 329 | <# if ( data.wp_compatible && data.php_compatible ) { #> |
| | 330 | <a href="{{ data.install_url }}" class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a> |
| | 331 | <# } else { #> |
| | 332 | <a class="button button-primary disabled" ><?php _e( 'Install' ); ?></a> |
| | 333 | <# } #> |
| 321 | 334 | <# } #> |
| 322 | 335 | </div> |
| 323 | 336 | <div class="wp-full-overlay-sidebar-content"> |