Make WordPress Core


Ignore:
Timestamp:
09/20/2023 09:01:02 PM (5 months ago)
Author:
joedolson
Message:

Administration: Improve control proximity in theme details modal.

Make the theme details modals in the Customizer and at Appearance > Themes consistent. Change the order of controls so both modals are in the same sequence, center all controls in both desktop and mobile views, and change delete link color to meet color contrast requirements.

Props trishasalas, afercia, melchoyce, karmatosed, cathibosco1, michaelarestad, joedolson, petitphp, mikinc860.
Fixes #59372. See #59371, #40822.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/themes.php

    r56600 r56639  
    12221222                    $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
    12231223                    ?>
     1224                    <# if ( ! data.blockTheme ) { #>
     1225                        <a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a>
     1226                    <# } #>
    12241227                    <# if ( data.actions.activate ) { #>
    12251228                        <a href="{{{ data.actions.activate }}}" class="button activate" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
    12261229                    <# } #>
    1227                     <# if ( ! data.blockTheme ) { #>
    1228                         <a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a>
    1229                     <# } #>
    12301230                <# } else { #>
    12311231                    <?php
     
    12331233                    $aria_label = sprintf( _x( 'Cannot Activate %s', 'theme' ), '{{ data.name }}' );
    12341234                    ?>
     1235                    <# if ( ! data.blockTheme ) { #>
     1236                        <a class="button button-primary hide-if-no-customize disabled"><?php _e( 'Live Preview' ); ?></a>
     1237                    <# } #>
    12351238                    <# if ( data.actions.activate ) { #>
    12361239                        <a class="button disabled" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Activate', 'theme' ); ?></a>
    1237                     <# } #>
    1238                     <# if ( ! data.blockTheme ) { #>
    1239                         <a class="button button-primary hide-if-no-customize disabled"><?php _e( 'Live Preview' ); ?></a>
    12401240                    <# } #>
    12411241                <# } #>
Note: See TracChangeset for help on using the changeset viewer.