Make WordPress Core


Ignore:
Timestamp:
10/28/2013 05:57:57 PM (11 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: clean up post thumbnail naming. Props iamtakashi, fixes #25718.

File:
1 edited

Legend:

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

    r25864 r25971  
    6969
    7070    // Add several sizes for Post Thumbnails.
    71     add_image_size( 'featured-thumbnail-large', 672, 0 );
    72     add_image_size( 'featured-thumbnail-featured', 672, 372, true );
    73     add_image_size( 'featured-thumbnail-formatted', 306, 0 );
     71    add_image_size( 'post-thumbnail-grid', 672, 372, true );
     72    add_image_size( 'post-thumbnail', 672, 0 );
    7473
    7574    // This theme uses wp_nav_menu() in two locations.
     
    362361 * Adds body classes to denote:
    363362 * 1. Single or multiple authors.
    364  * 2. Index views.
    365  * 3. Full-width content layout.
    366  * 4. Presence of footer widgets.
     363 * 2. Presense of header image.
     364 * 3. Index views.
     365 * 4. Full-width content layout.
     366 * 5. Presence of footer widgets.
     367 * 6. Single views.
    367368 *
    368369 * @since Twenty Fourteen 1.0
     
    392393        $classes[] = 'footer-widgets';
    393394
     395    if ( is_singular() )
     396        $classes[] = 'singular';
     397
    394398    return $classes;
    395399}
     
    400404 *
    401405 * Adds a post class to denote:
    402  * Non-password protected page with a featured image.
     406 * Non-password protected page with a post thumbnail.
    403407 *
    404408 * @since Twenty Fourteen 1.0
     
    409413function twentyfourteen_post_classes( $classes ) {
    410414    if ( ! post_password_required() && has_post_thumbnail() )
    411         $classes[] = 'has-featured-image';
     415        $classes[] = 'has-post-thumbnail';
     416    else
     417        $classes[] = 'no-post-thumbnail';
    412418
    413419    return $classes;
Note: See TracChangeset for help on using the changeset viewer.