Changeset 47819
- Timestamp:
- 05/18/2020 04:01:38 PM (6 weeks ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/theme.php
r47818 r47819 828 828 <# } #> 829 829 <# } else { #> 830 <button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></button> 831 <button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php _e( 'Install & Preview' ); ?></button> 830 <# if ( data.compatibleWP && data.compatiblePHP ) { #> 831 <button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></button> 832 <button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php _e( 'Install & Preview' ); ?></button> 833 <# } else { #> 834 <button type="button" class="button disabled"><?php _ex( 'Cannot Install', 'theme' ); ?></button> 835 <button type="button" class="button button-primary disabled"><?php _e( 'Install & Preview' ); ?></button> 836 <# } #> 832 837 <# } #> 833 838 </div> -
trunk/src/wp-admin/theme-install.php
r47817 r47819 312 312 <# } #> 313 313 <# } else { #> 314 <?php 315 /* translators: %s: Theme name. */ 316 $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' ); 317 ?> 318 <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> 319 <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button> 314 <# if ( data.compatible_wp && data.compatible_php ) { #> 315 <?php 316 /* translators: %s: Theme name. */ 317 $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' ); 318 ?> 319 <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> 320 <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button> 321 <# } else { #> 322 <?php 323 /* translators: %s: Theme name. */ 324 $aria_label = sprintf( __( 'Cannot Install %s' ), '{{ data.name }}' ); 325 ?> 326 <a class="button button-primary disabled" data-name="{{ data.name }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Install', 'theme' ); ?></a> 327 <button class="button disabled"><?php _e( 'Preview' ); ?></button> 328 <# } #> 320 329 <# } #> 321 330 </div> … … 334 343 <button class="next-theme"><span class="screen-reader-text"><?php _e( 'Next theme' ); ?></span></button> 335 344 <# if ( data.installed ) { #> 336 <a class="button button-primary activate" href="{{ data.activate_url }}"><?php _e( 'Activate' ); ?></a> 345 <# if ( data.compatible_wp && data.compatible_php ) { #> 346 <a class="button button-primary activate" href="{{ data.activate_url }}"><?php _e( 'Activate' ); ?></a> 347 <# } else { #> 348 <a class="button button-primary disabled" ><?php _ex( 'Cannot Activate', 'theme' ); ?></a> 349 <# } #> 337 350 <# } else { #> 338 <a href="{{ data.install_url }}" class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a> 351 <# if ( data.compatible_wp && data.compatible_php ) { #> 352 <a href="{{ data.install_url }}" class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a> 353 <# } else { #> 354 <a class="button button-primary disabled" ><?php _ex( 'Cannot Install', 'theme' ); ?></a> 355 <# } #> 339 356 <# } #> 340 357 </div> -
trunk/src/wp-includes/class-wp-customize-manager.php
r47663 r47819 5854 5854 5855 5855 // Map available theme properties to installed theme properties. 5856 $theme->id = $theme->slug; 5857 $theme->screenshot = array( $theme->screenshot_url ); 5858 $theme->authorAndUri = wp_kses( $theme->author['display_name'], $themes_allowedtags ); 5856 $theme->id = $theme->slug; 5857 $theme->screenshot = array( $theme->screenshot_url ); 5858 $theme->authorAndUri = wp_kses( $theme->author['display_name'], $themes_allowedtags ); 5859 $theme->compatibleWP = is_wp_version_compatible( $theme->requires ); 5860 $theme->compatiblePHP = is_php_version_compatible( $theme->requires_php ); 5859 5861 5860 5862 if ( isset( $theme->parent ) ) { -
trunk/src/wp-includes/customize/class-wp-customize-theme-control.php
r47816 r47819 134 134 <h3 class="theme-name" id="{{ data.section }}-{{ data.theme.id }}-name">{{ data.theme.name }}</h3> 135 135 <div class="theme-actions"> 136 <button type="button" class="button button-primary theme-install preview" aria-label="<?php echo esc_attr( $install_label ); ?>" data-slug="{{ data.theme.id }}" data-name="{{ data.theme.name }}"><?php _e( 'Install & Preview' ); ?></button> 136 <# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #> 137 <button type="button" class="button button-primary theme-install preview" aria-label="<?php echo esc_attr( $install_label ); ?>" data-slug="{{ data.theme.id }}" data-name="{{ data.theme.name }}"><?php _e( 'Install & Preview' ); ?></button> 138 <# } else { #> 139 <button type="button" class="button button-primary disabled" aria-label="<?php echo esc_attr( $install_label ); ?>" disabled><?php _e( 'Install & Preview' ); ?></button> 140 <# } #> 137 141 </div> 138 142 </div>
Note: See TracChangeset
for help on using the changeset viewer.