Make WordPress Core

Ticket #25181: 25181.diff

File 25181.diff, 16.5 KB (added by obenland, 12 years ago)
  • wp-content/themes/twentyfourteen/archive.php

     
    1818
    1919get_header(); ?>
    2020
    21 <section id="primary" class="content-area">
    22         <div id="content" class="site-content" role="main">
     21        <section id="primary" class="content-area">
     22                <div id="content" class="site-content" role="main">
    2323
    24                 <?php if ( have_posts() ) : ?>
     24                        <?php if ( have_posts() ) : ?>
    2525
    26                 <header class="page-header">
    27                         <h1 class="page-title">
    28                                 <?php
    29                                         if ( is_day() ) :
    30                                                 printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() );
     26                        <header class="page-header">
     27                                <h1 class="page-title">
     28                                        <?php
     29                                                if ( is_day() ) :
     30                                                        printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() );
    3131
    32                                         elseif ( is_month() ) :
    33                                                 printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) );
     32                                                elseif ( is_month() ) :
     33                                                        printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) );
    3434
    35                                         elseif ( is_year() ) :
    36                                                 printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) );
     35                                                elseif ( is_year() ) :
     36                                                        printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) );
    3737
    38                                         else :
    39                                                 _e( 'Archives', 'twentyfourteen' );
     38                                                else :
     39                                                        _e( 'Archives', 'twentyfourteen' );
    4040
    41                                         endif;
    42                                 ?>
    43                         </h1>
    44                 </header><!-- .page-header -->
     41                                                endif;
     42                                        ?>
     43                                </h1>
     44                        </header><!-- .page-header -->
    4545
    46                 <?php
    47                                 while ( have_posts() ) :
    48                                         the_post();
     46                        <?php
     47                                        while ( have_posts() ) :
     48                                                the_post();
    4949
    50                                         get_template_part( 'content', get_post_format() );
    51                                 endwhile;
    52                                 twentyfourteen_paging_nav();
     50                                                get_template_part( 'content', get_post_format() );
     51                                        endwhile;
     52                                        twentyfourteen_paging_nav();
    5353
    54                         else :
    55                                 get_template_part( 'no-results', 'archive' );
     54                                else :
     55                                        get_template_part( 'content', 'none' );
    5656
    57                         endif;
    58                 ?>
    59         </div><!-- #content -->
    60 </section><!-- #primary -->
     57                                endif;
     58                        ?>
     59                </div><!-- #content -->
     60        </section><!-- #primary -->
    6161
    6262<?php
    6363get_sidebar( 'content' );
  • wp-content/themes/twentyfourteen/no-results.php

     
    1 <?php
    2 /**
    3  * The template for displaying a "No posts found" message.
    4  *
    5  * @package WordPress
    6  * @subpackage Twenty_Fourteen
    7  */
    8 ?>
    9 
    10 <header class="page-header">
    11         <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
    12 </header>
    13 
    14 <div class="page-content">
    15         <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
    16 
    17         <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?></p>
    18 
    19         <?php elseif ( is_search() ) : ?>
    20 
    21         <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
    22         <?php get_search_form(); ?>
    23 
    24         <?php else : ?>
    25 
    26         <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
    27         <?php get_search_form(); ?>
    28 
    29         <?php endif; ?>
    30 </div><!-- .page-content -->
  • wp-content/themes/twentyfourteen/rtl.css

     
    551551                margin: 0 12.5% 0 8.03571428%;
    552552        }
    553553
     554        .archive-header,
    554555        .page-header {
    555556                margin: 0 12.5% 24px 8.03571428%;
    556557                margin: 0 12.5% 2.4rem 8.03571428%;
     
    788789                padding-left: 0;
    789790        }
    790791
     792        .archive-header,
    791793        .page-header {
    792794                margin: 0 12.5% 24px 8.03571428%;
    793795                margin: 0 12.5% 2.4rem 8.03571428%;
  • wp-content/themes/twentyfourteen/category.php

     
     1<?php
     2/**
     3 * The template for displaying Category pages.
     4 *
     5 * Learn more: http://codex.wordpress.org/Template_Hierarchy
     6 *
     7 * @package WordPress
     8 * @subpackage Twenty_Fourteen
     9 */
     10
     11get_header(); ?>
     12
     13        <section id="primary" class="content-area">
     14                <div id="content" class="site-content" role="main">
     15
     16                        <?php if ( have_posts() ) : ?>
     17
     18                        <header class="archive-header">
     19                                <h1 class="archive-title"><?php single_cat_title(); ?></h1>
     20
     21                                <?php
     22                                        // Show an optional term description.
     23                                        $term_description = term_description();
     24                                        if ( ! empty( $term_description ) ) :
     25                                                printf( '<div class="taxonomy-description">%s</div>', $term_description );
     26                                        endif;
     27                                ?>
     28                        </header><!-- .archive-header -->
     29
     30                        <?php
     31                                        while ( have_posts() ) :
     32                                                the_post();
     33
     34                                                get_template_part( 'content', get_post_format() );
     35                                        endwhile;
     36                                        twentyfourteen_paging_nav();
     37
     38                                else :
     39                                        get_template_part( 'content', 'none' );
     40
     41                                endif;
     42                        ?>
     43                </div><!-- #content -->
     44        </section><!-- #primary -->
     45
     46<?php
     47get_sidebar( 'content' );
     48get_sidebar();
     49get_footer();
  • wp-content/themes/twentyfourteen/author.php

     
     1<?php
     2/**
     3 * The template for displaying Author archive pages.
     4 *
     5 * Learn more: http://codex.wordpress.org/Template_Hierarchy
     6 *
     7 * @package WordPress
     8 * @subpackage Twenty_Fourteen
     9 */
     10
     11get_header(); ?>
     12
     13        <section id="primary" class="content-area">
     14                <div id="content" class="site-content" role="main">
     15
     16                        <?php if ( have_posts() ) : ?>
     17
     18                        <header class="archive-header">
     19                                <h1 class="archive-title">
     20                                        <?php
     21                                                /* Queue the first post, that way we know what author
     22                                                 * we're dealing with (if that is the case).
     23                                                 *
     24                                                 * We reset this later so we can run the loop properly
     25                                                 * with a call to rewind_posts().
     26                                                 */
     27                                                the_post();
     28
     29                                                printf( __( 'All posts by %s', 'twentyfourteen' ), sprintf(
     30                                                                '<span class="vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="me">%3$s</a></span>',
     31                                                                esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
     32                                                                esc_attr( get_the_author() ),
     33                                                                get_the_author()
     34                                                ) );
     35                                        ?>
     36                                </h1>
     37                        </header><!-- .archive-header -->
     38
     39                        <?php
     40                                        /* Since we called the_post() above, we need to rewind
     41                                         * the loop back to the beginning that way we can run
     42                                         * the loop properly, in full.
     43                                         */
     44                                        rewind_posts();
     45
     46                                        while ( have_posts() ) :
     47                                                the_post();
     48
     49                                                get_template_part( 'content', get_post_format() );
     50                                        endwhile;
     51                                        twentyfourteen_paging_nav();
     52
     53                                else :
     54                                        get_template_part( 'content', 'none' );
     55
     56                                endif;
     57                        ?>
     58
     59                </div><!-- #content -->
     60        </section><!-- #primary -->
     61
     62<?php
     63get_sidebar( 'content' );
     64get_sidebar();
     65get_footer();
  • wp-content/themes/twentyfourteen/search.php

     
    88
    99get_header(); ?>
    1010
    11 <section id="primary" class="content-area">
    12         <div id="content" class="site-content" role="main">
     11        <section id="primary" class="content-area">
     12                <div id="content" class="site-content" role="main">
    1313
    14                 <?php if ( have_posts() ) : ?>
     14                        <?php if ( have_posts() ) : ?>
    1515
    16                 <header class="page-header">
    17                         <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
    18                 </header><!-- .page-header -->
     16                        <header class="page-header">
     17                                <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
     18                        </header><!-- .page-header -->
    1919
    20                 <?php
    21                                 while ( have_posts() ) :
    22                                         the_post();
     20                        <?php
     21                                        while ( have_posts() ) :
     22                                                the_post();
    2323
    24                                         get_template_part( 'content', get_post_format() );
    25                                 endwhile;
    26                                 twentyfourteen_paging_nav();
     24                                                get_template_part( 'content', get_post_format() );
     25                                        endwhile;
     26                                        twentyfourteen_paging_nav();
    2727
    28                         else :
    29                                 get_template_part( 'no-results', 'search' );
     28                                else :
     29                                        get_template_part( 'content', 'none' );
    3030
    31                         endif;
    32                 ?>
     31                                endif;
     32                        ?>
    3333
    34         </div><!-- #content -->
    35 </section><!-- #primary -->
     34                </div><!-- #content -->
     35        </section><!-- #primary -->
    3636
    3737<?php
    3838get_sidebar( 'content' );
  • wp-content/themes/twentyfourteen/taxonomy-post_format.php

     
     1<?php
     2/**
     3 * The template for displaying Post Format pages.
     4 *
     5 * Used to display archive-type pages for posts with a post format.
     6 * If you'd like to further customize these Post Format views, you may create a
     7 * new template file for each specific one.
     8 *
     9 * Learn more: http://codex.wordpress.org/Template_Hierarchy
     10 *
     11 * @package WordPress
     12 * @subpackage Twenty_Fourteen
     13 */
     14
     15get_header(); ?>
     16
     17        <section id="primary" class="content-area">
     18                <div id="content" class="site-content" role="main">
     19
     20                        <?php if ( have_posts() ) : ?>
     21
     22                        <header class="archive-header">
     23                                <h1 class="archive-title">
     24                                        <?php
     25                                                if ( is_tax( 'post_format', 'post-format-aside' ) ) :
     26                                                        _e( 'Asides', 'twentyfourteen' );
     27
     28                                                elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
     29                                                        _e( 'Images', 'twentyfourteen');
     30
     31                                                elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
     32                                                        _e( 'Videos', 'twentyfourteen' );
     33
     34                                                elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
     35                                                        _e( 'Quotes', 'twentyfourteen' );
     36
     37                                                elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
     38                                                        _e( 'Links', 'twentyfourteen' );
     39
     40                                                elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
     41                                                        _e( 'Galleries', 'twentyfourteen' );
     42
     43                                                else :
     44                                                        _e( 'Archives', 'twentyfourteen' );
     45
     46                                                endif;
     47                                        ?>
     48                                </h1>
     49                        </header><!-- .archive-header -->
     50
     51                        <?php
     52                                        while ( have_posts() ) :
     53                                                the_post();
     54
     55                                                get_template_part( 'content', get_post_format() );
     56                                        endwhile;
     57                                        twentyfourteen_paging_nav();
     58
     59                                else :
     60                                        get_template_part( 'content', 'none' );
     61
     62                                endif;
     63                        ?>
     64                </div><!-- #content -->
     65        </section><!-- #primary -->
     66
     67<?php
     68get_sidebar( 'content' );
     69get_sidebar();
     70get_footer();
  • wp-content/themes/twentyfourteen/front-page.php

     
    3131                                                        twentyfourteen_paging_nav();
    3232
    3333                                                else :
    34                                                         get_template_part( 'no-results', 'index' );
     34                                                        get_template_part( 'content', 'none' );
    3535
    3636                                                endif;
    3737                                        ?>
  • wp-content/themes/twentyfourteen/index.php

     
    2727                                twentyfourteen_paging_nav();
    2828
    2929                        else :
    30                                 get_template_part( 'no-results', 'index' );
     30                                get_template_part( 'content', 'none' );
    3131
    3232                        endif;
    3333                ?>
  • wp-content/themes/twentyfourteen/content-none.php

     
     1<?php
     2/**
     3 * The template for displaying a "No posts found" message.
     4 *
     5 * @package WordPress
     6 * @subpackage Twenty_Fourteen
     7 */
     8?>
     9
     10<header class="page-header">
     11        <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
     12</header>
     13
     14<div class="page-content">
     15        <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
     16
     17        <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?></p>
     18
     19        <?php elseif ( is_search() ) : ?>
     20
     21        <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
     22        <?php get_search_form(); ?>
     23
     24        <?php else : ?>
     25
     26        <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
     27        <?php get_search_form(); ?>
     28
     29        <?php endif; ?>
     30</div><!-- .page-content -->
  • wp-content/themes/twentyfourteen/tag.php

     
     1<?php
     2/**
     3 * The template for displaying Tag pages.
     4 *
     5 * Used to display archive-type pages for posts in a tag.
     6 *
     7 * Learn more: http://codex.wordpress.org/Template_Hierarchy
     8 *
     9 * @package WordPress
     10 * @subpackage Twenty_Fourteen
     11 */
     12
     13get_header(); ?>
     14
     15        <section id="primary" class="content-area">
     16                <div id="content" class="site-content" role="main">
     17
     18                        <?php if ( have_posts() ) : ?>
     19
     20                        <header class="archive-header">
     21                                <h1 class="archive-title"><?php single_tag_title();; ?></h1>
     22
     23                                <?php
     24                                        // Show an optional term description.
     25                                        $term_description = term_description();
     26                                        if ( ! empty( $term_description ) ) :
     27                                                printf( '<div class="taxonomy-description">%s</div>', $term_description );
     28                                        endif;
     29                                ?>
     30                        </header><!-- .archive-header -->
     31
     32                        <?php
     33                                        while ( have_posts() ) :
     34                                                the_post();
     35
     36                                                get_template_part( 'content', get_post_format() );
     37                                        endwhile;
     38                                        twentyfourteen_paging_nav();
     39
     40                                else :
     41                                        get_template_part( 'content', 'none' );
     42
     43                                endif;
     44                        ?>
     45                </div><!-- #content -->
     46        </section><!-- #primary -->
     47
     48<?php
     49get_sidebar( 'content' );
     50get_sidebar();
     51get_footer();
  • wp-content/themes/twentyfourteen/style.css

     
    10831083}
    10841084
    10851085/* .content-area specific styles */
    1086 .content-area .entry-header,
    1087 .content-area .page-header {
     1086.content-area .entry-header {
    10881087        background-color: #fff;
    10891088        padding: 24px 10px 12px;
    10901089        padding: 2.4rem 1.0rem 1.2rem;
    10911090}
    1092 .content-area .entry-title,
    1093 .content-area .page-title {
     1091.content-area .entry-title {
    10941092        font-size: 33px;
    10951093        font-size: 3.3rem;
    10961094        font-weight: 300;
     
    13061304        height: 4px;
    13071305        height: 0.4rem;
    13081306}
     1307.archive-header,
    13091308.page-header {
    13101309        margin: 0 0 24px;
    13111310        margin: 0 0 2.4rem;
    13121311        padding: 0 10px;
    13131312        padding: 0 1.0rem;
    13141313}
     1314.archive-title,
    13151315.page-title {
    13161316        font-size: 16px;
    13171317        font-size: 1.6rem;
     
    13201320        margin-bottom: 24px;
    13211321        margin-bottom: 2.4rem;
    13221322}
    1323 .taxonomy-description p {
     1323.taxonomy-description {
    13241324        color: #767676;
    13251325        font-size: 12px;
    13261326        font-size: 1.2rem;
     
    25632563                margin: 1.2rem 4.59183673% 2.4rem;
    25642564                padding: 0 4.46428571%;
    25652565        }
     2566        .archive-header,
    25662567        .page-header {
    25672568                margin: 0 4.59183673% 24px;
    25682569                margin: 0 4.59183673% 2.4rem;
     
    27012702        .content-area .full-width footer.entry-meta {
    27022703                margin: 0 11.30926724%;
    27032704        }
     2705        .archive-header,
    27042706        .page-header {
    27052707                margin: 0 8.03571428% 24px 12.5%;
    27062708                margin: 0 8.03571428% 2.4rem 12.5%;
     
    28262828                margin: 0 0 0 -27.31707317%;
    28272829                width: 24.87804878%;
    28282830        }
    2829         .content-area .entry-header,
    2830         .content-area .page-header {
     2831        .content-area .entry-header {
    28312832                margin: -48px 4.59183673% 0;
    28322833                margin: -4.8rem 4.59183673% 0;
    28332834                padding: 24px 4.46428571% 12px;
     
    28452846                margin: 1.2rem 4.59183673% 2.4rem;
    28462847                padding: 0 4.46428571%;
    28472848        }
     2849        .archive-header,
    28482850        .page-header {
    28492851                margin: 0 4.59183673% 24px;
    28502852                margin: 0 4.59183673% 2.4rem;
     
    29732975}
    29742976
    29752977@media screen and (min-width: 1150px) {
    2976         .content-area .entry-header,
    2977         .content-area .page-header {
     2978        .content-area .entry-header {
    29782979                margin: -48px 8.03571428% 0 12.5%;
    29792980                margin: -4.8rem 8.03571428% 0 12.5%;
    29802981        }
     
    30093010        .comment-navigation {
    30103011                padding-left: 16.77524429%;
    30113012        }
     3013        .archive-header,
    30123014        .page-header {
    30133015                margin: 0 8.03571428% 24px 12.5%;
    30143016                margin: 0 8.03571428% 2.4rem 12.5%;