Make WordPress Core


Ignore:
Timestamp:
05/09/2012 01:38:54 AM (13 years ago)
Author:
koopersmith
Message:

Theme Customizer: Link the current theme screenshot to the customizer. see #19910.

File:
1 edited

Legend:

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

    r20736 r20747  
    6767        '<p>' . __('In the left-hand pane of the Theme Customizer you can edit the theme settings. The settings will differ, depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the "Save and Activate" button at the bottom of the left-hand sidebar.') . '</p>' .
    6868        '<p>' . __('When previewing on smaller monitors, you can use the "Collapse" icon at the bottom of the left-hand pane. This will hide the pane, giving you more room to preview your site in the new theme. To bring the pane back, click on the Collapse icon again.') . '</p>';
    69        
     69
    7070    get_current_screen()->add_help_tab( array(
    7171        'id'        => 'customize-preview-themes',
     
    116116$class = $screenshot ? 'has-screenshot' : '';
    117117
     118$customize_title = sprintf( __( 'Customize &#8220;%s&#8221;' ), $ct->display('Name') );
     119
    118120?>
    119121<div id="current-theme" class="<?php echo esc_attr( $class ); ?>">
    120122    <?php if ( $screenshot ) : ?>
    121         <img src="<?php echo esc_url( $screenshot ); ?>" alt="<?php esc_attr_e( 'Current theme preview' ); ?>" />
     123        <a href="<?php echo wp_customize_url( $ct->get_stylesheet() ); ?>" class="load-customize hide-if-no-customize" title="<?php echo esc_attr( $customize_title ); ?>">
     124            <img src="<?php echo esc_url( $screenshot ); ?>" alt="<?php esc_attr_e( 'Current theme preview' ); ?>" />
     125        </a>
    122126    <?php endif; ?>
    123127
     
    137141
    138142<div class="theme-options">
    139     <a href="<?php echo wp_customize_url( $ct->get_stylesheet() ); ?>" class="load-customize hide-if-no-customize" title="<?php echo esc_attr( sprintf( __( 'Customize &#8220;%s&#8221;' ), $ct->display('Name') ) ); ?>"><?php _e( 'Customize' )?></a>
     143    <a href="<?php echo wp_customize_url( $ct->get_stylesheet() ); ?>" class="load-customize hide-if-no-customize" title="<?php echo esc_attr( $customize_title ); ?>"><?php _e( 'Customize' )?></a>
    140144    <span><?php _e( 'Options:' )?></span>
    141145    <?php
Note: See TracChangeset for help on using the changeset viewer.