WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/26/2012 08:47:55 PM (7 years ago)
Author:
koopersmith
Message:

Theme Customizer: Don't expand theme title if there are no details to show. props nacin, fixes #20757, see #19910.

File:
1 edited

Legend:

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

    r20899 r20940  
    6161        </div>
    6262
     63        <?php
     64            $screenshot = $wp_customize->theme()->get_screenshot();
     65            $cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') );
     66        ?>
     67
    6368        <div class="wp-full-overlay-sidebar-content">
    64             <div id="customize-info" class="customize-section">
     69            <div id="customize-info" class="customize-section<?php if ( $cannot_expand ) echo ' cannot-expand'; ?>">
    6570                <div class="customize-section-title">
    6671                    <span class="preview-notice"><?php _e('You are previewing'); ?></span>
    6772                    <strong class="theme-name"><?php echo $wp_customize->theme()->display('Name'); ?></strong>
    6873                </div>
     74                <?php if ( ! $cannot_expand ) : ?>
    6975                <div class="customize-section-content">
    70                     <?php if ( $screenshot = $wp_customize->theme()->get_screenshot() ) : ?>
     76                    <?php if ( $screenshot ) : ?>
    7177                        <img class="theme-screenshot" src="<?php echo esc_url( $screenshot ); ?>" />
    7278                    <?php endif; ?>
     
    7682                    <?php endif; ?>
    7783                </div>
     84                <?php endif; ?>
    7885            </div>
    7986
Note: See TracChangeset for help on using the changeset viewer.