Changeset 47816 for trunk/src/wp-admin/themes.php
- Timestamp:
- 05/18/2020 12:30:04 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/themes.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/themes.php
r47808 r47816 354 354 <a class="button button-primary customize load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Customize' ); ?></a> 355 355 <?php } ?> 356 <?php } else { ?>356 <?php } elseif ( $theme['compatibleWP'] && $theme['compatiblePHP'] ) { ?> 357 357 <?php 358 358 /* translators: %s: Theme name. */ … … 362 362 <?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?> 363 363 <a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a> 364 <?php } ?> 365 <?php } else { ?> 366 <?php 367 /* translators: %s: Theme name. */ 368 $aria_label = sprintf( _x( 'Cannot Activate %s', 'theme' ), '{{ data.name }}' ); 369 ?> 370 <a class="button disabled" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Activate', 'theme' ); ?></a> 371 <?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?> 372 <a class="button button-primary hide-if-no-customize disabled"><?php _e( 'Live Preview' ); ?></a> 364 373 <?php } ?> 365 374 <?php } ?> … … 519 528 <# } #> 520 529 <# } else { #> 521 <?php 522 /* translators: %s: Theme name. */ 523 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 524 ?> 525 <a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a> 526 <a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a> 530 <# if ( data.compatibleWP && data.compatiblePHP ) { #> 531 <?php 532 /* translators: %s: Theme name. */ 533 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 534 ?> 535 <a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a> 536 <a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a> 537 <# } else { #> 538 <?php 539 /* translators: %s: Theme name. */ 540 $aria_label = sprintf( _x( 'Cannot Activate %s', 'theme' ), '{{ data.name }}' ); 541 ?> 542 <a class="button disabled" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Activate', 'theme' ); ?></a> 543 <a class="button button-primary hide-if-no-customize disabled"><?php _e( 'Live Preview' ); ?></a> 544 <# } #> 527 545 <# } #> 528 546 </div> … … 593 611 </div> 594 612 <div class="inactive-theme"> 595 <?php 596 /* translators: %s: Theme name. */ 597 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 598 ?> 599 <# if ( data.actions.activate ) { #> 600 <a href="{{{ data.actions.activate }}}" class="button activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a> 613 <# if ( data.compatibleWP && data.compatiblePHP ) { #> 614 <?php 615 /* translators: %s: Theme name. */ 616 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 617 ?> 618 <# if ( data.actions.activate ) { #> 619 <a href="{{{ data.actions.activate }}}" class="button activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a> 620 <# } #> 621 <a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a> 622 <# } else { #> 623 <?php 624 /* translators: %s: Theme name. */ 625 $aria_label = sprintf( _x( 'Cannot Activate %s', 'theme' ), '{{ data.name }}' ); 626 ?> 627 <# if ( data.actions.activate ) { #> 628 <a class="button disabled" aria-label="<?php echo $aria_label; ?>"><?php _ex( 'Cannot Activate', 'theme' ); ?></a> 629 <# } #> 630 <a class="button button-primary hide-if-no-customize disabled"><?php _e( 'Live Preview' ); ?></a> 601 631 <# } #> 602 <a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a>603 632 </div> 604 633
Note:
See TracChangeset
for help on using the changeset viewer.