Make WordPress Core

Ticket #25325: 25325.2.diff

File 25325.2.diff, 16.6 KB (added by iamtakashi, 11 years ago)
  • wp-content/themes/twentyfourteen/content-aside.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     11        <?php if ( ! post_password_required() ) : ?>
     12                <?php if ( is_single() ) : ?>
     13                <div class="attachment-featured-thumbnail">
     14                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     15                </div>
     16                <?php else : ?>
     17                <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
     18                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     19                </a>
     20                <?php endif; ?>
     21        <?php endif; ?>
     22
    1123        <header class="entry-header">
    1224                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    1325                <div class="entry-meta">
  • wp-content/themes/twentyfourteen/content-image.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     11        <?php if ( ! post_password_required() ) : ?>
     12                <?php if ( is_single() ) : ?>
     13                <div class="attachment-featured-thumbnail">
     14                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     15                </div>
     16                <?php else : ?>
     17                <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
     18                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     19                </a>
     20                <?php endif; ?>
     21        <?php endif; ?>
     22
    1123        <header class="entry-header">
    1224                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    1325                <div class="entry-meta">
  • wp-content/themes/twentyfourteen/content-link.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     11        <?php if ( ! post_password_required() ) : ?>
     12                <?php if ( is_single() ) : ?>
     13                <div class="attachment-featured-thumbnail">
     14                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     15                </div>
     16                <?php else : ?>
     17                <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
     18                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     19                </a>
     20                <?php endif; ?>
     21        <?php endif; ?>
     22
    1123        <header class="entry-header">
    1224                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    1325                <div class="entry-meta">
  • wp-content/themes/twentyfourteen/content-page.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     11        <?php if ( ! post_password_required() && has_post_thumbnail() ) : ?>
     12        <div class="attachment-featured-thumbnail">
     13                <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     14        </div>
     15        <?php endif; ?>
     16
    1117        <?php the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); ?>
    1218
    1319        <div class="entry-content">
  • wp-content/themes/twentyfourteen/content-quote.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     11        <?php if ( ! post_password_required() ) : ?>
     12                <?php if ( is_single() ) : ?>
     13                <div class="attachment-featured-thumbnail">
     14                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     15                </div>
     16                <?php else : ?>
     17                <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
     18                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     19                </a>
     20                <?php endif; ?>
     21        <?php endif; ?>
     22
    1123        <header class="entry-header">
    1224                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    1325                <div class="entry-meta">
  • wp-content/themes/twentyfourteen/content-video.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     11        <?php if ( ! post_password_required() ) : ?>
     12                <?php if ( is_single() ) : ?>
     13                <div class="attachment-featured-thumbnail">
     14                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     15                </div>
     16                <?php else : ?>
     17                <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
     18                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     19                </a>
     20                <?php endif; ?>
     21        <?php endif; ?>
     22
    1123        <header class="entry-header">
    1224                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    1325                <div class="entry-meta">
  • wp-content/themes/twentyfourteen/content.php

     
    33 * @package WordPress
    44 * @subpackage Twenty_Fourteen
    55 */
    6 
    76?>
    87
    98<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    10         <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
    11                 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
    12         </a>
     9        <?php if ( ! post_password_required() ) : ?>
     10                <?php if ( is_single() ) : ?>
     11                <div class="attachment-featured-thumbnail">
     12                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     13                </div>
     14                <?php else : ?>
     15                <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
     16                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     17                </a>
     18                <?php endif; ?>
     19        <?php endif; ?>
    1320
    1421        <header class="entry-header">
    1522                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
  • wp-content/themes/twentyfourteen/functions.php

     
    5959        add_theme_support( 'automatic-feed-links' );
    6060
    6161        // Enable support for Post Thumbnails.
    62         add_theme_support( 'post-thumbnails', array( 'post' ) );
     62        add_theme_support( 'post-thumbnails' );
    6363
    6464        // Adding several sizes for Post Thumbnails.
    6565        add_image_size( 'featured-thumbnail-large', 672, 0 );
     
    481481add_filter( 'body_class', 'twentyfourteen_body_classes' );
    482482
    483483/**
     484 * Extends the default WordPress post classes.
     485 *
     486 * Adds body classes to denote:
     487 * Non-password protected page with a featured image.
     488 *
     489 * @param array $classes A list of existing post class values.
     490 * @return array The filtered post class list.
     491 */
     492function twentyfourteen_post_classes( $classes ) {
     493        if ( ! post_password_required() && has_post_thumbnail() )
     494                $classes[] = 'has-featured-image';
     495
     496        return $classes;
     497}
     498add_filter( 'post_class', 'twentyfourteen_post_classes' );
     499
     500/**
    484501 * Creates a nicely formatted and more specific title element text for output
    485502 * in head of document, based on current view.
    486503 *
  • wp-content/themes/twentyfourteen/style.css

     
    453453/* Clearing */
    454454.clear:before,
    455455.clear:after,
     456.hentry:before,
     457.hentry:after,
    456458[class*="content"]:before,
    457459[class*="content"]:after,
    458460[class*="site"]:before,
     
    462464}
    463465
    464466.clear:after,
     467.hentry:after,
    465468[class*="content"]:after,
    466469[class*="site"]:after {
    467470        clear: both;
     
    809812        background-image: -webkit-linear-gradient(135deg, #767676 12.5%, #fff 12.5%, #fff 50%, #767676 50%, #767676 62.5%, #fff 62.5%);
    810813        background-image:         linear-gradient(135deg, #767676 12.5%, #fff 12.5%, #fff 50%, #767676 50%, #767676 62.5%, #fff 62.5%);
    811814        background-size: 4px 4px;
    812         display: block;
     815        display: none;
    813816        float: none;
    814817        margin: 0;
    815818        min-height: 180px;
     
    818821        height: auto;
    819822        z-index: 0;
    820823}
     824.has-featured-image .attachment-featured-thumbnail,
     825.format-standard .attachment-featured-thumbnail {
     826        display: block;
     827}
    821828.attachment-featured-thumbnail:hover {
    822829        background: #919191;
    823830        background-attachment: fixed;
     
    825832        background-image:         linear-gradient(135deg, #919191 12.5%, #fff 12.5%, #fff 50%, #919191 50%, #919191 62.5%, #fff 62.5%);
    826833        background-size: 4px 4px;
    827834}
    828 .full-width .attachment-featured-thumbnail img {
     835.attachment-featured-thumbnail img {
    829836        display: block;
    830837        margin: 0 auto;
    831838}
     
    940947/* .content-area specific styles */
    941948.content-area .entry-header,
    942949.content-area .entry-content,
    943 .content-area .page-content,
    944950.content-area .entry-summary,
    945 .content-area .entry-meta {
     951.content-area .entry-meta,
     952.page-content {
    946953        margin: 0 auto;
    947954        max-width: 474px;
    948955}
    949956.content-area .entry-header {
    950957        background-color: #fff;
    951         padding: 24px 10px 12px;
     958        padding: 0 10px 12px;
    952959}
     960.content-area .has-featured-image .entry-header,
     961.content-area .format-standard .entry-header {
     962        padding-top: 24px;
     963}
    953964.content-area .entry-title {
    954965        font-size: 33px;
    955966        font-weight: 300;
     
    963974        text-transform: uppercase;
    964975}
    965976.content-area .entry-content,
    966 .content-area .page-content,
    967 .content-area .entry-summary {
     977.content-area .entry-summary,
     978.page-content {
    968979        background-color: #fff;
    969980        padding: 12px 10px 0;
    970981}
     
    973984        padding: 0 10px;
    974985}
    975986.content-area footer.entry-meta {
    976         margin-bottom: 36px;
     987        margin-bottom: 24px;
    977988}
    978989.content-area footer.entry-meta .entry-title {
    979990        font-size: 12px;
     
    988999footer.entry-meta .entry-title a:hover {
    9891000        color: #2b2b2b;
    9901001}
    991 .format-aside,
    992 .format-quote,
    993 .format-link,
    994 .format-image,
    995 .format-video {
    996         border-top: 1px solid rgba(0, 0, 0, 0.1);
    997 }
    9981002.format-aside .entry-content,
    9991003.format-aside .entry-summary,
    10001004.format-quote .entry-content,
     
    10031007.format-link.entry-summary {
    10041008        padding-top: 0;
    10051009}
    1006 
    1007 /* Single specific styles */
    1008 .single .format-aside .entry-header,
    1009 .single .format-quote .entry-header,
    1010 .single .format-link .entry-header,
    1011 .single .format-image .entry-header,
    1012 .single .format-video .entry-header {
    1013         padding-top: 0;
    1014 }
    1015 .single .format-aside,
    1016 .single .format-quote,
    1017 .single .format-link,
    1018 .single .format-image,
    1019 .single .format-video {
    1020         border-top: none;
    1021 }
    1022 
    10231010/* Page specific styles */
    10241011.page .entry-content,
    10251012.error404 .page-header,
     
    11511138        font-size: 16px;
    11521139        font-weight: 900;
    11531140        line-height: 1.5;
    1154         margin-bottom: 24px;
     1141        margin: 0 0 24px;
    11551142}
    11561143.taxonomy-description {
    11571144        color: #767676;
     
    12231210        display: block;
    12241211        min-height: 168px;
    12251212}
    1226 .attachment-featured-featured:hover img {
     1213a.attachment-featured-featured:hover img {
    12271214        opacity: 0.85;
    12281215}
    12291216#featured-content .entry-wrap {
     
    15791566}
    15801567.post-navigation,
    15811568.image-navigation {
    1582         margin: 24px auto;
     1569        margin: 24px auto 48px;
    15831570        max-width: 474px;
    15841571        padding: 0 10px;
    15851572}
     
    16481635----------------------------------------------- */
    16491636
    16501637.comments-area {
    1651         margin: 36px auto;
     1638        margin: 48px auto;
    16521639        max-width: 474px;
    16531640        padding: 0 10px;
    16541641}
     
    22012188                margin: 0;
    22022189                text-transform: none;
    22032190        }
    2204         .list-view .content-area .format-aside,
    2205         .list-view .content-area .format-quote,
    2206         .list-view .content-area .format-link,
    2207         .list-view .content-area .format-image,
    2208         .list-view .content-area .format-video {
    2209                 border-top: 0;
    2210         }
    22112191        .list-view .content-area .format-aside .entry-title,
    22122192        .list-view .content-area .format-quote .entry-title,
    22132193        .list-view .content-area .format-link .entry-title {
     
    23082288                margin-bottom: 24px;
    23092289                padding: 0 10px;
    23102290        }
    2311         .search-results .content-area .type-page {
     2291        .list-view .content-area .hentry {
    23122292                border-top: 1px solid rgba(0, 0, 0, 0.1);
     2293                padding-top: 48px;
    23132294        }
    2314         .search-results .content-area .type-page .entry-header {
    2315                 margin-top: 24px;
     2295        .list-view .content-area .has-featured-image .attachment-featured-thumbnail,
     2296        .list-view .content-area .format-standard .attachment-featured-thumbnail {
     2297                margin-top: -49px;
    23162298        }
    23172299}
    23182300
    23192301@media screen and (min-width: 642px) {
    23202302        .content-area .entry-header {
    2321                 margin-top: -48px;
    23222303                padding-right: 30px;
    23232304                padding-left: 30px;
    23242305        }
    2325         .attachment .content-area .entry-header {
    2326                 margin-top: 0;
     2306        .content-area .has-featured-image .entry-header,
     2307        .content-area .format-standard .entry-header {
     2308                margin-top: -48px;
    23272309        }
    23282310}
    23292311
     
    23362318        .site-content {
    23372319                margin-right: 33.33333333%;
    23382320        }
    2339         .content-area .entry-header {
     2321        .content-area .has-featured-image .entry-header,
     2322        .content-area .format-standard .entry-header {
    23402323                margin-top: 0;
    23412324        }
    23422325        .content-area .entry-content,
     
    24102393                margin-left: -168px;
    24112394                max-width: 810px;
    24122395        }
    2413         .single-attachment .entry-content .attachment {
    2414                 text-align: center;
     2396        .single-attachment .entry-content .attachment img {
     2397                margin: 0 auto;
    24152398        }
    24162399        .full-width .entry-content blockquote.alignleft,
    24172400        .full-width .entry-content blockquote.alignright {
     
    24272410}
    24282411
    24292412@media screen and (min-width: 870px) {
    2430         .content-area {
     2413        .content-area,
     2414        .content-sidebar,
     2415        .ephemera {
    24312416                padding-top: 72px;
    24322417        }
    2433         .home .content-area {
    2434                 padding-top: 36px;
    2435         }
    2436         .content-area .entry-header {
     2418        .content-area .has-featured-image .entry-header,
     2419        .content-area .format-standard .entry-header {
    24372420                margin-top: -48px;
    24382421        }
    2439         .content-area .format-aside .entry-header,
    2440         .content-area .format-quote .entry-header,
    2441         .content-area .format-link .entry-header,
    2442         .content-area .format-video .entry-header,
    2443         .content-area .format-image .entry-header {
    2444                 margin-top: 12px;
    2445         }
    2446         .single .content-area .format-aside .entry-header,
    2447         .single .content-area .format-quote .entry-header,
    2448         .single .content-area .format-link .entry-header,
    2449         .single .content-area .format-image .entry-header,
    2450         .single .content-area .format-video .entry-header {
    2451                 margin-top: 0;
    2452         }
    24532422        .comments-area article,
    24542423        .comment-list .trackback,
    24552424        .comment-list .pingback {
     
    25052474        .content-area .entry-header {
    25062475                margin-top: 0;
    25072476        }
    2508         .content-area .entry-header
    2509         .content-area .entry-content,
    2510         .content-area .entry-summary,
    2511         .content-area footer.entry-meta,
    2512         .archive-header,
    2513         .page-header,
    2514         .page-content,
    2515         .post-navigation,
    2516         .image-navigation,
    2517         .comments-area {
    2518                 padding-right: 0;
    2519                 padding-left: 0;
    2520         }
    25212477        .site-footer {
    25222478                padding-left: 27px;
    25232479        }
     
    26062562}
    26072563
    26082564@media screen and (min-width: 1040px) {
    2609         .content-area .entry-header {
     2565        .content-area .has-featured-image .entry-header,
     2566        .content-area .format-standard .entry-header {
    26102567                margin-top: -48px;
    26112568        }
    26122569        .content-area .entry-header,
     
    26222579                padding-right: 15px;
    26232580                padding-left: 15px;
    26242581        }
     2582        .full-width .content-area .entry-header,
     2583        .full-width .content-area .entry-content,
     2584        .full-width .content-area .entry-summary,
     2585        .full-width .content-area footer.entry-meta,
     2586        .full-width .archive-header,
     2587        .full-width .page-header,
     2588        .full-width .page-content,
     2589        .full-width .post-navigation,
     2590        .full-width .image-navigation,
     2591        .full-width .comments-area {
     2592                padding-right: 30px;
     2593                padding-left: 30px;
     2594        }
    26252595}
    26262596
    26272597@media screen and (min-width: 1080px) {