Make WordPress Core

Ticket #25325: 25325.diff

File 25325.diff, 2.7 KB (added by iamtakashi, 8 years ago)

First pass for allowing pages to have featured images.

  • src/wp-content/themes/twentyfourteen/style.css

     
    10071007        padding: 24px 10px 12px;
    10081008        padding: 2.4rem 1.0rem 1.2rem;
    10091009}
     1010.page .content-area .entry-header {
     1011        padding-bottom: 0;
     1012}
    10101013.content-area .entry-title {
    10111014        font-size: 33px;
    10121015        font-size: 3.3rem;
     
    25432546                margin: 0 4.59183673% 2.4rem;
    25442547                padding: 0 4.46428571%;
    25452548        }
    2546         .page .content-area .entry-header,
    25472549        .error404 .content-area .page-header {
    25482550                margin: 0 4.59183673%;
    25492551                padding: 0 4.46428571% 12px;
     
    26722674                margin: 12px 8.03571428% 24px 12.5%;
    26732675                margin: 1.2rem 8.03571428% 2.4rem 12.5%;
    26742676        }
    2675         .page .content-area .entry-header,
    26762677        .error404 .content-area .page-header {
    26772678                margin: 0 8.03571428% 0 12.5%;
    26782679        }
     
    28802881        .secondary-navigation ul li:hover > ul {
    28812882                display: block;
    28822883        }
    2883         .page .content-area .entry-header,
    28842884        .error404 .content-area .page-header {
    28852885                margin: 0 4.59183673%;
    28862886                padding: 0 4.46428571% 12px;
     
    30113011                margin: 0 8.03571428% 24px 12.5%;
    30123012                margin: 0 8.03571428% 2.4rem 12.5%;
    30133013        }
    3014         .page .content-area .entry-header,
    30153014        .error404 .content-area .page-header {
    30163015                margin: 0 8.03571428% 0 12.5%;
    30173016        }
  • src/wp-content/themes/twentyfourteen/content-page.php

     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     11        <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">
     12                <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
     13        </a>
     14
    1115        <?php the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); ?>
    1216
    1317        <div class="entry-content">
  • src/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 );