Make WordPress Core

Ticket #24858: 24858.diff

File 24858.diff, 91.0 KB (added by obenland, 11 years ago)

First pass of updating templates to 2013 standards

  • wp-content/themes/twentyfourteen/sidebar.php

     
    88?>
    99<div id="secondary">
    1010        <div id="secondary-top">
    11         <?php
    12                 $description = get_bloginfo( 'description' );
    13                 if ( ! empty ( $description ) ) : ?>
     11                <?php
     12                        $description = get_bloginfo( 'description' );
     13                        if ( ! empty ( $description ) ) :
     14                ?>
    1415                <h2 class="site-description"><?php echo esc_html( $description ); ?></h2>
    15         <?php endif; ?>
     16                <?php endif; ?>
    1617
    17         <?php if ( has_nav_menu( 'secondary' ) ) : ?>
    18                 <nav role="navigation" class="site-navigation secondary-navigation">
     18                <?php if ( has_nav_menu( 'secondary' ) ) : ?>
     19                <nav role="navigation" class="navigation secondary-navigation">
    1920                        <?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?>
    2021                </nav>
    21         <?php endif; ?>
     22                <?php endif; ?>
    2223        </div>
    2324
    2425        <div id="secondary-bottom" class="widget-area" role="complementary">
    25         <?php do_action( 'before_sidebar' ); ?>
    26 
    27         <?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
    28                 <aside id="categories" class="widget widget_categories">
    29                         <h1 class="widget-title"><?php _e( 'Categories', 'twentyfourteen' ); ?></h1>
    30                         <ul>
    31                                 <?php wp_list_categories( array( 'title_li' => '' ) ); ?>
    32                         </ul>
    33                 </aside>
    34 
    35                 <aside id="archives" class="widget widget_archive">
    36                         <h1 class="widget-title"><?php _e( 'Archives', 'twentyfourteen' ); ?></h1>
    37                         <ul>
    38                                 <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
    39                         </ul>
    40                 </aside>
    41         <?php endif; // end sidebar widget area ?>
     26                <?php
     27                        do_action( 'before_sidebar' );
     28                        dynamic_sidebar( 'sidebar-1' );
     29                ?>
    4230        </div><!-- .widget-area -->
    4331</div><!-- #secondary -->
  • wp-content/themes/twentyfourteen/content-featured-post.php

     
    55 */
    66?>
    77
    8 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
    9         <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-featured">
     8<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     9        <a class="attachment-featured-featured" href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>">
    1010                <?php
    11                         $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 1 ) );
    12 
    13                         if ( '' != get_the_post_thumbnail() ) :
     11                        if ( has_post_thumbnail() ) :
    1412                                the_post_thumbnail( 'featured-thumbnail-featured' );
    15                         elseif ( $images ) :
    16                                 $image = array_shift( $images );
    17                                 echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' );
    18                         else : ?>
    19                                 <img src="<?php echo get_template_directory_uri(); ?>/images/placeholder.png" alt="" class="featured-thumbnail-featured" /><?php
     13
     14                        else :
     15                                $images = get_children( array(
     16                                        'post_parent'    => get_the_ID(),
     17                                        'post_type'      => 'attachment',
     18                                        'post_mime_type' => 'image',
     19                                        'orderby'        => 'menu_order',
     20                                        'order'          => 'ASC',
     21                                        'numberposts'    => 1,
     22                                ) );
     23
     24                                if ( $images ) :
     25                                        $image = array_shift( $images );
     26                                        echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' );
     27
     28                                else : ?>
     29                                        <img class="featured-thumbnail-featured" src="<?php echo get_template_directory_uri(); ?>/images/placeholder.png" alt="" /><?php
     30
     31                                endif;
    2032                        endif;
    2133                ?>
    2234        </a>
    2335
    2436        <div class="entry-wrap">
    2537                <header class="entry-header">
     38                        <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    2639                        <div class="entry-meta">
    27                                 <?php
    28                                         /* translators: used between list items, there is a space after the comma */
    29                                         $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) );
    30                                         if ( $categories_list && twentyfourteen_categorized_blog() ) :
    31                                 ?>
    32                                 <span class="cat-links">
    33                                         <?php echo $categories_list; ?>
    34                                 </span>
    35                                 <?php endif; // End if categories ?>
     40                                <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
    3641                        </div><!-- .entry-meta -->
    37                         <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
     42                        <?php endif; ?>
     43
     44                        <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
    3845                </header><!-- .entry-header -->
    3946
    40                 <div class="entry-summary clearfix">
     47                <div class="entry-summary">
    4148                        <?php the_excerpt(); ?>
    4249                </div><!-- .entry-summary -->
    4350        </div>
    44 
    45 </article><!-- #post-<?php the_ID(); ?> -->
    46  No newline at end of file
     51</article><!-- #post-## -->
  • wp-content/themes/twentyfourteen/archive.php

     
    22/**
    33 * The template for displaying Archive pages.
    44 *
     5 * Used to display archive-type pages if nothing more specific matches a query.
     6 * For example, puts together date-based pages if no date.php file exists.
     7 *
     8 * If you'd like to further customize these archive views, you may create a
     9 * new template file for each specific one. For example, Twenty Fourteen
     10 * already has tag.php for Tag archives, category.php for Category archives,
     11 * and author.php for Author archives.
     12 *
    513 * Learn more: http://codex.wordpress.org/Template_Hierarchy
    614 *
    715 * @package WordPress
     
    1321<section id="primary" class="content-area">
    1422        <div id="content" class="site-content" role="main">
    1523
    16         <?php if ( have_posts() ) : ?>
     24                <?php if ( have_posts() ) : ?>
    1725
    1826                <header class="page-header">
    1927                        <h1 class="page-title">
    2028                                <?php
    21                                         if ( is_category() ) {
    22                                                 printf( __( 'Category Archives: %s', 'twentyfourteen' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    23 
    24                                         } elseif ( is_tag() ) {
    25                                                 printf( __( 'Tag Archives: %s', 'twentyfourteen' ), '<span>' . single_tag_title( '', false ) . '</span>' );
     29                                        if ( is_day() ) :
     30                                                printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() );
    2631
    27                                         } elseif ( is_author() ) {
    28                                                 /* Queue the first post, that way we know
    29                                                  * what author we're dealing with (if that is the case).
    30                                                 */
    31                                                 the_post();
    32                                                 printf( __( 'Author Archives: %s', 'twentyfourteen' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
    33                                                 /* Since we called the_post() above, we need to
    34                                                  * rewind the loop back to the beginning that way
    35                                                  * we can run the loop properly, in full.
    36                                                  */
    37                                                 rewind_posts();
     32                                        elseif ( is_month() ) :
     33                                                printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) );
    3834
    39                                         } elseif ( is_day() ) {
    40                                                 printf( __( 'Daily Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date() . '</span>' );
     35                                        elseif ( is_year() ) :
     36                                                printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) );
    4137
    42                                         } elseif ( is_month() ) {
    43                                                 printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
    44 
    45                                         } elseif ( is_year() ) {
    46                                                 printf( __( 'Yearly Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
    47 
    48                                         } else {
     38                                        else :
    4939                                                _e( 'Archives', 'twentyfourteen' );
    5040
    51                                         }
     41                                        endif;
    5242                                ?>
    5343                        </h1>
    54                         <?php
    55                                 if ( is_category() ) {
    56                                         // show an optional category description
    57                                         $category_description = category_description();
    58                                         if ( ! empty( $category_description ) )
    59                                                 echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
    60 
    61                                 } elseif ( is_tag() ) {
    62                                         // show an optional tag description
    63                                         $tag_description = tag_description();
    64                                         if ( ! empty( $tag_description ) )
    65                                                 echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
    66                                 }
    67                         ?>
    6844                </header><!-- .page-header -->
    6945
    70                 <?php while ( have_posts() ) : the_post(); ?>
     46                <?php
     47                                while ( have_posts() ) :
     48                                        the_post();
    7149
    72                         <?php twentyfourteen_get_template_part(); ?>
     50                                        twentyfourteen_get_template_part();
     51                                endwhile;
     52                                twentyfourteen_content_nav( 'nav-below' );
    7353
    74                 <?php endwhile; ?>
     54                        else :
     55                                get_template_part( 'no-results', 'archive' );
    7556
    76                 <?php twentyfourteen_content_nav( 'nav-below' ); ?>
     57                        endif;
     58                ?>
     59        </div><!-- #content -->
     60</section><!-- #primary -->
    7761
    78         <?php else : ?>
    79 
    80                 <?php get_template_part( 'no-results', 'archive' ); ?>
    81 
    82         <?php endif; ?>
    83 
    84         </div><!-- #content .site-content -->
    85 </section><!-- #primary .content-area -->
    86 
    87 <?php get_sidebar( 'content' ); ?>
    88 
    89 <?php get_sidebar(); ?>
    90 
    91 <?php get_footer(); ?>
    92  No newline at end of file
     62<?php
     63get_sidebar( 'content' );
     64get_sidebar();
     65get_footer();
  • wp-content/themes/twentyfourteen/content.php

     
    33 * @package WordPress
    44 * @subpackage Twenty_Fourteen
    55 */
    6 $format = get_post_format();
     6
    77?>
    88
    9 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
     9<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1010        <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
    12                         if ( '' != get_the_post_thumbnail() )
    13                                 the_post_thumbnail( 'featured-thumbnail-large' );
    14                 ?>
     11                <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
    1512        </a>
    1613
    1714        <header class="entry-header">
    18                 <?php
    19                         /* translators: used between list items, there is a space after the comma */
    20                         $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) );
    21                         if ( $categories_list && twentyfourteen_categorized_blog() && 'post' == get_post_type() ) :
    22                 ?>
     15                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    2316                <div class="entry-meta">
    24                         <span class="cat-links"><?php echo $categories_list; ?></span>
     17                        <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
    2518                </div>
    2619                <?php endif; ?>
    2720
    2821                <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    2922
    3023                <div class="entry-meta">
    31                         <?php if ( 'gallery' == $format ) : ?>
     24                        <?php if ( has_post_format( 'gallery' ) ) : ?>
    3225                        <span class="post-format">
    33                                 <a class="entry-format" href="<?php echo esc_url( get_post_format_link( get_post_format() ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'twentyfourteen' ), get_post_format_string( get_post_format() ) ) ); ?>"><?php echo get_post_format_string( get_post_format() ); ?></a>
     26                                <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'twentyfourteen' ), get_post_format_string( 'gallery' ) ) ); ?>"><?php echo get_post_format_string( 'gallery' ); ?></a>
    3427                        </span>
    35                         <?php endif; ?>
    36 
    3728                        <?php
     29                                endif;
     30
    3831                                if ( 'post' == get_post_type() )
    3932                                        twentyfourteen_posted_on();
    40                         ?>
    4133
    42                         <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
    43                                 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
    44                         <?php endif; ?>
     34                                if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
     35                        ?>
     36                        <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
     37                        <?php
     38                                endif;
    4539
    46                         <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
     40                                edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
     41                        ?>
    4742                </div><!-- .entry-meta -->
    4843        </header><!-- .entry-header -->
    4944
    5045        <?php if ( is_search() ) : ?>
    51         <div class="entry-summary clearfix">
     46        <div class="entry-summary">
    5247                <?php the_excerpt(); ?>
    5348        </div><!-- .entry-summary -->
    5449        <?php else : ?>
    55         <div class="entry-content clearfix">
    56                 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) ); ?>
     50        <div class="entry-content">
    5751                <?php
     52                        the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
    5853                        wp_link_pages( array(
    5954                                'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
    6055                                'after'       => '</div>',
    6156                                'link_before' => '<span>',
    62                                 'link_after'  => '</span>'
     57                                'link_after'  => '</span>',
    6358                        ) );
    6459                ?>
    6560        </div><!-- .entry-content -->
    6661        <?php endif; ?>
    6762
    68         <?php
    69                 $tag_list = get_the_tag_list();
    70                 if ( '' != $tag_list && 'post' == get_post_type() ) :
    71         ?>
    72                 <footer class="entry-meta">
    73                         <span class="tag-links"><?php echo $tag_list; ?></span>
    74                 </footer><!-- .entry-meta -->
    75         <?php endif; // End if $tag_list ?>
    76 </article><!-- #post-<?php the_ID(); ?> -->
    77  No newline at end of file
     63        <?php if ( has_tag() ) : ?>
     64        <footer class="entry-meta">
     65                <span class="tag-links"><?php echo get_the_tag_list(); ?></span>
     66        </footer><!-- .entry-meta -->
     67        <?php endif; ?>
     68</article><!-- #post-## -->
  • wp-content/themes/twentyfourteen/functions.php

     
    88
    99/**
    1010 * Set the content width based on the theme's design and stylesheet.
    11  *
    1211 */
    1312if ( ! isset( $content_width ) )
    1413        $content_width = 474; /* pixels */
    1514
    1615function futher_set_content_width() {
    17         global $content_width;
    1816        if ( is_page_template( 'full-width-page.php' ) || is_attachment() )
    19                 $content_width = 895;
     17                $GLOBALS['content_width'] = 895;
    2018}
    2119add_action( 'template_redirect', 'futher_set_content_width' );
    2220
     
    2725 * Note that this function is hooked into the after_setup_theme hook, which runs
    2826 * before the init hook. The init hook is too late for some features, such as indicating
    2927 * support post thumbnails.
    30  *
    3128 */
    3229function twentyfourteen_setup() {
    33         /**
    34          * Custom template tags for this theme.
    35          */
    36         require( get_template_directory() . '/inc/template-tags.php' );
    37 
    38         /**
    39          * Customizer additions
    40          */
    41         require( get_template_directory() . '/inc/customizer.php' );
    4230
    4331        /**
    4432         * Make theme available for translation
     
    8169        /**
    8270         * This theme allows users to set a custom background.
    8371         */
    84         $args = apply_filters( 'twentyfourteen_custom_background_args', array( 'default-color' => 'f5f5f5' ) );
    85 
    86         if ( function_exists( 'wp_get_theme' ) ) {
    87                 add_theme_support( 'custom-background', $args );
    88         } else {
    89                 // Compat: Versions of WordPress prior to 3.4.
    90                 define( 'BACKGROUND_COLOR', $args['default-color'] );
    91                 add_custom_background();
    92         }
     72        add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(
     73                'default-color' => 'f5f5f5',
     74        ) ) );
    9375}
    9476endif; // twentyfourteen_setup
    9577add_action( 'after_setup_theme', 'twentyfourteen_setup' );
     
    11294        if ( is_paged() )
    11395                return false;
    11496
    115         $minimum = absint( $minimum );
    11697        $featured_posts = apply_filters( 'twentyfourteen_get_featured_posts', array() );
    11798
    118         if ( ! is_array( $featured_posts ) )
    119                 return false;
    120 
    121         if ( $minimum > count( $featured_posts ) )
    122                 return false;
    123 
    124         return true;
     99        return is_array( $featured_posts ) && count( $featured_posts ) > absint( $minimum );
    125100}
    126101
    127102/**
     
    191166add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
    192167
    193168/**
    194  * Register Google fonts for Twenty Fourteen
     169 * Register Google fonts for Twenty Fourteen.
    195170 *
    196171 */
    197172function twentyfourteen_fonts() {
    198173        /* translators: If there are characters in your language that are not supported
    199174           by Lato, translate this to 'off'. Do not translate into your own language. */
    200         if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) {
    201 
    202                 $protocol = is_ssl() ? 'https' : 'http';
    203 
    204                 wp_register_style( 'twentyfourteen-lato', "$protocol://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic", array(), null );
    205         }
     175        if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) )
     176                wp_register_style( 'twentyfourteen-lato', '//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic', array(), null );
    206177}
    207178add_action( 'init', 'twentyfourteen_fonts' );
    208179
     
    215186
    216187        wp_enqueue_style( 'twentyfourteen-lato' );
    217188
    218         if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
     189        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
    219190                wp_enqueue_script( 'comment-reply' );
    220         }
    221191
    222         if ( is_singular() && wp_attachment_is_image() ) {
     192        if ( is_singular() && wp_attachment_is_image() )
    223193                wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' );
    224         }
    225194
    226195        wp_enqueue_script( 'twentyfourteen-theme', get_template_directory_uri() . '/js/theme.js', array( 'jquery' ), '20130402', true );
    227196}
     
    231200 * Enqueue Google fonts style to admin screen for custom header display.
    232201 *
    233202 */
    234 function twentyfourteen_admin_fonts( $hook_suffix ) {
    235         if ( 'appearance_page_custom-header' != $hook_suffix )
    236                 return;
    237 
     203function twentyfourteen_admin_fonts() {
    238204        wp_enqueue_style( 'twentyfourteen-lato' );
    239205}
    240 add_action( 'admin_enqueue_scripts', 'twentyfourteen_admin_fonts' );
     206add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' );
    241207
    242208/**
    243209 * Implement the Custom Header feature
     
    285251}
    286252add_filter( 'get_the_excerpt', 'twentyfourteen_custom_excerpt_more' );
    287253
     254if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) :
     255/**
     256 * Prints the attached image with a link to the next attached image.
     257 *
     258 * @since Twenty Thirteen 1.0
     259 *
     260 * @return void
     261 */
     262function twentyfourteen_the_attached_image() {
     263        $post                = get_post();
     264        $attachment_size     = apply_filters( 'twentyfourteen_attachment_size', array( 1200, 1200 ) );
     265        $next_attachment_url = wp_get_attachment_url();
     266
     267        /**
     268         * Grab the IDs of all the image attachments in a gallery so we can get the URL
     269         * of the next adjacent image in a gallery, or the first image (if we're
     270         * looking at the last image in a gallery), or, in a gallery of one, just the
     271         * link to that image file.
     272         */
     273        $attachment_ids = get_posts( array(
     274                'post_parent'    => $post->post_parent,
     275                'fields'         => 'ids',
     276                'numberposts'    => -1,
     277                'post_status'    => 'inherit',
     278                'post_type'      => 'attachment',
     279                'post_mime_type' => 'image',
     280                'order'          => 'ASC',
     281                'orderby'        => 'menu_order ID'
     282        ) );
     283
     284        // If there is more than 1 attachment in a gallery...
     285        if ( count( $attachment_ids ) > 1 ) {
     286                foreach ( $attachment_ids as $attachment_id ) {
     287                        if ( $attachment_id == $post->ID ) {
     288                                $next_id = current( $attachment_ids );
     289                                break;
     290                        }
     291                }
     292
     293                // get the URL of the next image attachment...
     294                if ( $next_id )
     295                        $next_attachment_url = get_attachment_link( $next_id );
     296
     297                // or get the URL of the first image attachment.
     298                else
     299                        $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) );
     300        }
     301
     302        printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>',
     303                esc_url( $next_attachment_url ),
     304                the_title_attribute( array( 'echo' => false ) ),
     305                wp_get_attachment_image( $post->ID, $attachment_size )
     306        );
     307}
     308endif;
     309
    288310/**
    289311 * Count the number of footer sidebars to enable dynamic classes for the footer
    290312 *
     
    328350        }
    329351
    330352        if ( $class )
    331                 echo 'class="clearfix ' . $class . '"';
     353                printf( 'class="%s"', $class );
    332354}
    333355
    334356/**
     
    443465
    444466        return $title;
    445467}
    446 add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
    447  No newline at end of file
     468add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
     469
     470/**
     471 * Custom template tags for this theme.
     472 */
     473require get_template_directory() . '/inc/template-tags.php';
     474
     475/**
     476 * Customizer additions
     477 */
     478require get_template_directory() . '/inc/customizer.php';
  • wp-content/themes/twentyfourteen/featured-content.php

     
    11<div class="featured-content-wrapper">
    2         <div id="featured-content" class="featured-content clearfix">
     2        <div id="featured-content" class="featured-content">
    33
    44                <?php
    55                        do_action( 'twentyfourteen_featured_posts_before' );
     
    77                        $featured_posts = twentyfourteen_get_featured_posts();
    88                        foreach ( (array) $featured_posts as $order => $post ) :
    99                                setup_postdata( $post );
     10
    1011                                get_template_part( 'content', 'featured-post' );
    1112                        endforeach;
    1213
  • wp-content/themes/twentyfourteen/page.php

     
    1313
    1414get_header(); ?>
    1515
    16 <?php if ( is_front_page() ) : ?>
    17 
    18         <div class="front-page-content-wrapper">
    19                 <div class="front-page-content-main">
    20 
    21                         <?php if ( twentyfourteen_has_featured_posts() ) : ?>
    22                                 <?php get_template_part( 'featured-content' ); ?>
    23                         <?php endif; ?>
    24 
    25                         <div class="front-page-content-area clearfix">
    26 
    27                                 <div id="primary" class="content-area no-sidebar">
    28                                         <div id="content" class="site-content" role="main">
    29                                         <?php
    30                                                 if ( have_posts() ) :
    31                                                         while ( have_posts() ) :
    32                                                                 the_post();
    33                                                                 get_template_part( 'content', 'page' );
    34                                                                 comments_template( '', true );
    35                                                         endwhile;
    36 
    37                                                         twentyfourteen_content_nav( 'nav-below' );
    38                                                 else :
    39                                                         get_template_part( 'no-results', 'index' );
    40                                                 endif;
    41                                         ?>
    42                                         </div><!-- #content .site-content -->
    43                                 </div><!-- #primary .content-area -->
    44 
    45                                 <?php get_template_part( 'recent-formatted-posts' ); ?>
    46 
    47                         </div><!-- .front-page-content-area -->
    48 
    49                 </div><!-- .front-page-content-main -->
    50         </div><!-- .front-page-content-wrapper -->
    51 
    52         <?php get_sidebar(); ?>
    53 
    54 <?php else : ?>
    55 
    5616        <div id="primary" class="content-area">
    5717                <div id="content" class="site-content" role="main">
    5818
    59                         <?php while ( have_posts() ) : the_post(); ?>
    60 
    61                                 <?php get_template_part( 'content', 'page' ); ?>
     19                        <?php
     20                                while ( have_posts() ) :
     21                                        the_post();
    6222
    63                                 <?php comments_template( '', true ); ?>
     23                                        get_template_part( 'content', 'page' );
    6424
    65                         <?php endwhile; ?>
     25                                        // If comments are open or we have at least one comment, load up the comment template.
     26                                        if ( comments_open() || get_comments_number() )
     27                                                comments_template();
     28                                endwhile;
     29                        ?>
    6630
    6731                </div><!-- #content .site-content -->
    6832        </div><!-- #primary .content-area -->
    6933
    70         <?php get_sidebar( 'content' ); ?>
    71 
    72         <?php get_sidebar(); ?>
    73 
    74 <?php endif; // is_front_page() check ?>
    75 
    76 <?php get_footer(); ?>
     34<?php
     35get_sidebar( 'content' );
     36get_sidebar();
     37get_footer();
  • wp-content/themes/twentyfourteen/comments.php

     
    22/**
    33 * The template for displaying Comments.
    44 *
    5  * The area of the page that contains both current comments
    6  * and the comment form. The actual display of comments is
    7  * handled by a callback to twentyfourteen_comment() which is
    8  * located in the functions.php file.
     5 * The area of the page that contains comments and the comment form.
    96 *
    107 * @package WordPress
    118 * @subpackage Twenty_Fourteen
    129 */
    13 ?>
    1410
    15 <?php
    16         /*
    17          * If the current post is protected by a password and
    18          * the visitor has not yet entered the password we will
    19          * return early without loading the comments.
    20          */
    21         if ( post_password_required() )
    22                 return;
     11/*
     12 * If the current post is protected by a password and the visitor has not yet
     13 * entered the password we will return early without loading the comments.
     14 */
     15if ( post_password_required() )
     16        return;
    2317?>
    2418
    25         <div id="comments" class="comments-area">
    26 
    27         <?php // You can start editing here -- including this comment! ?>
     19<div id="comments" class="comments-area">
    2820
    2921        <?php if ( have_comments() ) : ?>
    30                 <h2 class="comments-title">
    31                         <?php
    32                                 printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyfourteen' ),
    33                                         number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
    34                         ?>
    35                 </h2>
    3622
    37                 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
    38                 <nav role="navigation" id="comment-nav-above" class="site-navigation comment-navigation clearfix">
    39                         <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
    40                         <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
    41                         <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
    42                 </nav><!-- #comment-nav-above .site-navigation .comment-navigation -->
    43                 <?php endif; // check for comment navigation ?>
     23        <h2 class="comments-title">
     24                <?php
     25                        printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyfourteen' ),
     26                                number_format_i18n( get_comments_number() ), get_the_title() );
     27                ?>
     28        </h2>
    4429
    45                 <ol class="commentlist">
    46                         <?php
    47                                 /* Loop through and list the comments. Tell wp_list_comments()
    48                                  * to use twentyfourteen_comment() to format the comments.
    49                                  * If you want to overload this in a child theme then you can
    50                                  * define twentyfourteen_comment() and that will be used instead.
    51                                  * See twentyfourteen_comment() in inc/template-tags.php for more.
    52                                  */
    53                                 wp_list_comments( array( 'callback' => 'twentyfourteen_comment' ) );
    54                         ?>
    55                 </ol><!-- .commentlist -->
     30        <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
     31        <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
     32                <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
     33                <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
     34                <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
     35        </nav><!-- #comment-nav-above -->
     36        <?php endif; // Check for comment navigation. ?>
    5637
    57                 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
    58                 <nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation clearfix">
    59                         <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
    60                         <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
    61                         <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
    62                 </nav><!-- #comment-nav-below .site-navigation .comment-navigation -->
    63                 <?php endif; // check for comment navigation ?>
     38        <ol class="comment-list">
     39                <?php
     40                        wp_list_comments( array(
     41                                'style'      => 'ol',
     42                                'short_ping' => true,
    6443
    65         <?php endif; // have_comments() ?>
     44                                // TODO: Remove callback and update styles.
     45                                'callback'=>'twentyfourteen_comment',
     46                        ) );
     47                ?>
     48        </ol><!-- .comment-list -->
     49
     50        <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
     51        <nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
     52                <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
     53                <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
     54                <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
     55        </nav><!-- #comment-nav-below -->
     56        <?php endif; // Check for comment navigation. ?>
    6657
    67         <?php
    68                 // If comments are closed and there are comments, let's leave a little note, shall we?
    69                 if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
    70         ?>
    71                 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
     58        <?php if ( ! comments_open() ) : ?>
     59        <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
    7260        <?php endif; ?>
    7361
     62        <?php endif; // have_comments() ?>
     63
    7464        <?php comment_form(); ?>
    7565
    76 </div><!-- #comments .comments-area -->
     66</div><!-- #comments -->
  • wp-content/themes/twentyfourteen/no-results.php

     
    11<?php
    22/**
    3  * The template part for displaying a message that posts cannot be found.
    4  *
    5  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     3 * The template for displaying a "No posts found" message.
    64 *
    75 * @package WordPress
    86 * @subpackage Twenty_Fourteen
    97 */
    108?>
    119
    12 <article id="post-0" class="post no-results not-found">
    13         <header class="entry-header">
    14                 <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
    15         </header><!-- .entry-header -->
     10<header class="page-header">
     11        <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
     12</header>
    1613
    17         <div class="entry-content">
    18                 <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
     14<div class="page-content">
     15        <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
    1916
    20                         <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?></p>
     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>
    2118
    22                 <?php elseif ( is_search() ) : ?>
     19        <?php elseif ( is_search() ) : ?>
    2320
    24                         <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
    25                         <?php get_search_form(); ?>
     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(); ?>
    2623
    27                 <?php else : ?>
     24        <?php else : ?>
    2825
    29                         <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
    30                         <?php get_search_form(); ?>
     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(); ?>
    3128
    32                 <?php endif; ?>
    33         </div><!-- .entry-content -->
    34 </article><!-- #post-0 .post .no-results .not-found -->
     29        <?php endif; ?>
     30</div><!-- .page-content -->
  • wp-content/themes/twentyfourteen/content-post-format.php

     
    33 * @package WordPress
    44 * @subpackage Twenty_Fourteen
    55 */
    6 $format = get_post_format();
    76?>
    87
    9 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
     8<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    109        <?php
    11                 if ( 'gallery' == $format ) :
    12                         $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );
     10                if ( has_post_format( 'gallery' ) ) :
     11                        $images = get_children( array( 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );
    1312                        if ( $images ) :
    14                                 $image = array_shift( $images ); ?>
    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 echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-large' ); ?>
    17                                 </a><?php
     13                                $image = array_shift( $images );
     14        ?>
     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 echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-large' ); ?>
     17        </a>
     18        <?php
    1819                        endif;
    1920                endif;
    2021        ?>
    2122
    2223        <header class="entry-header">
    23                 <?php
    24                         /* translators: used between list items, there is a space after the comma */
    25                         $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) );
    26                         if ( $categories_list && twentyfourteen_categorized_blog() && 'post' == get_post_type() ) :
    27                 ?>
     24                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    2825                <div class="entry-meta">
    29                         <span class="cat-links"><?php echo $categories_list; ?></span>
    30                 </div>
     26                        <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
     27                </div><!-- .entry-meta -->
    3128                <?php endif; ?>
    3229
    33                 <?php
    34                         /* Show title only if it exsits */
    35                         the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' );
    36                 ?>
     30                <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
    3731
    3832                <div class="entry-meta">
    3933                        <span class="post-format">
     
    4337                        <?php
    4438                                if ( 'post' == get_post_type() )
    4539                                        twentyfourteen_posted_on();
    46                         ?>
    4740
    48                         <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
    49                                 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
     41                                if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) :
     42                        ?>
     43                        <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
    5044                        <?php endif; ?>
    5145
    5246                        <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
    5347                </div><!-- .entry-meta -->
    5448        </header><!-- .entry-header -->
    5549
    56         <div class="entry-content clearfix">
    57                 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) ); ?>
     50        <div class="entry-content">
    5851                <?php
     52                        the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
    5953                        wp_link_pages( array(
    6054                                'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
    6155                                'after'       => '</div>',
    6256                                'link_before' => '<span>',
    63                                 'link_after'  => '</span>'
     57                                'link_after'  => '</span>',
    6458                        ) );
    6559                ?>
    6660        </div><!-- .entry-content -->
    6761
    6862        <footer class="entry-meta">
    69                 <?php if ( ( 'quote' == $format ) || ( 'aside' == $format ) ) : ?>
     63                <?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?>
    7064                <div class="entry-meta">
    71                         <?php the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); ?>
     65                        <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
    7266                </div>
    7367                <?php endif; ?>
    7468
    75                 <?php
    76                         $tag_list = get_the_tag_list();
    77                         if ( '' != $tag_list && 'post' == get_post_type() ) :
    78                 ?>
    79                 <span class="tag-links"><?php echo $tag_list; ?></span>
    80                 <?php endif; // End if $tag_list ?>
     69                <?php if ( has_tag() ) : ?>
     70                <span class="tag-links"><?php echo get_the_tag_list(); ?></span>
     71                <?php endif; ?>
    8172        </footer><!-- .entry-meta -->
    82 
    83 </article><!-- #post-<?php the_ID(); ?> -->
    84  No newline at end of file
     73</article><!-- #post-## -->
  • wp-content/themes/twentyfourteen/content-recent-formatted-post.php

     
    66if ( isset( $GLOBALS['content_width'] ) )
    77        $GLOBALS['content_width'] = 306;
    88
    9 $format = get_post_format();
    10 if ( false === $format )
    11         $format = 'standard';
     9$images = get_posts( array(
     10        'post_parent'    => get_post()->post_parent,
     11        'fields'         => 'ids',
     12        'numberposts'    => -1,
     13        'post_status'    => 'inherit',
     14        'post_type'      => 'attachment',
     15        'post_mime_type' => 'image',
     16        'order'          => 'ASC',
     17        'orderby'        => 'menu_order ID'
     18) );
     19$total_images = count( $images );
    1220?>
    1321
    14 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
    15         <div class="entry-content clearfix">
     22<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     23        <div class="entry-content">
    1624                <?php
    17                         if ( 'gallery' == $format ) :
    18                                 $featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' );
    19                                 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );
    20                                 if ( $images ) :
    21                                         $total_images = count( $images );
    22                                         if ( empty( $featured_image ) ) {
    23                                                 $image = array_shift( $images );
    24                                                 $featured_image = wp_get_attachment_image( $image->ID, 'featured-thumbnail-formatted' );
    25                                         }
     25                        if ( has_post_format( 'gallery' ) ) :
     26                                if ( has_post_thumbnail() ) :
     27                                        $featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' );
     28                                elseif ( $total_images > 0 ) :
     29                                        $image = array_shift( $images );
     30                                        $featured_image = wp_get_attachment_image( $image, 'featured-thumbnail-formatted' );
    2631                ?>
    27                                         <a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a>
    28                                         <p class="wp-caption-text"><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyfourteen' ),
    29                                         'href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"',
     32                <a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a>
     33                <p class="wp-caption-text">
     34                        <?php
     35                                printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ),
     36                                        esc_url( get_permalink() ),
    3037                                        number_format_i18n( $total_images )
    31                                 ); ?></p><?php
     38                                );
     39                        ?>
     40                </p>
     41                <?php
    3242                                else :
    3343                                        the_excerpt();
    3444                                endif;
     
    4151        <header class="entry-header">
    4252                <div class="entry-meta">
    4353                        <?php
    44                                 if ( 'link' != $format ) :
    45                                         the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark">', '</a></h1>' );
     54                                if ( ! has_post_format( 'link' ) ) :
     55                                        the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
    4656                                endif;
     57
     58                                twentyfourteen_posted_on();
     59
     60                                if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
    4761                        ?>
    48                         <?php twentyfourteen_posted_on(); ?>
    49                         <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
    5062                        <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
    5163                        <?php endif; ?>
    5264                </div><!-- .entry-meta -->
    5365        </header><!-- .entry-header -->
    54 </article>
    55  No newline at end of file
     66</article><!-- #post-## -->
  • wp-content/themes/twentyfourteen/inc/custom-header.php

     
    2222 * @subpackage Twenty_Fourteen
    2323 */
    2424function twentyfourteen_custom_header_setup() {
    25         $args = array(
    26                 'default-image'          => '',
     25        add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array(
    2726                'default-text-color'     => 'fff',
    2827                'width'                  => 1260,
    2928                'height'                 => 240,
     
    3130                'wp-head-callback'       => 'twentyfourteen_header_style',
    3231                'admin-head-callback'    => 'twentyfourteen_admin_header_style',
    3332                'admin-preview-callback' => 'twentyfourteen_admin_header_image',
    34         );
    35 
    36         $args = apply_filters( 'twentyfourteen_custom_header_args', $args );
     33        ) ) );
    3734
    38         if ( function_exists( 'wp_get_theme' ) ) {
    39                 add_theme_support( 'custom-header', $args );
    40         } else {
    41                 // Compat: Versions of WordPress prior to 3.4.
    42                 define( 'HEADER_TEXTCOLOR',    $args['default-text-color'] );
    43                 define( 'HEADER_IMAGE',        $args['default-image'] );
    44                 define( 'HEADER_IMAGE_WIDTH',  $args['width'] );
    45                 define( 'HEADER_IMAGE_HEIGHT', $args['height'] );
    46                 add_custom_image_header( $args['wp-head-callback'], $args['admin-head-callback'], $args['admin-preview-callback'] );
    47         }
    4835}
    4936add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' );
    5037
    51 /**
    52  * Shiv for get_custom_header().
    53  *
    54  * get_custom_header() was introduced to WordPress
    55  * in version 3.4. To provide backward compatibility
    56  * with previous versions, we will define our own version
    57  * of this function.
    58  *
    59  * @todo Remove this function when WordPress 3.6 is released.
    60  * @return stdClass All properties represent attributes of the curent header image.
    61  *
    62  * @package WordPress
    63  * @subpackage Twenty_Fourteen
    64  */
    65 
    66 if ( ! function_exists( 'get_custom_header' ) ) {
    67         function get_custom_header() {
    68                 return (object) array(
    69                         'url'           => get_header_image(),
    70                         'thumbnail_url' => get_header_image(),
    71                         'width'         => HEADER_IMAGE_WIDTH,
    72                         'height'        => HEADER_IMAGE_HEIGHT,
    73                 );
    74         }
    75 }
    76 
    7738if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
    7839/**
    7940 * Styles the header image and text displayed on the blog
     
    8243 *
    8344 */
    8445function twentyfourteen_header_style() {
     46        $header_text_color = get_header_textcolor();
    8547
    8648        // If no custom options for text are set, let's bail
    87         // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
    88         if ( HEADER_TEXTCOLOR == get_header_textcolor() )
     49        // $header_text_color options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
     50        if ( HEADER_TEXTCOLOR == $header_text_color )
    8951                return;
    9052        // If we get this far, we have custom styles. Let's do this.
    9153        ?>
    9254        <style type="text/css">
    9355        <?php
    9456                // Has the text been hidden?
    95                 if ( 'blank' == get_header_textcolor() ) :
     57                if ( 'blank' == $header_text_color ) :
    9658        ?>
    9759                .site-title {
    9860                        position: absolute !important;
     
    10466                else :
    10567        ?>
    10668                .site-title a  {
    107                         color: #<?php echo get_header_textcolor(); ?> !important;
     69                        color: #<?php echo $header_text_color; ?> !important;
    10870                }
    10971        <?php endif; ?>
    11072        </style>
     
    153115 * @see twentyfourteen_custom_header_setup().
    154116 *
    155117 */
    156 function twentyfourteen_admin_header_image() { ?>
     118function twentyfourteen_admin_header_image() {
     119        $header_image = get_header_image();
     120?>
    157121        <div id="headimg">
    158                 <?php
    159                 if ( 'blank' == get_header_textcolor() || '' == get_header_textcolor() )
    160                         $style = ' style="display:none;"';
    161                 else
    162                         $style = ' style="color:#' . get_header_textcolor() . ';"';
    163                 ?>
    164                 <?php $header_image = get_header_image();
    165                 if ( ! empty( $header_image ) ) : ?>
    166                         <img src="<?php echo esc_url( $header_image ); ?>" alt="" />
     122                <?php if ( ! empty( $header_image ) ) : ?>
     123                <img src="<?php echo esc_url( $header_image ); ?>" alt="">
    167124                <?php endif; ?>
    168                 <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
     125                <h1 class="displaying-header-text"><a id="name"<?php echo sprintf( ' style="color:#%s;"', get_header_textcolor() ); ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
    169126        </div>
    170 <?php }
    171 endif; // twentyfourteen_admin_header_image
    172  No newline at end of file
     127<?php
     128}
     129endif; // twentyfourteen_admin_header_image
  • wp-content/themes/twentyfourteen/inc/customizer.php

     
    184184function twentyfourteen_customize_preview_js() {
    185185        wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20120827', true );
    186186}
    187 add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' );
    188  No newline at end of file
     187add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' );
  • wp-content/themes/twentyfourteen/inc/template-tags.php

     
    3535
    3636        ?>
    3737        <nav role="navigation" id="<?php echo $nav_id; ?>" class="<?php echo $nav_class; ?>">
    38                 <h1 class="assistive-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
     38                <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
    3939
    4040        <?php if ( is_single() ) : // navigation links for single posts ?>
    4141
     
    182182        delete_transient( 'all_the_cool_cats' );
    183183}
    184184add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
    185 add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
     185add_action( 'save_post',     'twentyfourteen_category_transient_flusher' );
    186186
    187187/**
    188188 * Include the Post-Format-specific template for the content.
    189189 * This is called in index.php and single.php
    190190 */
    191191function twentyfourteen_get_template_part() {
    192 
    193         $format = get_post_format();
    194 
    195         switch( $format ) {
    196                 case 'aside':
    197                 case 'quote':
    198                 case 'link':
    199                 case 'video':
    200                 case 'image':
    201                         get_template_part( 'content', 'post-format' );
    202                         break;
    203                 default:
    204                         get_template_part( 'content', get_post_format() );
    205                         break;
    206         }
    207 
    208 }
    209  No newline at end of file
     192        if ( has_post_format( array( 'aside', 'quote', 'link', 'video', 'image' ) ) )
     193                get_template_part( 'content', 'post-format' );
     194        else
     195                get_template_part( 'content', get_post_format() );
     196}
  • wp-content/themes/twentyfourteen/content-single.php

     
    33 * @package WordPress
    44 * @subpackage Twenty_Fourteen
    55 */
    6 $format = get_post_format();
    7 if ( false === $format )
    8         $format = 'standard';
     6has_post_format()
    97?>
    108
    119<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    12         <?php if ( ( 'video' != $format ) && ( 'image' != $format ) && ( 'aside' != $format ) && ( 'link' != $format ) && ( 'quote' != $format ) ) : ?>
     10        <?php if ( has_post_thumbnail() && ! has_post_format( array( 'video', 'image', 'aside', 'link', 'quote' ) ) ) : ?>
    1311        <div class="attachment-featured-thumbnail">
    14         <?php
    15                 if ( '' != get_the_post_thumbnail() )
    16                         the_post_thumbnail( 'featured-thumbnail-large' );
    17         ?>
     12        <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
    1813        </div>
    1914        <?php endif; ?>
    2015
    2116        <header class="entry-header">
     17                <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    2218                <div class="entry-meta">
    23                         <?php
    24                                 /* translators: used between list items, there is a space after the comma */
    25                                 $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) );
    26                                 if ( $categories_list && twentyfourteen_categorized_blog() ) :
    27                         ?>
    28                         <span class="cat-links">
    29                                 <?php echo $categories_list; ?>
    30                         </span>
    31                         <?php endif; // End if categories ?>
     19                        <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
    3220                </div><!-- .entry-meta -->
     21                <?php
     22                        endif;
    3323
    34                 <?php if ( ( 'standard' == $format ) || ( 'video' == $format ) || ( 'image' == $format ) || ( 'gallery' == $format ) ) : ?>
    35                         <h1 class="entry-title"><?php the_title(); ?></h1>
    36                 <?php endif; ?>
     24                        if ( ! has_post_format( array( 'status', 'chat', 'aside', 'link', 'quote', 'audio' ) ) ) :
     25                                the_title( '<h1 class="entry-title">', '</h1>' );
     26                        endif;
     27                ?>
    3728
    3829                <div class="entry-meta">
    39                         <?php if ( 'standard' != $format ) : ?>
     30                        <?php if ( has_post_format() ) : ?>
    4031                        <span class="post-format">
    4132                                <a class="entry-format" href="<?php echo esc_url( get_post_format_link( get_post_format() ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'twentyfourteen' ), get_post_format_string( get_post_format() ) ) ); ?>"><?php echo get_post_format_string( get_post_format() ); ?></a>
    4233                        </span>
     
    4435
    4536                        <?php twentyfourteen_posted_on(); ?>
    4637
    47                         <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
     38                        <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
    4839                        <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
    4940                        <?php endif; ?>
    5041
     
    5243                </div><!-- .entry-meta -->
    5344        </header><!-- .entry-header -->
    5445
    55         <div class="entry-content clearfix">
    56                 <?php the_content(); ?>
     46        <div class="entry-content">
    5747                <?php
     48                        the_content();
    5849                        wp_link_pages( array(
    5950                                'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
    6051                                'after'       => '</div>',
    6152                                'link_before' => '<span>',
    62                                 'link_after'  => '</span>'
     53                                'link_after'  => '</span>',
    6354                        ) );
    6455                ?>
    6556        </div><!-- .entry-content -->
    6657
    6758        <footer class="entry-meta">
    68                 <?php if ( ( 'quote' == $format ) || ( 'aside' == $format ) ) : ?>
     59                <?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?>
    6960                <div class="entry-meta">
    70                         <?php the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); ?>
     61                        <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
    7162                </div><!-- .entry-meta -->
    7263                <?php endif; ?>
    7364
    74                 <?php
    75                         $tag_list = get_the_tag_list();
    76                         if ( '' != $tag_list ) :
    77                 ?>
     65                <?php if ( has_tag() ) : ?>
    7866                        <span class="tag-links">
    79                                 <?php echo $tag_list; ?>
     67                                <?php echo get_the_tag_list(); ?>
    8068                        </span>
    81                 <?php endif; // End if $tag_list ?>
     69                <?php endif; ?>
    8270        </footer><!-- .entry-meta -->
    83 </article><!-- #post-<?php the_ID(); ?> -->
     71</article><!-- #post-## -->
  • wp-content/themes/twentyfourteen/search.php

     
    1111<section id="primary" class="content-area">
    1212        <div id="content" class="site-content" role="main">
    1313
    14         <?php if ( have_posts() ) : ?>
     14                <?php if ( have_posts() ) : ?>
    1515
    1616                <header class="page-header">
    17                         <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
     17                        <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
    1818                </header><!-- .page-header -->
    1919
    20                 <?php while ( have_posts() ) : the_post(); ?>
    21 
    22                         <?php twentyfourteen_get_template_part(); ?>
     20                <?php
     21                                while ( have_posts() ) :
     22                                        the_post();
    2323
    24                 <?php endwhile; ?>
     24                                        twentyfourteen_get_template_part();
     25                                endwhile;
    2526
    26                 <?php twentyfourteen_content_nav( 'nav-below' ); ?>
     27                                twentyfourteen_content_nav( 'nav-below' );
    2728
    28         <?php else : ?>
     29                        else :
     30                                get_template_part( 'no-results', 'search' );
    2931
    30                 <?php get_template_part( 'no-results', 'search' ); ?>
     32                        endif;
     33                ?>
    3134
    32         <?php endif; ?>
     35        </div><!-- #content -->
     36</section><!-- #primary -->
    3337
    34         </div><!-- #content .site-content -->
    35 </section><!-- #primary .content-area -->
    36 
    37 <?php get_sidebar( 'content' ); ?>
    38 
    39 <?php get_sidebar(); ?>
    40 
    41 <?php get_footer(); ?>
    42  No newline at end of file
     38<?php
     39get_sidebar( 'content' );
     40get_sidebar();
     41get_footer();
  • wp-content/themes/twentyfourteen/front-page.php

     
     1<?php
     2/**
     3 * The template for displaying the home page.
     4 *
     5 * @package WordPress
     6 * @subpackage Twenty_Fourteen
     7 */
     8
     9get_header(); ?>
     10
     11        <div class="front-page-content-wrapper">
     12                <div class="front-page-content-main">
     13
     14                        <?php if ( twentyfourteen_has_featured_posts() ) : ?>
     15                                <?php get_template_part( 'featured-content' ); ?>
     16                        <?php endif; ?>
     17
     18                        <div class="front-page-content-area">
     19
     20                                <div id="primary" class="content-area no-sidebar">
     21                                        <div id="content" class="site-content" role="main">
     22                                        <?php
     23                                                if ( have_posts() ) :
     24                                                        while ( have_posts() ) :
     25                                                                the_post();
     26
     27                                                                twentyfourteen_get_template_part();
     28
     29                                                                comments_template();
     30                                                        endwhile;
     31
     32                                                        twentyfourteen_content_nav( 'nav-below' );
     33
     34                                                else :
     35                                                        get_template_part( 'no-results', 'index' );
     36
     37                                                endif;
     38                                        ?>
     39                                        </div><!-- #content .site-content -->
     40                                </div><!-- #primary .content-area -->
     41
     42                                <?php get_template_part( 'recent-formatted-posts' ); ?>
     43
     44                        </div><!-- .front-page-content-area -->
     45
     46                </div><!-- .front-page-content-main -->
     47        </div><!-- .front-page-content-wrapper -->
     48
     49<?php
     50get_sidebar();
     51get_footer();
  • wp-content/themes/twentyfourteen/searchform.php

     
    66 * @subpackage Twenty_Fourteen
    77 */
    88?>
    9         <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
    10                 <label for="s" class="assistive-text"><?php _e( 'Search', 'twentyfourteen' ); ?></label>
    11                 <input type="text" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php esc_attr_e( 'Search &hellip;', 'twentyfourteen' ); ?>" />
    12                 <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyfourteen' ); ?>" />
    13         </form>
     9<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
     10        <label>
     11                <span class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'twentyfourteen' ); ?></span>
     12                <input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'twentyfourteen' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php _ex( 'Search for:', 'label', 'twentyfourteen' ); ?>">
     13        </label>
     14        <input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentyfourteen' ); ?>">
     15</form>
  • wp-content/themes/twentyfourteen/index.php

     
    1414
    1515get_header(); ?>
    1616
    17 <?php if ( is_front_page() ) : ?>
    18 
    19         <div class="front-page-content-wrapper">
    20                 <div class="front-page-content-main">
    21 
    22                         <?php if ( twentyfourteen_has_featured_posts() ) : ?>
    23                                 <?php get_template_part( 'featured-content' ); ?>
    24                         <?php endif; ?>
    25 
    26                         <div class="front-page-content-area clearfix">
    27 
    28                                 <div id="primary" class="content-area no-sidebar">
    29                                         <div id="content" class="site-content" role="main">
    30                                         <?php
    31                                                 if ( have_posts() ) :
    32                                                         while ( have_posts() ) :
    33                                                                 the_post();
    34                                                                 twentyfourteen_get_template_part();
    35                                                         endwhile;
    36 
    37                                                         twentyfourteen_content_nav( 'nav-below' );
    38                                                 else :
    39                                                         get_template_part( 'no-results', 'index' );
    40                                                 endif;
    41                                         ?>
    42                                         </div><!-- #content .site-content -->
    43                                 </div><!-- #primary .content-area -->
    44 
    45                                 <?php get_template_part( 'recent-formatted-posts' ); ?>
    46 
    47                         </div><!-- .front-page-content-area -->
    48 
    49                 </div><!-- .front-page-content-main -->
    50         </div><!-- .front-page-content-wrapper -->
    51 
    52         <?php get_sidebar(); ?>
    53 
    54 <?php else : ?>
    55 
    5617        <div id="primary" class="content-area">
    5718                <div id="content" class="site-content" role="main">
    5819
    59                 <?php if ( have_posts() ) : ?>
     20                <?php
     21                        if ( have_posts() ) :
     22                                while ( have_posts() ) :
     23                                        the_post();
    6024
    61                         <?php while ( have_posts() ) : the_post(); ?>
     25                                        twentyfourteen_get_template_part();
     26                                endwhile;
     27                                twentyfourteen_content_nav( 'nav-below' );
    6228
    63                                 <?php twentyfourteen_get_template_part(); ?>
     29                        else :
     30                                get_template_part( 'no-results', 'index' );
    6431
    65                         <?php endwhile; ?>
     32                        endif;
     33                ?>
    6634
    67                         <?php twentyfourteen_content_nav( 'nav-below' ); ?>
     35                </div><!-- #content -->
     36        </div><!-- #primary -->
    6837
    69                 <?php else : ?>
    70 
    71                         <?php get_template_part( 'no-results', 'index' ); ?>
    72 
    73                 <?php endif; ?>
    74 
    75                 </div><!-- #content .site-content -->
    76         </div><!-- #primary .content-area -->
    77 
    78         <?php get_sidebar( 'content' ); ?>
    79 
    80         <?php get_sidebar(); ?>
    81 
    82 <?php endif; // is_front_page() check ?>
    83 
    84 <?php get_footer(); ?>
     38<?php
     39get_sidebar( 'content' );
     40get_sidebar();
     41get_footer();
  • wp-content/themes/twentyfourteen/header.php

     
    1010?><!DOCTYPE html>
    1111<html <?php language_attributes(); ?> class="no-js">
    1212<head>
    13 <script>
    14 /**
    15  * Replaces class "no-js" with "js" in the <html>-tag when JavaScript is being used.
    16  * Allows easy styling for browsers [not] supporting/running JavaScript.
    17  */
    18 document.documentElement.className = document.documentElement.className.replace(/(\s|^)no-js(\s|$)/, '$1js$2');
    19 </script>
    2013<meta charset="<?php bloginfo( 'charset' ); ?>" />
    2114<meta name="viewport" content="width=device-width" />
    2215<title><?php wp_title( '|', true, 'right' ); ?></title>
     
    5952        <?php do_action( 'before' ); ?>
    6053
    6154        <?php $header_image = get_header_image();
    62         if ( ! empty( $header_image ) ) { ?>
     55        if ( ! empty( $header_image ) ) : ?>
    6356        <div id="site-header">
    6457                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    6558                        <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
    6659                </a>
    6760        </div>
    68         <?php } ?>
     61        <?php endif; ?>
    6962
    70         <header id="masthead" class="site-header clearfix" role="banner">
    71                 <div class="header-main clearfix">
     63        <header id="masthead" class="site-header" role="banner">
     64                <div class="header-main clear">
    7265                        <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    7366
    7467                        <div class="header-extra">
     
    8477                        </div>
    8578
    8679                        <nav role="navigation" class="site-navigation primary-navigation">
    87                                 <h1 class="assistive-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1>
    88                                 <div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div>
     80                                <h1 class="screen-reader-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1>
     81                                <div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div>
    8982                                <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    9083                        </nav>
    9184
     
    9588
    9689                <?php if ( $social_links ) : ?>
    9790                        <div class="social-links-wrapper hide">
    98                                 <ul class="social-links clearfix">
     91                                <ul class="social-links clear">
    9992                                        <?php if ( is_email( $email_link ) ) : ?>
    10093                                        <li class="email-link">
    10194                                                <a href="mailto:<?php echo antispambot( sanitize_email( $email_link ) ); ?>" class="genericon" title="<?php esc_attr_e( 'Email', 'twentyfourteen' ); ?>" target="_blank">
     
    188181                <?php endif; ?>
    189182
    190183                <div class="search-box-wrapper hide">
    191                         <div class="search-box clearfix">
     184                        <div class="search-box clear">
    192185                        <?php get_search_form(); ?>
    193186                        </div>
    194187                </div>
    195         </header><!-- #masthead .site-header -->
     188        </header><!-- #masthead -->
    196189
    197         <div id="main" class="site-main clearfix">
    198  No newline at end of file
     190        <div id="main" class="site-main">
  • wp-content/themes/twentyfourteen/footer.php

     
    22/**
    33 * The template for displaying the footer.
    44 *
    5  * Contains the closing of the id=main div and all content after
     5 * Contains footer content and the closing of the #main and #page div elements.
    66 *
    77 * @package WordPress
    88 * @subpackage Twenty_Fourteen
    99 */
    1010?>
    1111
    12         </div><!-- #main .site-main -->
     12                </div><!-- #main -->
    1313
    14         <?php get_sidebar( 'footer' ); ?>
     14                <?php get_sidebar( 'footer' ); ?>
    1515
    16         <footer id="colophon" class="site-footer" role="contentinfo">
    17                 <div class="site-info">
    18                         <?php do_action( 'twentyfourteen_credits' ); ?>
    19                         <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentythirteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
    20                 </div><!-- .site-info -->
    21         </footer><!-- #colophon .site-footer -->
    22 </div><!-- #page .hfeed .site -->
     16                <footer id="colophon" class="site-footer" role="contentinfo">
     17                        <div class="site-info">
     18                                <?php do_action( 'twentyfourteen_credits' ); ?>
     19                                <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentythirteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
     20                        </div><!-- .site-info -->
     21                </footer><!-- #colophon -->
     22        </div><!-- #page -->
    2323
    24 <?php wp_footer(); ?>
    25 
     24        <?php wp_footer(); ?>
    2625</body>
    2726</html>
     27 No newline at end of file
  • wp-content/themes/twentyfourteen/404.php

     
    1111        <div id="primary" class="content-area">
    1212                <div id="content" class="site-content" role="main">
    1313
    14                         <article id="post-0" class="post error404 not-found">
    15                                 <header class="entry-header">
    16                                         <h1 class="entry-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'twentyfourteen' ); ?></h1>
    17                                 </header><!-- .entry-header -->
    18 
    19                                 <div class="entry-content">
    20                                         <p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'twentyfourteen' ); ?></p>
    21 
    22                                         <?php get_search_form(); ?>
    23 
    24                                 </div><!-- .entry-content -->
    25                         </article><!-- #post-0 .post .error404 .not-found -->
     14                        <header class="page-header">
     15                                <h1 class="page-title"><?php _e( "Oops! That page can't be found.", 'twentyfourteen' ); ?></h1>
     16                        </header>
    2617
    27                 </div><!-- #content .site-content -->
    28         </div><!-- #primary .content-area -->
     18                        <div class="page-content">
     19                                <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfourteen' ); ?></p>
    2920
    30 <?php get_sidebar( 'content' ); ?>
     21                                <?php get_search_form(); ?>
     22                        </div><!-- .page-content -->
    3123
    32 <?php get_sidebar(); ?>
     24                </div><!-- #content -->
     25        </div><!-- #primary -->
    3326
    34 <?php get_footer(); ?>
    35  No newline at end of file
     27<?php
     28get_sidebar( 'content' );
     29get_sidebar();
     30get_footer();
  • wp-content/themes/twentyfourteen/single.php

     
    1010
    1111<div id="primary" class="content-area">
    1212        <div id="content" class="site-content" role="main">
    13 
    14         <?php while ( have_posts() ) : the_post(); ?>
    15 
    16                 <?php get_template_part( 'content', 'single' ); ?>
    17 
    18                 <?php twentyfourteen_content_nav( 'nav-below' ); ?>
    19 
    2013                <?php
    21                         // If comments are open or we have at least one comment, load up the comment template
    22                         if ( comments_open() || '0' != get_comments_number() )
    23                                 comments_template( '', true );
    24                 ?>
    25 
    26         <?php endwhile; // end of the loop. ?>
     14                        while ( have_posts() ) :
     15                                the_post();
    2716
    28         </div><!-- #content .site-content -->
    29 </div><!-- #primary .content-area -->
     17                                get_template_part( 'content', 'single' );
    3018
    31 <?php get_sidebar( 'content' ); ?>
     19                                twentyfourteen_content_nav( 'nav-below' );
    3220
    33 <?php get_sidebar(); ?>
     21                                // If comments are open or we have at least one comment, load up the comment template.
     22                                if ( comments_open() || get_comments_number() )
     23                                        comments_template();
     24                        endwhile;
     25                ?>
     26        </div><!-- #content -->
     27</div><!-- #primary -->
    3428
    35 <?php get_footer(); ?>
    36  No newline at end of file
     29<?php
     30get_sidebar( 'content' );
     31get_sidebar();
     32get_footer();
  • wp-content/themes/twentyfourteen/image.php

     
    99get_header();
    1010?>
    1111
    12 <div id="primary" class="content-area image-attachment">
     12<section id="primary" class="content-area image-attachment">
    1313        <div id="content" class="site-content full-width" role="main">
    1414
    1515        <?php while ( have_posts() ) : the_post(); ?>
    1616
    1717                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1818                        <header class="entry-header">
    19                                 <h1 class="entry-title"><?php the_title(); ?></h1>
     19                                <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
    2020
    2121                                <div class="entry-meta">
    2222                                        <?php $metadata = wp_get_attachment_metadata(); ?>
     
    3131                        </header><!-- .entry-header -->
    3232
    3333                        <div class="entry-content">
    34 
    3534                                <div class="entry-attachment">
    3635                                        <div class="attachment">
    37                                                 <?php
    38                                                         /**
    39                                                          * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
    40                                                          * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
    41                                                          */
    42                                                         $attachments = array_values( get_children( array(
    43                                                                 'post_parent'    => $post->post_parent,
    44                                                                 'post_status'    => 'inherit',
    45                                                                 'post_type'      => 'attachment',
    46                                                                 'post_mime_type' => 'image',
    47                                                                 'order'          => 'ASC',
    48                                                                 'orderby'        => 'menu_order ID'
    49                                                         ) ) );
    50                                                         foreach ( $attachments as $k => $attachment ) {
    51                                                                 if ( $attachment->ID == $post->ID )
    52                                                                         break;
    53                                                         }
    54                                                         $k++;
    55                                                         // If there is more than 1 attachment in a gallery
    56                                                         if ( count( $attachments ) > 1 ) {
    57                                                                 if ( isset( $attachments[ $k ] ) )
    58                                                                         // get the URL of the next image attachment
    59                                                                         $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
    60                                                                 else
    61                                                                         // or get the URL of the first image attachment
    62                                                                         $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
    63                                                         } else {
    64                                                                 // or, if there's only 1 image, get the URL of the image
    65                                                                 $next_attachment_url = wp_get_attachment_url();
    66                                                         }
    67                                                 ?>
    68 
    69                                                 <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
    70                                                         $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 1200, 1200 ) ); // Filterable image size.
    71                                                         echo wp_get_attachment_image( $post->ID, $attachment_size );
    72                                                 ?></a>
     36                                                <?php twentyfourteen_the_attached_image(); ?>
    7337                                        </div><!-- .attachment -->
    7438
    75                                         <?php if ( ! empty( $post->post_excerpt ) ) : ?>
     39                                        <?php if ( has_excerpt() ) : ?>
    7640                                        <div class="entry-caption">
    7741                                                <?php the_excerpt(); ?>
    7842                                        </div><!-- .entry-caption -->
    7943                                        <?php endif; ?>
    8044                                </div><!-- .entry-attachment -->
    8145
    82                                 <?php the_content(); ?>
    8346                                <?php
     47                                        the_content();
    8448                                        wp_link_pages( array(
    8549                                                'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
    8650                                                'after'       => '</div>',
    8751                                                'link_before' => '<span>',
    88                                                 'link_after'  => '</span>'
     52                                                'link_after'  => '</span>',
    8953                                        ) );
    9054                                ?>
    9155                        </div><!-- .entry-content -->
    9256
    9357                        <footer class="entry-meta">
    94                                 <?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?>
    95                                         <?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); ?>
    96                                 <?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?>
    97                                         <?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); ?>
    98                                 <?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?>
    99                                         <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyfourteen' ); ?>
    100                                 <?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?>
    101                                         <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' ); ?>
    102                                 <?php endif; ?>
     58                                <?php
     59                                        if ( comments_open() && pings_open() ) : // Comments and trackbacks open
     60                                                printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() );
     61                                        elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open
     62                                                printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() );
     63                                        elseif ( comments_open() && ! pings_open() ) : // Only comments open
     64                                                _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyfourteen' );
     65                                        elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed
     66                                                _e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' );
     67                                        endif;
     68                                ?>
    10369                        </footer><!-- .entry-meta -->
    104                 </article><!-- #post-<?php the_ID(); ?> -->
     70                </article><!-- #post-## -->
    10571
    10672                <nav id="image-navigation" class="site-navigation">
    10773                        <?php previous_image_link( false, __( '<div class="previous-image">Previous Image</div>', 'twentyfourteen' ) ); ?>
     
    11278
    11379        <?php endwhile; // end of the loop. ?>
    11480
    115         </div><!-- #content .site-content -->
    116 </div><!-- #primary .content-area .image-attachment -->
     81        </div><!-- #content -->
     82</section><!-- #primary -->
    11783
    118 <?php get_sidebar(); ?>
    119 
    120 <?php get_footer(); ?>
    121  No newline at end of file
     84<?php
     85get_sidebar();
     86get_footer();
  • wp-content/themes/twentyfourteen/style.css

     
    434434        vertical-align: top; /* Improves readability and alignment in all browsers */
    435435        width: 100%;
    436436}
    437 #searchform input[type="text"] {
     437.search-field {
    438438        width: 100%;
    439439}
    440440
     
    487487        margin: 0 auto;
    488488}
    489489
    490 /* Text meant only for screen readers */
    491 .assistive-text {
    492         clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
     490/* Assistive text */
     491.screen-reader-text {
    493492        clip: rect(1px, 1px, 1px, 1px);
    494493        position: absolute !important;
    495494}
    496495
     496.screen-reader-text:focus {
     497        background-color: #f1f1f1;
     498        border-radius: 3px;
     499        box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
     500        clip: auto !important;
     501        color: #21759b;
     502        display: block;
     503        font-size: 14px;
     504        font-weight: bold;
     505        height: auto;
     506        line-height: normal;
     507        padding: 15px 23px 14px;
     508        position: absolute;
     509        left: 5px;
     510        top: 5px;
     511        text-decoration: none;
     512        width: auto;
     513        z-index: 100000; /* Above WP toolbar */
     514}
     515
    497516/* Hidden */
    498517.hide {
    499518        display: none;
    500519}
    501520
    502 /* Clearing floats */
    503 .clearfix:after {
    504         clear: both;
    505 }
    506 .clearfix:before,
    507 .clearfix:after {
     521/* Clearing */
     522.clear:before,
     523.clear:after,
     524[class*="content"]:before,
     525[class*="content"]:after,
     526[class*="site"]:before,
     527[class*="site"]:after {
     528        content: '';
    508529        display: table;
    509         content: "";
     530}
     531
     532.clear:after,
     533[class*="content"]:after,
     534[class*="site"]:after {
     535        clear: both;
    510536}
    511537
    512538
     
    771797.search-box {
    772798        background-color: #35921f;
    773799}
    774 .search-box #searchform input[type="text"] {
     800.search-box .search-field {
    775801        background-color: #fff;
    776802        float: right;
    777803        font-size: 13px;
     
    10321058        content: '\0020\007c\0020';
    10331059}
    10341060.entry-content,
     1061.page-content,
    10351062.entry-summary {
    10361063        position: relative;
    10371064        z-index: 2;
    10381065}
    1039 .entry-content a {
     1066.entry-content a,
     1067.page-content a, {
    10401068        text-decoration: underline;
    10411069}
    10421070.entry-content table,
     
    10751103}
    10761104
    10771105/* #primary specific styles */
    1078 #primary .entry-header {
     1106#primary .entry-header,
     1107#primary .page-header {
    10791108        background-color: #fff;
    10801109        padding: 24px 10px 12px;
    10811110        padding: 2.4rem 1.0rem 1.2rem;
    10821111}
    1083 #primary .entry-title {
     1112#primary .entry-title,
     1113#primary .page-title {
    10841114        font-size: 33px;
    10851115        font-size: 3.3rem;
    10861116        font-weight: 300;
     
    10961126        text-transform: uppercase;
    10971127}
    10981128#primary .entry-content,
     1129#primary .page-content,
    10991130#primary .entry-summary {
    11001131        background-color: #fff;
    11011132        padding: 12px 10px 0;
     
    11651196
    11661197/* Page specific styles */
    11671198.page #primary .entry-header,
    1168 .error404 #primary .entry-header,
     1199.error404 #primary .page-header,
    11691200.single-attachment #primary .entry-header,
    11701201.page #primary .entry-content,
    1171 .error404 #primary .entry-content,
     1202.error404 #primary .page-content,
    11721203.single-attachment #primary .entry-content {
    11731204        padding-top: 0;
    11741205}
     
    12751306}
    12761307/* For Firefox to avoid jagged edge */
    12771308@-moz-document url-prefix() {
    1278   .tag-links a:before {
    1279      border-right: 10px solid #8c8c8c;
     1309        .tag-links a:before {
     1310                border-right: 10px solid #8c8c8c;
    12801311                left: -10px;
    12811312                left: -1.0rem;
    1282   }
     1313        }
    12831314}
    12841315.tag-links a:hover:before {
    12851316        border-right-color: #2b2b2b;
     
    15521583/* =404 Page
    15531584----------------------------------------------- */
    15541585
    1555 .error404 .entry-content #searchform {
     1586.error404 .page-content .search-form {
    15561587        margin-bottom: 36px;
    15571588        margin-bottom: 3.6rem;
    15581589}
    1559 .error404 .entry-content .widget-title,
    1560 .error404 .entry-content .widgettitle {
     1590.error404 .page-content .widget-title,
     1591.error404 .page-content .widgettitle {
    15611592        border-top: 5px solid #000;
    15621593        color: #2b2b2b;
    15631594        padding-top: 7px;
     
    15681599/* =Media
    15691600----------------------------------------------- */
    15701601
     1602img {
     1603        max-width: 100%;
     1604        height: auto;
     1605}
    15711606#site-header img,
    15721607.attachment-featured-thumbnail-large,
    15731608.entry-content img,
    15741609.comment-content img,
    15751610.widget img {
    1576         max-width: 100%;
    15771611        vertical-align: middle;
    15781612}
    1579 #site-header img,
    1580 .entry-content img,
    1581 .attachment-featured-thumbnail-large,
    1582 img[class*="align"],
    1583 img[class*="wp-image-"],
    1584 .widget img {
    1585         height: auto;
    1586 }
    1587 #site-header img,
    1588 .entry-content img,
    1589 img.size-full,
    1590 img.size-large,
    1591 img.wp-post-image {
    1592         max-width: 100%;
    1593         height: auto;
    1594 }
    15951613.attachment-featured-featured img,
    15961614.attachment-featured-thumbnail img {
    15971615        height: auto;
     
    16151633        margin-bottom: 7px;
    16161634        margin-bottom: 0.7rem;
    16171635}
    1618 .entry-content img.wp-smiley,
    1619 .comment-content img.wp-smiley {
     1636.wp-smiley {
    16201637        border: none;
    16211638        margin-bottom: 0;
    16221639        margin-top: 0;
     
    18511868        padding: 0 10px;
    18521869        padding: 0 1.0rem;
    18531870}
    1854 .commentlist {
     1871.comment-list {
    18551872        list-style: none;
    18561873        margin: 0 0 48px 0;
    18571874        margin: 0 0 4.8rem 0;
     
    18701887        color: #2b2b2b;
    18711888}
    18721889.comment-meta a,
    1873 .commentlist li.trackback a,
    1874 .commentlist li.pingback a {
     1890.comment-list li.trackback a,
     1891.comment-list li.pingback a {
    18751892        color: #8c8c8c;
    18761893}
    18771894.comment-author a:hover,
    18781895.comment-meta a:hover,
    1879 .commentlist li.trackback a:hover,
    1880 .commentlist li.pingback a:hover {
     1896.comment-list li.trackback a:hover,
     1897.comment-list li.pingback a:hover {
    18811898        color: #41a62a;
    18821899        text-decoration: none;
    18831900}
     
    18871904        content: '\007c\0020';
    18881905}
    18891906.comments-area article,
    1890 .commentlist li.trackback,
    1891 .commentlist li.pingback {
     1907.comment-list li.trackback,
     1908.comment-list li.pingback {
    18921909        border-top: 1px solid rgba(0, 0, 0, 0.1);
    18931910        margin-bottom: 24px;
    18941911        margin-bottom: 2.4rem;
    18951912        padding: 24px 10px 0;
    18961913        padding: 2.4rem 1.0rem 0;
    18971914}
    1898 .commentlist li:first-child article {
     1915.comment-list li:first-child article {
    18991916        border: none;
    19001917}
    19011918.comments-area article {
     
    19581975.comment-content ol ul {
    19591976        margin-bottom: 0;
    19601977}
    1961 .commentlist .children {
     1978.comment-list .children {
    19621979        list-style: none;
    19631980        margin-left: 20px;
    19641981        margin-left: 2.0rem;
     
    23152332}
    23162333
    23172334/* Search widget */
    2318 #searchsubmit {
     2335.search-submit {
    23192336        display: none;
    23202337}
    23212338
     
    24862503}
    24872504
    24882505
    2489 /* =Jetpack
    2490 ----------------------------------------------- */
    2491 
    2492 /* Infinite Scroll */
    2493 
    2494 /* Hide elements when IS is in use  */
    2495 .infinite-scroll #nav-below,
    2496 .infinite-scroll.neverending #colophon {
    2497         display: none;
    2498 }
    2499 .infinite-scroll #content {
    2500         margin-bottom: 48px;
    2501         margin-bottom: 4.8rem;
    2502 }
    2503 #infinite-handle {
    2504         margin-top: 48px;
    2505         margin-top: 4.8rem;
    2506         text-align: center;
    2507 }
    2508 #infinite-handle span {
    2509         background-color: #000;
    2510         border: 0;
    2511         border-radius: 2px;
    2512         color: #fff;
    2513         font-weight: 700;
    2514         font-size: 12px;
    2515         font-size: 1.2rem;
    2516         line-height: 1;
    2517         padding: 11px 35px 10px;
    2518         padding: 1.1rem 3.5rem 1.0rem;
    2519         text-transform: uppercase;
    2520 }
    2521 #infinite-handle span:before {
    2522         color: #fff;
    2523 }
    2524 #infinite-handle span:hover {
    2525         background-color: #41a62a;
    2526 }
    2527 .infinite-loader {
    2528         margin: 48px auto;
    2529         margin: 4.8rem auto;
    2530         width: 25px;
    2531         width: 2.5rem;
    2532         height: 24px;
    2533         height: 2.4rem;
    2534 }
    2535 #infinite-footer {
    2536         z-index: 10;
    2537 }
    2538 #infinite-footer .container {
    2539         border-width: 1px 1px 0 0;
    2540         margin: 0;
    2541 }
    2542 /* Reset when IS is finished  */
    2543 .infinite-scroll.infinity-end #content {
    2544         margin-bottom: 0;
    2545 }
    2546 .infinite-end.neverending #colophon {
    2547         display: block;
    2548 }
    2549 
    2550 
    2551 /* Sharing */
    2552 #main div.sharedaddy div.sd-block {
    2553         border-top: 1px dotted rgba(0, 0, 0, 0.1);
    2554 }
    2555 #main div.sharedaddy h3.sd-title {
    2556         font-size: 11px;
    2557         font-size: 1.1rem;
    2558         font-family: lato, sans-serif;
    2559         text-transform: uppercase;
    2560 }
    2561 #main div.sharedaddy .sd-like h3.sd-title {
    2562         width: 17.875%;
    2563 }
    2564 .entry-content > .pd-rating .rating-msg {
    2565         font-size: 12px;
    2566         font-size: 1.2rem;
    2567 }
    2568 
    2569 /* Stats image */
    2570 img#wpstats {
    2571         margin-top: -5px;
    2572         margin-top: -0.5rem;
    2573         position: absolute
    2574 }
    2575 
    2576 /* Subscription */
    2577 .jetpack_subscription_widget input[type="text"] {
    2578         padding: 4px !important;
    2579         width: 100% !important;
    2580 }
    2581 .comment-subscription-form {
    2582         margin-bottom: 0;
    2583 }
    2584 
    2585 
    2586 /* =WP.com
    2587 ----------------------------------------------- */
    2588 
    2589 /* Prevent stats images to break the layout */
    2590 img[src^="http://botd"] {
    2591         position: absolute;
    2592 }
    2593 
    2594 /* Corrects line number misalignemnt in GitHub Gist embeds */
    2595 .gist .gist-file .gist-data .line-numbers span {
    2596         line-height: 1.7142857142;
    2597 }
    2598 .entry-content .gist table {
    2599         margin-bottom: 0;
    2600 }
    2601 
    2602 
    26032506/* =Media Queries
    26042507----------------------------------------------- */
    26052508
     
    28532756                padding: 0 4.46428571%;
    28542757        }
    28552758        .page #primary .entry-header,
    2856         .error404 #primary .entry-header {
     2759        .error404 #primary .page-header {
    28572760                margin: 0 4.59183673%;
    28582761                padding: 0 4.46428571% 12px;
    28592762                padding: 0 4.46428571% 1.2rem;
     
    28872790                margin-top: 0;
    28882791        }
    28892792        .comments-area article,
    2890         .commentlist li.trackback,
    2891         .commentlist li.pingback {
     2793        .comment-list li.trackback,
     2794        .comment-list li.pingback {
    28922795                margin-bottom: 36px;
    28932796                margin-bottom: 3.6rem;
    28942797                padding-top: 36px;
     
    29142817        .nocomments,
    29152818        #comments #respond,
    29162819        .comments-area article,
    2917         .commentlist li.trackback,
    2918         .commentlist li.pingback,
     2820        .comment-list li.trackback,
     2821        .comment-list li.pingback,
    29192822        .post-navigation .nav-previous,
    29202823        .post-navigation .nav-next {
    29212824                padding-right: 9.12778904%;
     
    29342837        .full-width .comments-title,
    29352838        .full-width #comments #respond,
    29362839        .full-width .comments-area article,
    2937         .full-width .commentlist li.trackback,
    2938         .full-width .commentlist li.pingback {
     2840        .full-width .comment-list li.trackback,
     2841        .full-width .comment-list li.pingback {
    29392842                padding-right: 6.04307432%;
    29402843                padding-left: 6.04307432%;
    29412844        }
     
    29882891                margin: 1.2rem 8.03571428% 2.4rem 12.5%;
    29892892        }
    29902893        .page #primary .entry-header,
    2991         .error404 #primary .entry-header {
     2894        .error404 #primary .page-header {
    29922895                margin: 0 8.03571428% 0 12.5%;
    29932896        }
    29942897        #primary .full-width .entry-header,
     
    30172920        .nocomments,
    30182921        #comments #respond,
    30192922        .comments-area article,
    3020         .commentlist li.trackback,
    3021         .commentlist li.pingback,
     2923        .comment-list li.trackback,
     2924        .comment-list li.pingback,
    30222925        .post-navigation .nav-previous,
    30232926        .post-navigation .nav-next {
    30242927                padding-right: 12.39493534%;
     
    30272930        #comments #respond {
    30282931                padding-right: 13.8900862%;
    30292932        }
    3030         .commentlist,
    3031         .full-width .commentlist {
     2933        .comment-list,
     2934        .full-width .comment-list {
    30322935                margin-left: -70px;
    30332936                margin-left: -7.0rem;
    30342937        }
     
    30412944        .full-width .comments-title,
    30422945        .full-width #comments #respond,
    30432946        .full-width .comments-area article,
    3044         .full-width .commentlist li.trackback,
    3045         .full-width .commentlist li.pingback {
     2947        .full-width .comment-list li.trackback,
     2948        .full-width .comment-list li.pingback {
    30462949                padding-right: 11.30926724%;
    30472950                padding-left: 11.30926724%;
    30482951        }
     
    30672970        #page:before {
    30682971                background-color: #000;
    30692972                content: '';
     2973                display: block;
    30702974                height: 100%;
    30712975                min-height: 100%;
    30722976                position: absolute;
     
    31203024                margin: 0 0 0 -27.31707317%;
    31213025                width: 24.87804878%;
    31223026        }
    3123         #primary .entry-header {
     3027        #primary .entry-header,
     3028        #primary .page-header {
    31243029                margin: -48px 4.59183673% 0;
    31253030                margin: -4.8rem 4.59183673% 0;
    31263031                padding: 24px 4.46428571% 12px;
    31273032                padding: 2.4rem 4.46428571% 1.2rem;
    31283033        }
    31293034        #primary .entry-content,
     3035        #primary .page-content,
    31303036        #primary .entry-summary {
    31313037                margin: 0 4.59183673%;
    31323038                padding: 12px 4.46428571% 0;
     
    31863092                display: block;
    31873093        }
    31883094        .page #primary .entry-header,
    3189         .error404 #primary .entry-header {
     3095        .error404 #primary .page-header {
    31903096                margin: 0 4.59183673%;
    31913097                padding: 0 4.46428571% 12px;
    31923098                padding: 0 4.46428571% 1.2rem;
     
    32013107        }
    32023108        #primary .full-width .entry-header,
    32033109        #primary .full-width .entry-content,
     3110        #primary .full-width .page-content,
    32043111        #primary .full-width footer.entry-meta {
    32053112                margin: 0 5.882236%;
    32063113        }
     
    32083115        .nocomments,
    32093116        #comments #respond,
    32103117        .comments-area article,
    3211         .commentlist li.trackback,
    3212         .commentlist li.pingback,
     3118        .comment-list li.trackback,
     3119        .comment-list li.pingback,
    32133120        .post-navigation .nav-previous,
    32143121        .post-navigation .nav-next {
    32153122                padding-right: 9.87001616%;
    32163123                padding-left: 9.19765166%;
    32173124        }
    3218         .commentlist,
    3219         .full-width .commentlist {
     3125        .comment-list,
     3126        .full-width .comment-list {
    32203127                margin-left: 0;
    32213128        }
    32223129        .comment-navigation {
     
    32283135        .full-width .comments-title,
    32293136        .full-width #comments #respond,
    32303137        .full-width .comments-area article,
    3231         .full-width .commentlist li.trackback,
    3232         .full-width .commentlist li.pingback {
     3138        .full-width .comment-list li.trackback,
     3139        .full-width .comment-list li.pingback {
    32333140                padding-right: 5.882236%;
    32343141                padding-left: 5.882236%;
    32353142        }
     
    32833190}
    32843191
    32853192@media screen and (min-width: 1150px) {
    3286         #primary .entry-header {
     3193        #primary .entry-header,
     3194        #primary .page-header {
    32873195                margin: -48px 8.03571428% 0 12.5%;
    32883196                margin: -4.8rem 8.03571428% 0 12.5%;
    32893197        }
    32903198        #primary .entry-content,
     3199        #primary .page-content,
    32913200        #primary .entry-summary {
    32923201                margin: 0 8.03571428% 0 12.5%;
    32933202        }
     
    32993208        .nocomments,
    33003209        #comments #respond,
    33013210        .comments-area article,
    3302         .commentlist li.trackback,
    3303         .commentlist li.pingback,
     3211        .comment-list li.trackback,
     3212        .comment-list li.pingback,
    33043213        .post-navigation .nav-previous,
    33053214        .post-navigation .nav-next {
    33063215                padding-right: 12.44146986%;
     
    33093218        #comments #respond {
    33103219                padding-right: 13.73697916%;
    33113220        }
    3312         .commentlist,
    3313         .full-width .commentlist {
     3221        .comment-list,
     3222        .full-width .comment-list {
    33143223                margin-left: -70px;
    33153224                margin-left: -7.0rem;
    33163225        }
     
    33223231                margin: 0 8.03571428% 2.4rem 12.5%;
    33233232        }
    33243233        .page #primary .entry-header,
    3325         .error404 #primary .entry-header {
     3234        .error404 #primary .page-header {
    33263235                margin: 0 8.03571428% 0 12.5%;
    33273236        }
    33283237        #primary .full-width .entry-header,
    33293238        #primary .full-width .entry-content,
     3239        #primary .full-width .page-content,
    33303240        #primary .full-width footer.entry-meta {
    33313241                margin: 0 11.21868265%;
    33323242        }
     
    33363246        .full-width .comments-title,
    33373247        .full-width #comments #respond,
    33383248        .full-width .comments-area article,
    3339         .full-width .commentlist li.trackback,
    3340         .full-width .commentlist li.pingback {
     3249        .full-width .comment-list li.trackback,
     3250        .full-width .comment-list li.pingback {
    33413251                padding-right: 11.21868265%;
    33423252                padding-left: 11.21868265%;
    33433253        }
     
    33663276        }
    33673277        #primary .full-width .entry-header,
    33683278        #primary .full-width .entry-content,
     3279        #primary .full-width .page-content,
    33693280        #primary .full-width footer.entry-meta {
    33703281                margin: 0 0 0 11.21868265%;
    33713282        }
     
    33753286        .full-width .comments-title,
    33763287        .full-width #comments #respond,
    33773288        .full-width .comments-area article,
    3378         .full-width .commentlist li.trackback,
    3379         .full-width .commentlist li.pingback {
     3289        .full-width .comment-list li.trackback,
     3290        .full-width .comment-list li.pingback {
    33803291                padding-right: 0;
    33813292        }
    33823293}
     3294 No newline at end of file
  • wp-content/themes/twentyfourteen/full-width-page.php

     
    88
    99get_header(); ?>
    1010
    11 <?php if ( is_front_page() ) : ?>
    12 
    13         <div class="front-page-content-wrapper">
    14                 <div class="front-page-content-main">
    15 
    16                         <?php if ( twentyfourteen_has_featured_posts() ) : ?>
    17                                 <?php get_template_part( 'featured-content' ); ?>
    18                         <?php endif; ?>
    19 
    20                         <div class="front-page-content-area clearfix">
    21 
    22                                 <div id="primary" class="content-area no-sidebar">
    23                                         <div id="content" class="site-content full-width" role="main">
    24                                         <?php
    25                                                 if ( have_posts() ) :
    26                                                         while ( have_posts() ) :
    27                                                                 the_post();
    28                                                                 get_template_part( 'content', 'page' );
    29                                                                 comments_template( '', true );
    30                                                         endwhile;
    31 
    32                                                         twentyfourteen_content_nav( 'nav-below' );
    33                                                 else :
    34                                                         get_template_part( 'no-results', 'index' );
    35                                                 endif;
    36                                         ?>
    37                                         </div><!-- #content .site-content -->
    38                                 </div><!-- #primary .content-area -->
    39 
    40                         </div><!-- .front-page-content-area -->
    41 
    42                 </div><!-- .front-page-content-main -->
    43         </div><!-- .front-page-content-wrapper -->
    44 
    45 <?php else : ?>
    46 
    4711        <div id="primary" class="content-area">
    4812                <div id="content" class="site-content full-width" role="main">
    49 
    50                         <?php while ( have_posts() ) : the_post(); ?>
    51 
    52                                 <?php get_template_part( 'content', 'page' ); ?>
     13                        <?php
     14                                while ( have_posts() ) :
     15                                        the_post();
    5316
    54                                 <?php comments_template( '', true ); ?>
     17                                        get_template_part( 'content', 'page' );
    5518
    56                         <?php endwhile; ?>
     19                                        // If comments are open or we have at least one comment, load up the comment template.
     20                                        if ( comments_open() || get_comments_number() )
     21                                                comments_template();
     22                                endwhile;
     23                        ?>
     24                </div><!-- #content -->
     25        </div><!-- #primary -->
    5726
    58                 </div><!-- #content .site-content -->
    59         </div><!-- #primary .content-area -->
    60 
    61 <?php endif; // is_front_page() check ?>
    62 
    63 <?php get_sidebar(); ?>
    64 
    65 <?php get_footer(); ?>
     27<?php
     28get_sidebar();
     29get_footer();
  • wp-content/themes/twentyfourteen/content-page.php

     
    11<?php
    22/**
    3  * The template used for displaying page content in page.php
     3 * The template used for displaying page content.
    44 *
    55 * @package WordPress
    66 * @subpackage Twenty_Fourteen
     
    88?>
    99
    1010<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    11         <header class="entry-header">
    12                 <h1 class="entry-title"><?php the_title(); ?></h1>
    13         </header><!-- .entry-header -->
     11        <?php the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); ?>
    1412
    15         <div class="entry-content clearfix">
    16                 <?php the_content(); ?>
     13        <div class="entry-content">
    1714                <?php
     15                        the_content();
    1816                        wp_link_pages( array(
    1917                                'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
    2018                                'after'       => '</div>',
    2119                                'link_before' => '<span>',
    22                                 'link_after'  => '</span>'
     20                                'link_after'  => '</span>',
    2321                        ) );
     22
     23                        edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
    2424                ?>
    25                 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
    2625        </div><!-- .entry-content -->
    27 </article><!-- #post-<?php the_ID(); ?> -->
     26</article><!-- #post-## -->