WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/01/2015 12:35:26 PM (6 years ago)
Author:
ocean90
Message:

Customizer Theme Switcher: Switch the details/live preview buttons.

props celloexpressions, ocean90.
fixes #31791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-control.php

    r31950 r31954  
    12011201     */
    12021202    public function content_template() {
    1203     ?>
    1204         <div class="theme<# if ( data.theme.active ) { #> active<# } #>" tabindex="0" aria-describedby="{{ data.theme.id }}-action {{ data.theme.id }}-name">
     1203        $preview_url = site_url( add_query_arg( 'theme', '{{ data.theme.id }}' ) );
     1204        ?>
     1205        <div class="theme<# if ( data.theme.active ) { #> active<# } #>"<# if ( ! data.theme.active ) { #> tabindex="0"<# } #> data-preview-url="<?php echo esc_attr( $preview_url ); ?>" aria-describedby="{{ data.theme.id }}-action {{ data.theme.id }}-name">
    12051206            <# if ( data.theme.screenshot[0] ) { #>
    12061207                <div class="theme-screenshot">
     
    12101211                <div class="theme-screenshot blank"></div>
    12111212            <# } #>
    1212             <span class="more-details" id="{{ data.theme.id }}-action"><?php _e( 'Theme Details' ); ?></span>
     1213            <span class="more-details" id="{{ data.theme.id }}-action"><?php _e( 'Live Preview' ); ?></span>
    12131214            <div class="theme-author"><?php printf( __( 'By %s' ), '{{ data.theme.author }}' ); ?></div>
    12141215
     
    12261227            <# if ( ! data.theme.active ) { #>
    12271228                <div class="theme-actions">
    1228                     <a class="button" href="<?php echo add_query_arg( 'theme', '{{ data.theme.id }}' ); ?>" target="_top"><?php _e( 'Live Preview' ); ?></a>
     1229                    <button type="button" class="button theme-details"><?php _e( 'Theme Details' ); ?></button>
    12291230                </div>
    12301231            <# } #>
Note: See TracChangeset for help on using the changeset viewer.