Make WordPress Core


Ignore:
Timestamp:
03/19/2014 08:48:28 PM (11 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: revert r27623 post_class filter removal since it will visually break pre-WP 3.9 installs. See #18804.

File:
1 edited

Legend:

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

    r27623 r27624  
    439439
    440440/**
     441 * Extend the default WordPress post classes.
     442 *
     443 * Adds a post class to denote:
     444 * Non-password protected page with a post thumbnail.
     445 *
     446 * @since Twenty Fourteen 1.0
     447 *
     448 * @param array $classes A list of existing post class values.
     449 * @return array The filtered post class list.
     450 */
     451function twentyfourteen_post_classes( $classes ) {
     452    if ( ! post_password_required() && ! is_attachment() && has_post_thumbnail() ) {
     453        $classes[] = 'has-post-thumbnail';
     454    }
     455
     456    return $classes;
     457}
     458add_filter( 'post_class', 'twentyfourteen_post_classes' );
     459
     460/**
    441461 * Create a nicely formatted and more specific title element text for output
    442462 * in head of document, based on current view.
Note: See TracChangeset for help on using the changeset viewer.