WordPress.org

Make WordPress Core

Changeset 20108


Ignore:
Timestamp:
03/04/2012 02:40:18 AM (8 years ago)
Author:
koopersmith
Message:

Theme Customizer: Add mini screenshot and description to theme info section. see #19910.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/css/customize-controls.dev.css

    r20106 r20108  
    6565}
    6666
    67 #customize-controls .theme-name {
     67#customize-info {
     68    margin-top: 45px;
     69}
     70
     71#customize-info .customize-section-title:after {
     72    display: none;
     73}
     74#customize-info.open .customize-section-title:after {
     75    display: block;
     76}
     77
     78#customize-info .customize-section-title .theme-screenshot {
     79    float: right;
     80    width: auto;
     81    height: 53px;
     82    margin: -7px -13px 0 15px;
     83}
     84
     85#customize-info.open .customize-section-title .theme-screenshot {
     86    display: none;
     87}
     88
     89#customize-info .theme-name {
    6890    font-size: 16px;
    6991    font-weight: bold;
     
    7294}
    7395
    74 #customize-controls .theme-screenshot {
     96#customize-info .theme-screenshot {
    7597    width: 258px;
    7698    border: 1px solid #ccc;
    7799}
    78100
     101#customize-info .theme-description {
     102    margin-top: 1em;
     103    color: #777;
     104    line-height: 20px;
     105}
     106
    79107#customize-controls .submit {
    80108    text-align: center;
    81 }
    82 
    83 #customize-info {
    84     padding-top: 55px;
    85109}
    86110
  • trunk/wp-includes/customize-controls.php

    r20106 r20108  
    5353        <div id="customize-info" class="customize-section">
    5454            <div class="customize-section-title">
     55                <?php if ( $screenshot ) : ?>
     56                    <img class="theme-screenshot" src="<?php echo esc_url( $screenshot ); ?>" />
     57                <?php endif; ?>
    5558                <strong class="theme-name"><?php echo $theme['Name']; ?></strong>
    5659                <span class="theme-by"><?php printf( __( 'By %s' ), $theme['Author'] ); ?></span>
     
    5962                <?php if ( $screenshot ) : ?>
    6063                    <img class="theme-screenshot" src="<?php echo esc_url( $screenshot ); ?>" />
     64                <?php endif; ?>
     65
     66                <?php if ( $theme->description ): ?>
     67                    <div class="theme-description"><?php echo $theme->description; ?></div>
    6168                <?php endif; ?>
    6269            </div>
Note: See TracChangeset for help on using the changeset viewer.