WordPress.org

Make WordPress Core

Ticket #25325: 25325.8.diff

File 25325.8.diff, 9.8 KB (added by lancewillett, 8 years ago)
  • wp-content/themes/twentyfourteen/content-aside.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    11         <?php twentyfourteen_featured_thumbnail(); ?>
     11        <?php twentyfourteen_post_thumbnail(); ?>
    1212
    1313        <header class="entry-header">
    1414                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
  • wp-content/themes/twentyfourteen/content-gallery.php

     
    2424?>
    2525
    2626<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    27         <?php if( is_single() && $image ) : ?>
    28         <div class="attachment-featured-thumbnail">
     27        <?php if ( is_single() && $image ) : ?>
     28        <div class="featured-thumbnail">
    2929                <?php echo wp_get_attachment_image( $image, 'featured-thumbnail-large' ); ?>
    3030        </div>
    3131        <?php elseif ( $image ) : ?>
    32         <a class="attachment-featured-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
     32        <a class="featured-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
    3333                <?php echo wp_get_attachment_image( $image, 'featured-thumbnail-large' ); ?>
    3434        </a>
    3535        <?php endif; ?>
  • wp-content/themes/twentyfourteen/content-image.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    11         <?php twentyfourteen_featured_thumbnail(); ?>
     11        <?php twentyfourteen_post_thumbnail(); ?>
    1212
    1313        <header class="entry-header">
    1414                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
  • wp-content/themes/twentyfourteen/content-link.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    11         <?php twentyfourteen_featured_thumbnail(); ?>
     11        <?php twentyfourteen_post_thumbnail(); ?>
    1212
    1313        <header class="entry-header">
    1414                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
  • wp-content/themes/twentyfourteen/content-page.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    11         <?php twentyfourteen_featured_thumbnail(); ?>
     11        <?php
     12                twentyfourteen_post_thumbnail();
     13                the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
     14        ?>
    1215
    13         <?php the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); ?>
    14 
    1516        <div class="entry-content">
    1617                <?php
    1718                        the_content();
  • wp-content/themes/twentyfourteen/content-quote.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    11         <?php twentyfourteen_featured_thumbnail(); ?>
     11        <?php twentyfourteen_post_thumbnail(); ?>
    1212
    1313        <header class="entry-header">
    1414                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
  • wp-content/themes/twentyfourteen/content-video.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    11         <?php twentyfourteen_featured_thumbnail(); ?>
     11        <?php twentyfourteen_post_thumbnail(); ?>
    1212
    1313        <header class="entry-header">
    1414                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
  • wp-content/themes/twentyfourteen/content.php

     
    66?>
    77
    88<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    9         <?php twentyfourteen_featured_thumbnail(); ?>
     9        <?php twentyfourteen_post_thumbnail(); ?>
    1010
    1111        <header class="entry-header">
    1212                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
  • wp-content/themes/twentyfourteen/inc/template-tags.php

     
    143143add_action( 'save_post',     'twentyfourteen_category_transient_flusher' );
    144144
    145145/**
    146  * Displays featured image with appropriate html tag.
     146 * Displays an optional featured image, with an anchor element
     147 * when on index views, and a div element when on a single view.
    147148 *
    148149 * @return void
    149150 */
    150 function twentyfourteen_featured_thumbnail() {
    151         if ( ! post_password_required() ) :
    152                 if ( has_post_thumbnail() && is_singular() ) :
    153                 ?>
    154                         <div class="attachment-featured-thumbnail">
    155                                 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
    156                         </div>
    157                 <?php
    158                 else :
    159                 ?>
    160                         <a href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
    161                                 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
    162                         </a>
    163                 <?php
    164                 endif;
    165         endif;
     151function twentyfourteen_post_thumbnail() {
     152        if ( post_password_required() )
     153                return;
     154
     155        if ( is_singular() ) {
     156                printf( '<div class="featured-thumbnail">' );
     157        } else {
     158                printf( '<a href="%s" rel="%s" class="featured-thumbnail">', esc_url( get_permalink() ), esc_attr( get_the_ID() ) );
     159        }
     160                // Avoid an empty element when no featured image exists.
     161                if ( has_post_thumbnail() ) {
     162                        the_post_thumbnail( 'featured-thumbnail-large' );
     163                } else {
     164                        printf( '<p class="screen-reader-text">%s</p>', __( 'No featured image.', 'twentyfourteen' ) );
     165                }
     166        if ( is_singular() ) {
     167                printf( '</div>');
     168        } else {
     169                printf( '</a>' );
     170        }
    166171}
     172 No newline at end of file
  • wp-content/themes/twentyfourteen/rtl.css

     
    367367
    368368/* Mobile list style */
    369369@media screen and (max-width: 400px) {
    370         .list-view .attachment-featured-thumbnail img {
     370        .list-view .featured-thumbnail img {
    371371                float: right;
    372372                margin: 0 0 3px 10px;
    373373        }
  • wp-content/themes/twentyfourteen/style.css

     
    803803        margin-bottom: 24px;
    804804        max-width: 672px;
    805805}
    806 .attachment-featured-thumbnail {
     806.featured-thumbnail {
    807807        background: #767676;
    808808        background-attachment: fixed;
    809809        background-image: -webkit-linear-gradient(135deg, #767676 12.5%, #fff 12.5%, #fff 50%, #767676 50%, #767676 62.5%, #fff 62.5%);
     
    818818        height: auto;
    819819        z-index: 0;
    820820}
    821 .has-featured-image .attachment-featured-thumbnail,
    822 .format-standard .attachment-featured-thumbnail {
     821.has-featured-image .featured-thumbnail,
     822.format-standard .featured-thumbnail {
    823823        display: block;
    824824}
    825 .attachment-featured-thumbnail:hover {
     825.featured-thumbnail:hover {
    826826        background: #919191;
    827827        background-attachment: fixed;
    828828        background-image: -webkit-linear-gradient(135deg, #919191 12.5%, #fff 12.5%, #fff 50%, #919191 50%, #919191 62.5%, #fff 62.5%);
     
    829829        background-image:         linear-gradient(135deg, #919191 12.5%, #fff 12.5%, #fff 50%, #919191 50%, #919191 62.5%, #fff 62.5%);
    830830        background-size: 4px 4px;
    831831}
    832 .attachment-featured-thumbnail img {
     832.featured-thumbnail img {
    833833        display: block;
    834834        margin: 0 auto;
    835835}
     
    13681368        height: auto;
    13691369}
    13701370.attachment-featured-featured img,
    1371 .attachment-featured-thumbnail img {
     1371.featured-thumbnail img {
    13721372        height: auto;
    13731373        max-width: 100%;
    13741374}
     
    21482148        .list-view .content-area footer.entry-meta {
    21492149                display: none;
    21502150        }
    2151         .list-view .attachment-featured-thumbnail {
     2151        .list-view .featured-thumbnail {
    21522152                background: none;
    21532153                min-height: 0;
    21542154                width: auto;
    21552155                z-index: 2;
    21562156        }
    2157         .list-view .attachment-featured-thumbnail img {
     2157        .list-view .featured-thumbnail img {
    21582158                float: left;
    21592159                margin: 0 10px 3px 0;
    21602160                width: 84px;
     
    21932193}
    21942194
    21952195@media screen and (min-width: 401px) {
    2196         a.attachment-featured-thumbnail:hover img {
     2196        a.featured-thumbnail:hover img {
    21972197                opacity: 0.85;
    21982198        }
    21992199        .content-area span + .entry-date:before,
     
    22802280                border-top: 1px solid rgba(0, 0, 0, 0.1);
    22812281                padding-top: 48px;
    22822282        }
    2283         .list-view .content-area .has-featured-image .attachment-featured-thumbnail,
    2284         .list-view .content-area .format-standard .attachment-featured-thumbnail {
     2283        .list-view .content-area .has-featured-image .featured-thumbnail,
     2284        .list-view .content-area .format-standard .featured-thumbnail {
    22852285                margin-top: -49px;
    22862286        }
    22872287}