Make WordPress Core


Ignore:
Timestamp:
08/01/2012 06:52:20 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Twelve: Homepage page template logic cleanup and style updates, props obenland. Fixes #21245.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentytwelve/functions.php

    r21395 r21398  
    116116        wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" );
    117117    }
    118    
     118
    119119    /**
    120120     * Load our main CSS file.
     
    339339 * 1. Using a full-width layout, when no active widgets in the sidebar
    340340 *    or full-width template.
    341  * 2. White or empty background color to change the layout and spacing.
     341 * 2. A thumbnail in the Homepage page template.
     342 * 3. White or empty background color to change the layout and spacing.
    342343 *
    343344 * @since Twenty Twelve 1.0
     
    348349    if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'full-width-page.php' ) )
    349350        $classes[] = 'full-width';
     351
     352    if ( is_page_template( 'homepage.php' ) && has_post_thumbnail() )
     353        $classes[] = 'has-post-thumbnail';
    350354
    351355    if ( empty( $background_color ) )
Note: See TracChangeset for help on using the changeset viewer.