Make WordPress Core

Ticket #25325: 25325.1.diff

File 25325.1.diff, 8.1 KB (added by iamtakashi, 12 years ago)

Updated patch

  • 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.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() && ( has_post_thumbnail() || 'post' == get_post_type() ) ) : ?>
     10                <div class="attachment-featured-thumbnail">
     11                        <?php if ( has_post_thumbnail() && ! is_single() ) : ?>
     12                                <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>">
     13                                        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     14                                </a>
     15                        <?php
     16                                elseif ( has_post_thumbnail() ) :
     17                                        the_post_thumbnail( 'featured-thumbnail-large' );
     18                                endif;
     19                        ?>
     20                </div>
     21        <?php endif; ?>
    1322
    1423        <header class="entry-header">
    1524                <?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 );
  • wp-content/themes/twentyfourteen/style.css

     
    393393.more-link .meta-nav,
    394394.post-format-archive-link .meta-nav,
    395395.attachment-featured-featured img,
    396 .attachment-featured-thumbnail img,
     396.attachment-featured-thumbnail a img,
    397397.search-toggle,
    398398button,
    399399html input[type="button"],
     
    803803        display: none;
    804804}
    805805.hentry {
    806         margin-bottom: 24px;
     806        margin-bottom: 48px;
    807807        max-width: 672px;
    808808}
    809809.attachment-featured-thumbnail {
     
    941941}
    942942.content-area .entry-header {
    943943        background-color: #fff;
    944         padding: 24px 10px 12px;
     944        padding: 0 10px 12px;
    945945}
     946.content-area .attachment-featured-thumbnail + .entry-header {
     947        padding-top: 24px;
     948}
    946949.content-area .entry-title {
    947950        font-size: 33px;
    948951        font-weight: 300;
     
    981984footer.entry-meta .entry-title a:hover {
    982985        color: #2b2b2b;
    983986}
    984 .format-aside,
    985 .format-quote,
    986 .format-link,
    987 .format-image,
    988 .format-video {
    989         border-top: 1px solid rgba(0, 0, 0, 0.1);
    990 }
    991987.format-aside .entry-content,
    992988.format-aside .entry-summary,
    993989.format-quote .entry-content,
     
    997993        padding-top: 0;
    998994}
    999995
    1000 /* Single specific styles */
    1001 .single .format-aside .entry-header,
    1002 .single .format-quote .entry-header,
    1003 .single .format-link .entry-header,
    1004 .single .format-image .entry-header,
    1005 .single .format-video .entry-header {
    1006         padding-top: 0;
    1007 }
    1008 .single .format-aside,
    1009 .single .format-quote,
    1010 .single .format-link,
    1011 .single .format-image,
    1012 .single .format-video {
    1013         border-top: none;
    1014 }
    1015 
    1016996/* Page specific styles */
    1017997.page .entry-content,
    1018998.error404 .page-header,
     
    11431123        font-size: 16px;
    11441124        font-weight: 900;
    11451125        line-height: 1.5;
    1146         margin-bottom: 24px;
     1126        margin: 0 0 24px;
    11471127}
    11481128.taxonomy-description {
    11491129        color: #767676;
     
    22182198}
    22192199
    22202200@media screen and (min-width: 401px) {
    2221         .attachment-featured-thumbnail:hover img {
     2201        .attachment-featured-thumbnail a:hover img {
    22222202                opacity: 0.8;
    22232203        }
     2204        .list-view .content-area .hentry {
     2205                border-top: 1px solid rgba(0, 0, 0, 0.1);
     2206                padding-top: 48px;
     2207        }
     2208        .list-view .content-area .hentry > .attachment-featured-thumbnail {
     2209                margin-top: -49px;
     2210        }
    22242211        .content-area span + .entry-date:before,
    22252212        .content-area span + .byline:before,
    22262213        .content-area span + .comments-link:before,
     
    23022289                margin-bottom: 24px;
    23032290                padding: 0 10px;
    23042291        }
    2305         .search-results .content-area .type-page {
    2306                 border-top: 1px solid rgba(0, 0, 0, 0.1);
    2307         }
    2308         .search-results .content-area .type-page .entry-header {
    2309                 margin-top: 24px;
    2310         }
    23112292}
    23122293
    23132294@media screen and (min-width: 642px) {
    23142295        .content-area .entry-header {
    2315                 margin-top: -48px;
    23162296                padding-right: 30px;
    23172297                padding-left: 30px;
    23182298        }
    2319         .attachment .content-area .entry-header {
    2320                 margin-top: 0;
     2299        .content-area .attachment-featured-thumbnail + .entry-header {
     2300                margin-top: -48px;
    23212301        }
    23222302}
    23232303
     
    23302310        .site-content {
    23312311                margin-right: 33.33333333%;
    23322312        }
    2333         .content-area .entry-header {
     2313        .content-area .attachment-featured-thumbnail + .entry-header {
    23342314                margin-top: 0;
    23352315        }
    23362316        .content-area .entry-content,
     
    23722352        .full-width .site-content {
    23732353                margin-right: 0;
    23742354        }
     2355        .full-width .content-area .attachment-featured-thumbnail + .entry-header {
     2356                margin-top: -48px;
     2357        }
    23752358}
    23762359
    23772360@media screen and (min-width: 770px) {
     
    24272410        .home .content-area {
    24282411                padding-top: 36px;
    24292412        }
    2430         .content-area .entry-header {
     2413        .content-area .attachment-featured-thumbnail + .entry-header {
    24312414                margin-top: -48px;
    24322415        }
    2433         .content-area .format-aside .entry-header,
    2434         .content-area .format-quote .entry-header,
    2435         .content-area .format-link .entry-header,
    2436         .content-area .format-video .entry-header,
    2437         .content-area .format-image .entry-header {
    2438                 margin-top: 12px;
    2439         }
    2440         .single .content-area .format-aside .entry-header,
    2441         .single .content-area .format-quote .entry-header,
    2442         .single .content-area .format-link .entry-header,
    2443         .single .content-area .format-image .entry-header,
    2444         .single .content-area .format-video .entry-header {
    2445                 margin-top: 0;
    2446         }
    24472416        .comments-area article,
    24482417        .comment-list .trackback,
    24492418        .comment-list .pingback {
     
    24962465                margin-left: -29.04761904%;
    24972466                width: 29.04761904%;
    24982467        }
    2499         .content-area .entry-header {
     2468        .content-area .attachment-featured-thumbnail + .entry-header {
    25002469                margin-top: 0;
    25012470        }
    2502         .content-area .entry-header
    2503         .content-area .entry-content,
    2504         .content-area .entry-summary,
    2505         .content-area footer.entry-meta,
    2506         .archive-header,
    2507         .page-header,
    2508         .page-content,
    2509         .post-navigation,
    2510         .image-navigation,
    2511         .comments-area {
    2512                 padding-right: 0;
    2513                 padding-left: 0;
    2514         }
    25152471        .site-footer {
    25162472                padding-left: 27px;
    25172473        }
     
    26002556}
    26012557
    26022558@media screen and (min-width: 1040px) {
    2603         .content-area .entry-header {
     2559        .content-area .attachment-featured-thumbnail + .entry-header {
    26042560                margin-top: -48px;
    26052561        }
    26062562        .content-area .entry-header,
     
    26162572                padding-right: 15px;
    26172573                padding-left: 15px;
    26182574        }
     2575        .full-width .content-area .entry-header,
     2576        .full-width .content-area .entry-content,
     2577        .full-width .content-area .entry-summary,
     2578        .full-width .content-area footer.entry-meta,
     2579        .full-width .archive-header,
     2580        .full-width .page-header,
     2581        .full-width .page-content,
     2582        .full-width .post-navigation,
     2583        .full-width .image-navigation,
     2584        .full-width .comments-area {
     2585                padding-right: 30px;
     2586                padding-left: 30px;
     2587        }
    26192588}
    26202589
    26212590@media screen and (min-width: 1080px) {