Make WordPress Core


Ignore:
Timestamp:
10/19/2017 06:09:16 PM (8 years ago)
Author:
westonruter
Message:

Customize: Fix alignment of Customize, Activate, and Live Preview buttons appearing on the Themes admin screen.

Amends [41893].
Props Mahvash-Fatima.
See #42215.
Fixes #42275.

File:
1 edited

Legend:

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

    r41878 r41949  
    265265        ?>
    266266    </div>
    267     <h3 class="theme-name">{{ data.name }}</h3>
    268 
    269     <div class="theme-actions">
    270         <# if ( data.installed ) { #>
    271             <?php
    272             /* translators: %s: Theme name */
    273             $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
    274             ?>
    275             <# if ( data.activate_url ) { #>
    276                 <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
    277             <# } #>
    278             <# if ( data.customize_url ) { #>
    279                 <a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
     267
     268    <div class="theme-id-container">
     269        <h3 class="theme-name">{{ data.name }}</h3>
     270
     271        <div class="theme-actions">
     272            <# if ( data.installed ) { #>
     273                <?php
     274                /* translators: %s: Theme name */
     275                $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
     276                ?>
     277                <# if ( data.activate_url ) { #>
     278                    <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
     279                <# } #>
     280                <# if ( data.customize_url ) { #>
     281                    <a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
     282                <# } else { #>
     283                    <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
     284                <# } #>
    280285            <# } else { #>
     286                <?php
     287                /* translators: %s: Theme name */
     288                $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
     289                ?>
     290                <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>
    281291                <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
    282292            <# } #>
    283         <# } else { #>
    284             <?php
    285             /* translators: %s: Theme name */
    286             $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
    287             ?>
    288             <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>
    289             <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
    290         <# } #>
     293        </div>
    291294    </div>
    292295
Note: See TracChangeset for help on using the changeset viewer.