Make WordPress Core

Changeset 25023


Ignore:
Timestamp:
08/15/2013 12:24:27 AM (11 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: second pass at matching code standards achieved with Twenty Thirteen development. See #24858, props obenland.

Location:
trunk/src/wp-content/themes/twentyfourteen
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/archive.php

    r25021 r25023  
    5050                    twentyfourteen_get_template_part();
    5151                endwhile;
    52                 twentyfourteen_content_nav( 'nav-below' );
     52                twentyfourteen_paging_nav();
    5353
    5454            else :
  • trunk/src/wp-content/themes/twentyfourteen/comments.php

    r25021 r25023  
    5757
    5858    <?php if ( ! comments_open() ) : ?>
    59     <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
     59    <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
    6060    <?php endif; ?>
    6161
  • trunk/src/wp-content/themes/twentyfourteen/content-post-format.php

    r25021 r25023  
    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 ); ?>
     13                $image = array_shift( $images );
     14                ?>
    1515                <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">
    1616                <?php echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-large' ); ?>
    17                 </a><?php
     17                </a>
     18                <?php
    1819            endif;
    1920        endif;
     
    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 exists */
    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">
  • trunk/src/wp-content/themes/twentyfourteen/content-single.php

    r25021 r25023  
    44 * @subpackage Twenty_Fourteen
    55 */
    6 has_post_format()
    76?>
    87
     
    2827
    2928        <div class="entry-meta">
    30             <?php if ( has_post_format() ) : ?>
     29            <?php if ( has_post_format( array( 'status', 'chat', 'aside', 'link', 'quote', 'audio' ) ) ) : ?>
    3130            <span class="post-format">
    3231                <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>
  • trunk/src/wp-content/themes/twentyfourteen/featured-content.php

    r25021 r25023  
     1<?php
     2/**
     3 * The template for displaying featured content.
     4 *
     5 * @todo: Add support for featured content.
     6 *
     7 * @package WordPress
     8 * @subpackage Twenty_Fourteen
     9 */
     10?>
     11
    112<div class="featured-content-wrapper">
    213    <div id="featured-content" class="featured-content">
  • trunk/src/wp-content/themes/twentyfourteen/front-page.php

    r25021 r25023  
    2929                                comments_template();
    3030                            endwhile;
    31 
    32                             twentyfourteen_content_nav( 'nav-below' );
     31                            twentyfourteen_paging_nav();
    3332
    3433                        else :
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r25021 r25023  
    11<?php
    22/**
    3  * Twenty Fourteen functions and definitions
     3 * Twenty Fourteen functions and definitions.
     4 *
     5 * Sets up the theme and provides some helper functions, which are used in the
     6 * theme as custom template tags. Others are attached to action and filter
     7 * hooks in WordPress to change core functionality.
     8 *
     9 * When using a child theme (see http://codex.wordpress.org/Theme_Development
     10 * and http://codex.wordpress.org/Child_Themes), you can override certain
     11 * functions (those wrapped in a function_exists() call) by defining them first
     12 * in your child theme's functions.php file. The child theme's functions.php
     13 * file is included before the parent theme's file, so the child theme
     14 * functions would be used.
     15 *
     16 * Functions that are not pluggable (not wrapped in function_exists()) are
     17 * instead attached to a filter or action hook.
     18 *
     19 * For more information on hooks, actions, and filters,
     20 * see http://codex.wordpress.org/Plugin_API
    421 *
    522 * @package WordPress
     
    825
    926/**
    10  * Set the content width based on the theme's design and stylesheet.
    11  *
     27 * Sets up the content width value based on the theme's design.
     28 * @see twentyfourteen_content_width() for template-specific adjustments.
    1229 */
    1330if ( ! isset( $content_width ) )
    14     $content_width = 474; /* pixels */
    15 
    16 function twentyfourteen_set_content_width() {
    17     global $content_width;
    18     if ( is_page_template( 'full-width-page.php' ) || is_attachment() )
    19         $content_width = 895;
    20 }
    21 add_action( 'template_redirect', 'twentyfourteen_set_content_width' );
     31    $content_width = 474;
    2232
    2333if ( ! function_exists( 'twentyfourteen_setup' ) ) :
     
    2535 * Sets up theme defaults and registers support for various WordPress features.
    2636 *
    27  * Note that this function is hooked into the after_setup_theme hook, which runs
    28  * before the init hook. The init hook is too late for some features, such as indicating
    29  * support post thumbnails.
     37 * Note that this function is hooked into the after_setup_theme hook, which
     38 * runs before the init hook. The init hook is too late for some features, such
     39 * as indicating support post thumbnails.
    3040 */
    3141function twentyfourteen_setup() {
    3242
    33     /**
    34      * Make theme available for translation
    35      * Translations can be filed in the /languages/ directory
    36      * If you're building a theme based on Twenty Fourteen, use a find and replace
    37      * to change 'twentyfourteen' to the name of your theme in all the template files
     43    /*
     44     * Makes Twenty Fourteen available for translation.
     45     *
     46     * Translations can be added to the /languages/ directory.
     47     * If you're building a theme based on Twenty Fourteen, use a find and
     48     * replace to change 'twentyfourteen' to the name of your theme in all
     49     * template files.
    3850     */
    3951    load_theme_textdomain( 'twentyfourteen', get_template_directory() . '/languages' );
    4052
    41     /**
    42      * Add default posts and comments RSS feed links to head
    43      */
     53    // Adds RSS feed links to <head> for posts and comments.
    4454    add_theme_support( 'automatic-feed-links' );
    4555
    46     /**
    47      * Enable support for Post Thumbnails
    48      */
     56    // Enable support for Post Thumbnails.
    4957    add_theme_support( 'post-thumbnails', array( 'post' ) );
    5058
    51     /**
    52      * Adding several sizes for Post Thumbnails
    53      */
     59    // Adding several sizes for Post Thumbnails.
    5460    add_image_size( 'featured-thumbnail-large', 672, 0 );
    5561    add_image_size( 'featured-thumbnail-featured', 672, 336, true );
    5662    add_image_size( 'featured-thumbnail-formatted', 306, 0 );
    5763
    58     /**
    59      * This theme uses wp_nav_menu() in one location.
     64    // This theme uses wp_nav_menu() in two locations.
     65    register_nav_menus( array(
     66        'primary'   => __( 'Top primary menu', 'twentyfourteen' ),
     67        'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),
     68    ) );
     69
     70    /*
     71     * Enable support for Post Formats.
     72     * See http://codex.wordpress.org/Post_Formats
    6073     */
    61     register_nav_menus( array(
    62         'primary' => __( 'Top primary menu', 'twentyfourteen' ),
    63         'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' )
    64     ) );
    65 
    66     /**
    67      * Enable support for Post Formats
    68      */
    69     add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery' ) );
    70 
    71     /**
     74    add_theme_support( 'post-formats', array(
     75        'aside', 'image', 'video', 'quote', 'link', 'gallery'
     76    ) );
     77
     78    /*
    7279     * This theme allows users to set a custom background.
    7380     */
     
    8087
    8188/**
     89 * Adjusts content_width value for full width and attachment templates.
     90 *
     91 * @return void
     92 */
     93function twentyfourteen_content_width() {
     94    if ( is_page_template( 'full-width-page.php' ) || is_attachment() )
     95        $GLOBALS['content_width'] = 895;
     96}
     97add_action( 'template_redirect', 'twentyfourteen_content_width' );
     98
     99/**
    82100 * Getter function for Featured Content Plugin.
    83  *
    84101 */
    85102function twentyfourteen_get_featured_posts() {
     
    91108 * So that we can use a condition like
    92109 * if ( twentyfourteen_has_featured_posts( 1 ) )
    93  *
    94110 */
    95111function twentyfourteen_has_featured_posts( $minimum = 1 ) {
     
    97113        return false;
    98114
    99     $featured_posts = apply_filters( 'twentyfourteen_get_featured_posts', array() );
     115        $featured_posts = apply_filters( 'twentyfourteen_get_featured_posts', array() );
    100116
    101117    return is_array( $featured_posts ) && count( $featured_posts ) > absint( $minimum );
     
    103119
    104120/**
    105  * Register widgetized area and update sidebar with default widgets
    106  *
     121 * Registers two widget areas.
     122 *
     123 * @return void
    107124 */
    108125function twentyfourteen_widgets_init() {
     
    171188 * Register Google fonts for Twenty Fourteen.
    172189 *
     190 * @return void
    173191 */
    174192function twentyfourteen_fonts() {
     
    181199
    182200/**
    183  * Enqueue scripts and styles
    184  *
     201 * Enqueues scripts and styles for front end.
     202 *
     203 * @return void
    185204 */
    186205function twentyfourteen_scripts() {
     
    202221 * Enqueue Google fonts style to admin screen for custom header display.
    203222 *
     223 * @return void
    204224 */
    205225function twentyfourteen_admin_fonts() {
     
    209229
    210230/**
    211  * Implement the Custom Header feature
    212  *
    213  */
    214 require( get_template_directory() . '/inc/custom-header.php' );
    215 
    216 /**
    217231 * Sets the post excerpt length to 40 words.
    218232 *
     233 * @param int $length
     234 * @return int
    219235 */
    220236function twentyfourteen_excerpt_length( $length ) {
     
    226242 * Returns a "Continue Reading" link for excerpts
    227243 *
     244 * @return string
    228245 */
    229246function twentyfourteen_continue_reading_link() {
     
    232249
    233250/**
    234  * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
     251 * Replaces "[...]" (appended to automatically generated excerpts) with an
     252 * ellipsis and twentyeleven_continue_reading_link().
     253 *
     254 * @param string $more
     255 * @return string
    235256 */
    236257function twentyfourteen_auto_excerpt_more( $more ) {
     
    245266 * function tied to the get_the_excerpt filter hook.
    246267 *
     268 * @param string $output
     269 * @return string
    247270 */
    248271function twentyfourteen_custom_excerpt_more( $output ) {
     
    257280/**
    258281 * Prints the attached image with a link to the next attached image.
    259  *
    260  * @since Twenty Thirteen 1.0
    261282 *
    262283 * @return void
     
    281302        'post_mime_type' => 'image',
    282303        'order'          => 'ASC',
    283         'orderby'        => 'menu_order ID'
     304        'orderby'        => 'menu_order ID',
    284305    ) );
    285306
     
    428449
    429450/**
    430  * Adds custom classes to the array of body classes.
    431  *
     451 *  Extends the default WordPress body classes.
     452 *
     453 * Adds body classes to denote:
     454 * 1. Single or multiple authors.
     455 * 2. Index views.
     456 *
     457 * @param array $classes A list of existing body class values.
     458 * @return array The filtered body class list.
    432459 */
    433460function twentyfourteen_body_classes( $classes ) {
     
    445472
    446473/**
    447  * Filters wp_title to print a neat <title> tag based on what is being viewed.
    448  *
     474 * Creates a nicely formatted and more specific title element text for output
     475 * in head of document, based on current view.
     476 *
     477 * @param string $title Default title text for current view.
     478 * @param string $sep Optional separator.
     479 * @return string The filtered title.
    449480 */
    450481function twentyfourteen_wp_title( $title, $sep ) {
    451     global $page, $paged;
     482    global $paged, $page;
    452483
    453484    if ( is_feed() )
    454485        return $title;
    455486
    456     // Add the blog name
     487    // Add the site name.
    457488    $title .= get_bloginfo( 'name' );
    458489
    459     // Add the blog description for the home/front page.
     490    // Add the site description for the home/front page.
    460491    $site_description = get_bloginfo( 'description', 'display' );
    461492    if ( $site_description && ( is_home() || is_front_page() ) )
    462         $title .= " $sep $site_description";
    463 
    464     // Add a page number if necessary:
     493        $title = "$title $sep $site_description";
     494
     495    // Add a page number if necessary.
    465496    if ( $paged >= 2 || $page >= 2 )
    466         $title .= " $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
     497        $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
    467498
    468499    return $title;
     
    471502
    472503/**
     504 * Implement the Custom Header feature
     505 *
     506 */
     507require get_template_directory() . '/inc/custom-header.php';
     508
     509/**
    473510 * Custom template tags for this theme.
    474511 */
  • trunk/src/wp-content/themes/twentyfourteen/image.php

    r25021 r25023  
    7070        </article><!-- #post-## -->
    7171
    72         <nav id="image-navigation" class="site-navigation">
     72        <nav id="image-navigation" class="navigation image-navigation">
    7373            <?php previous_image_link( false, __( '<div class="previous-image">Previous Image</div>', 'twentyfourteen' ) ); ?>
    7474            <?php next_image_link( false, __( '<div class="next-image">Next Image</div>', 'twentyfourteen' ) ); ?>
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r25021 r25023  
    22/**
    33 * Custom template tags for this theme.
    4  *
    5  * Eventually, some of the functionality here could be replaced by core features
    64 *
    75 * @package WordPress
     
    97 */
    108
    11 if ( ! function_exists( 'twentyfourteen_content_nav' ) ) :
    12 /**
    13  * Display navigation to next/previous pages when applicable
    14  *
    15  */
    16 function twentyfourteen_content_nav( $nav_id ) {
    17     global $wp_query, $post;
    18 
    19     // Don't print empty markup on single pages if there's nowhere to navigate.
    20     if ( is_single() ) {
    21         $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );
    22         $next = get_adjacent_post( false, '', false );
    23 
    24         if ( ! $next && ! $previous )
    25             return;
    26     }
    27 
    28     // Don't print empty markup in archives if there's only one page.
    29     if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) )
     9if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
     10/**
     11 * Displays navigation to next/previous set of posts when applicable.
     12 *
     13 * @return void
     14 */
     15function twentyfourteen_paging_nav() {
     16    // Don't print empty markup if there's only one page.
     17    if ( $GLOBALS['wp_query']->max_num_pages < 2 )
    3018        return;
    3119
    32     $nav_class = 'site-navigation paging-navigation';
    33     if ( is_single() )
    34         $nav_class = 'site-navigation post-navigation';
    35 
    36     ?>
    37     <nav role="navigation" id="<?php echo $nav_id; ?>" class="<?php echo $nav_class; ?>">
     20    $paged        = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
     21    $pagenum_link = html_entity_decode( get_pagenum_link() );
     22    $query_args   = array();
     23    $url_parts    = explode( '?', $pagenum_link );
     24
     25    if ( isset( $url_parts[1] ) )
     26        wp_parse_str( $url_parts[1], $query_args );
     27
     28    $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
     29    $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
     30
     31    $format  = $GLOBALS['wp_rewrite']->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
     32    $format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( 'page/%#%', 'paged' ) : '?paged=%#%';
     33
     34    $links   = paginate_links( array(
     35        'base'     => $pagenum_link,
     36        'format'   => $format,
     37        'total'    => $GLOBALS['wp_query']->max_num_pages,
     38        'current'  => $paged,
     39        'mid_size' => 1,
     40        'add_args' => array_map( 'urlencode', $query_args ),
     41        'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
     42        'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
     43    ) );
     44
     45    if ( $links ) :
     46
     47    ?>
     48    <nav class="navigation paging-navigation" role="navigation">
     49        <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentyfourteen' ); ?></h1>
     50        <div class="pagination loop-pagination">
     51            <?php echo $links; ?>
     52        </div><!-- .pagination -->
     53    </nav><!-- .navigation -->
     54    <?php
     55    endif;
     56}
     57endif;
     58
     59if ( ! function_exists( 'twentyfourteen_post_nav' ) ) :
     60/**
     61 * Displays navigation to next/previous post when applicable.
     62*
     63* @return void
     64*/
     65function twentyfourteen_post_nav() {
     66    // Don't print empty markup if there's nowhere to navigate.
     67    $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
     68    $next     = get_adjacent_post( false, '', false );
     69
     70    if ( ! $next && ! $previous )
     71        return;
     72
     73    ?>
     74    <nav class="navigation post-navigation" role="navigation">
    3875        <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
    39 
    40     <?php if ( is_single() ) : // navigation links for single posts ?>
    41 
    42         <?php previous_post_link( '%link', __( '<div class="nav-previous"><span class="meta-nav">Previous Post</span>%title</div>', 'twentyfourteen' ) ); ?>
    43         <?php next_post_link( '%link', __( '<div class="nav-next"><span class="meta-nav">Next Post</span>%title</div>', 'twentyfourteen' ) ); ?>
    44 
    45     <?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
    46 
    47         <div class="pagination loop-pagination">
    48         <?php
    49             /* Get the current page. */
    50             $current = ( get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1 );
    51 
    52             /* Get the max number of pages. */
    53             $max_num_pages = intval( $wp_query->max_num_pages );
    54 
    55             /* Set up arguments for the paginate_links() function. */
    56             $args = array(
    57                 'base' => add_query_arg( 'paged', '%#%' ),
    58                 'format' => '',
    59                 'total' => $max_num_pages,
    60                 'current' => $current,
    61                 'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
    62                 'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
    63                 'mid_size' => 1
    64             );
    65 
    66             echo paginate_links( $args )
    67         ?>
    68         </div>
    69     <?php endif; ?>
    70 
    71     </nav><!-- #<?php echo $nav_id; ?> -->
    72     <?php
    73 }
    74 endif; // twentyfourteen_content_nav
     76        <div class="nav-links">
     77            <?php
     78                previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
     79                next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
     80            ?>
     81        </div><!-- .nav-links -->
     82    </nav><!-- .navigation -->
     83    <?php
     84}
     85endif;
    7586
    7687if ( ! function_exists( 'twentyfourteen_comment' ) ) :
     
    131142 * Prints HTML with meta information for the current post-date/time and author.
    132143 *
     144 * @return void
    133145 */
    134146function twentyfourteen_posted_on() {
     
    151163 * Returns true if a blog has more than 1 category
    152164 *
     165 * @return boolean
    153166 */
    154167function twentyfourteen_categorized_blog() {
  • trunk/src/wp-content/themes/twentyfourteen/index.php

    r25021 r25023  
    2525                    twentyfourteen_get_template_part();
    2626                endwhile;
    27                 twentyfourteen_content_nav( 'nav-below' );
     27                twentyfourteen_paging_nav();
    2828
    2929            else :
  • trunk/src/wp-content/themes/twentyfourteen/page.php

    r25021 r25023  
    2929            ?>
    3030
    31         </div><!-- #content .site-content -->
    32     </div><!-- #primary .content-area -->
     31        </div><!-- #content -->
     32    </div><!-- #primary -->
    3333
    3434<?php
  • trunk/src/wp-content/themes/twentyfourteen/rtl.css

    r24832 r25023  
    2626}
    2727
    28 ul ul, ol ol, ul ol, ol ul {
     28li > ul,
     29li > ol {
    2930    margin-right: 20px;
    3031    margin-right: 2.0rem;
     
    296297}
    297298
    298 .comment-meta,
     299.comment-metadata,
    299300.comment-content {
    300301    padding-right: 36px;
     
    309310}
    310311
    311 .commentlist .children {
     312.comment-list .children {
    312313    margin-right: 20px;
    313314    margin-right: 2.0rem;
     
    325326----------------------------------------------- */
    326327
    327 .widget ul ul,
    328 .widget ol ol,
    329 .widget ul ol,
    330 .widget ol ul {
     328.widget li > ul,
     329.widget li > ol {
    331330    margin: 0 10px 0 0;
    332331    margin: 0 1.0rem 0 0;
     
    338337    margin-right: 0.1rem;
    339338    margin-left: auto;
    340 }
    341 
    342 /* Authors Widget */
    343 .widget_authors img {
    344     margin: 0 0 9px 5px;
    345     margin: 0 0 0.9rem 0.5rem;
    346339}
    347340
     
    401394    #primary .byline a:before,
    402395    #primary .comments-link a:before,
    403     #primary .edit-link a:before,
     396    .entry-comment .edit-link a:before,
    404397    .attachment span.entry-date:before,
    405398    #primary .full-size-link a:before,
     
    447440    }
    448441
    449     #primary .edit-link a:before {
     442    .entry-comment .edit-link a:before {
    450443        margin: -1px 0 0 2px;
    451444        margin: -0.1rem 0 0 0.2rem;
    452445    }
    453446
    454     .page #primary .edit-link a:before {
     447    .page .entry-comment .edit-link a:before {
    455448        margin: 5px 0 0 2px;
    456449        margin: 0.5rem 0 0 0.2rem;
     
    504497    #comments #respond,
    505498    .comments-area article,
    506     .commentlist li.trackback,
    507     .commentlist li.pingback,
    508     .post-navigation .nav-previous,
    509     .post-navigation .nav-next {
     499    .comment-list li.trackback,
     500    .comment-list li.pingback,
     501    .post-navigation [rel="prev"],
     502    .post-navigation [rel="next"] {
    510503        padding-left: 9.12778904%;
    511504        padding-right: 9.12778904%;
     
    523516    .full-width #comments #respond,
    524517    .full-width .comments-area article,
    525     .full-width .commentlist li.trackback,
    526     .full-width .commentlist li.pingback {
     518    .full-width .comment-list li.trackback,
     519    .full-width .comment-list li.pingback {
    527520        padding-left: 6.04307432%;
    528521        padding-right: 6.04307432%;
     
    568561    #comments #respond,
    569562    .comments-area article,
    570     .commentlist li.trackback,
    571     .commentlist li.pingback,
    572     .post-navigation .nav-previous,
    573     .post-navigation .nav-next {
     563    .comment-list li.trackback,
     564    .comment-list li.pingback,
     565    .post-navigation [rel="prev"],
     566    .post-navigation [rel="next"] {
    574567        padding-left: 12.39493534%;
    575568        padding-right: 17.06896551%;
     
    580573    }
    581574
    582     .commentlist,
    583     .full-width .commentlist {
     575    .comment-list,
     576    .full-width .comment-list {
    584577        margin-right: -70px;
    585578        margin-right: -7.0rem;
     
    603596    .full-width #comments #respond,
    604597    .full-width .comments-area article,
    605     .full-width .commentlist li.trackback,
    606     .full-width .commentlist li.pingback {
     598    .full-width .comment-list li.trackback,
     599    .full-width .comment-list li.pingback {
    607600        padding-left: 11.30926724%;
    608601        padding-right: 11.30926724%;
     
    701694    #comments #respond,
    702695    .comments-area article,
    703     .commentlist li.trackback,
    704     .commentlist li.pingback,
    705     .post-navigation .nav-previous,
    706     .post-navigation .nav-next {
     696    .comment-list li.trackback,
     697    .comment-list li.pingback,
     698    .post-navigation [rel="prev"],
     699    .post-navigation [rel="next"] {
    707700        padding-left: 9.87001616%;
    708701        padding-right: 9.19765166%;
    709702    }
    710703
    711     .commentlist,
    712     .full-width .commentlist {
     704    .comment-list,
     705    .full-width .comment-list {
    713706        margin-right: 0;
    714707        margin-left: auto;
     
    726719    .full-width #comments #respond,
    727720    .full-width .comments-area article,
    728     .full-width .commentlist li.trackback,
    729     .full-width .commentlist li.pingback {
     721    .full-width .comment-list li.trackback,
     722    .full-width .comment-list li.pingback {
    730723        padding-left: 5.882236%;
    731724        padding-right: 5.882236%;
     
    772765    #comments #respond,
    773766    .comments-area article,
    774     .commentlist li.trackback,
    775     .commentlist li.pingback,
    776     .post-navigation .nav-previous,
    777     .post-navigation .nav-next {
     767    .comment-list li.trackback,
     768    .comment-list li.pingback,
     769    .post-navigation [rel="prev"],
     770    .post-navigation [rel="next"] {
    778771        padding-left: 12.44146986%;
    779772        padding-right: 16.77524429%;
     
    784777    }
    785778
    786     .commentlist,
    787     .full-width .commentlist {
     779    .comment-list,
     780    .full-width .comment-list {
    788781        margin-right: -70px;
    789782        margin-right: -7.0rem;
     
    812805    .full-width #comments #respond,
    813806    .full-width .comments-area article,
    814     .full-width .commentlist li.trackback,
    815     .full-width .commentlist li.pingback {
     807    .full-width .comment-list li.trackback,
     808    .full-width .comment-list li.pingback {
    816809        padding-left: 11.21868265%;
    817810        padding-right: 11.21868265%;
     
    853846    .full-width #comments #respond,
    854847    .full-width .comments-area article,
    855     .full-width .commentlist li.trackback,
    856     .full-width .commentlist li.pingback {
    857         padding-left: 0;
    858     }
    859 }
     848    .full-width .comment-list li.trackback,
     849    .full-width .comment-list li.pingback {
     850        padding-left: 0;
     851    }
     852}
  • trunk/src/wp-content/themes/twentyfourteen/search.php

    r25021 r25023  
    2424                    twentyfourteen_get_template_part();
    2525                endwhile;
    26 
    27                 twentyfourteen_content_nav( 'nav-below' );
     26                twentyfourteen_paging_nav();
    2827
    2928            else :
  • trunk/src/wp-content/themes/twentyfourteen/sidebar-content.php

    r24832 r25023  
    3131        </aside>
    3232    <?php endif; // end sidebar widget area ?>
    33 </div><!-- #content-sidebar .widget-area -->
     33</div><!-- #content-sidebar -->
  • trunk/src/wp-content/themes/twentyfourteen/sidebar.php

    r25021 r25023  
    11<?php
    22/**
    3  * The Sidebar containing the main widget areas.
     3 * The Sidebar containing the main widget area.
    44 *
    55 * @package WordPress
     
    2121        </nav>
    2222        <?php endif; ?>
    23     </div>
     23    </div><!-- #secondary-top -->
    2424
    2525    <div id="secondary-bottom" class="widget-area" role="complementary">
     
    2828            dynamic_sidebar( 'sidebar-1' );
    2929        ?>
    30     </div><!-- .widget-area -->
     30    </div><!-- #secondary-bottom -->
    3131</div><!-- #secondary -->
  • trunk/src/wp-content/themes/twentyfourteen/single.php

    r25021 r25023  
    1717                get_template_part( 'content', 'single' );
    1818
    19                 twentyfourteen_content_nav( 'nav-below' );
     19                twentyfourteen_post_nav();
    2020
    2121                // If comments are open or we have at least one comment, load up the comment template.
  • trunk/src/wp-content/themes/twentyfourteen/style.css

    r25021 r25023  
    17811781    margin: 2.4rem 0 0;
    17821782}
    1783 .post-navigation .nav-previous,
    1784 .post-navigation .nav-next,
     1783.post-navigation [rel="prev"],
     1784.post-navigation [rel="next"],
    17851785#image-navigation .previous-image,
    17861786#image-navigation .next-image  {
     
    17941794    width: 100%;
    17951795}
    1796 .post-navigation .nav-next {
     1796.post-navigation [rel="next"] {
    17971797    margin: 0;
    17981798}
     
    18641864    text-transform: uppercase;
    18651865}
    1866 #respond #commentform {
     1866#commentform {
    18671867    background: #fff;
    18681868    padding: 0 10px;
     
    19661966}
    19671967.comment-content ul,
    1968 .comment-content ol  {
     1968.comment-content ol {
    19691969    margin: 0 0 24px 22px;
    19701970    margin: 0 0 2.4rem 2.2rem;
    19711971}
    1972 .comment-content ul ul,
    1973 .comment-content ol ol,
    1974 .comment-content ul ol,
    1975 .comment-content ol ul {
     1972.comment-content li > ul,
     1973.comment-content li > ol {
    19761974    margin-bottom: 0;
    19771975}
     
    19981996    margin-bottom: 2.4rem;
    19991997}
    2000 .nocomments {
     1998.no-comments {
    20011999    color: #8c8c8c;
    20022000    font-size: 16px;
     
    20772075    margin: 0;
    20782076}
    2079 .widget ul ul,
    2080 .widget ol ol,
    2081 .widget ul ol,
    2082 .widget ol ul {
     2077.widget li > ul,
     2078.widget li > ol {
    20832079    margin: 0 0 0 10px;
    20842080    margin: 0 0 0 1.0rem;
     
    20902086    font-weight: 900;
    20912087    line-height: 1.7142857142;
     2088    margin: 0 0 24px 0;
    20922089    margin: 0 0 2.4rem 0;
    2093     margin: 0 0 24px 0;
    20942090    text-transform: uppercase;
    20952091}
     
    21462142}
    21472143
    2148 /* Authors Widget */
    2149 .widget_authors > ul > li {
    2150     list-style: none;
    2151     margin-bottom: 18px;
    2152     margin-bottom: 1.8rem;
    2153 }
    2154 .widget_authors > ul > li:last-child {
    2155     margin-bottom: 0;
    2156 }
    2157 .widget_authors img {
    2158     border-radius: 2;
    2159     margin: 0 5px 9px 0;
    2160     margin: 0 0.5rem 0.9rem 0;
    2161     vertical-align: middle;
    2162 }
    2163 .widget_authors ul ul {
    2164     margin: 0;
    2165 }
    2166 
    2167 /* Author Grid Widget */
    2168 .widget_author_grid .avatar {
    2169     max-width: none;
    2170 }
    2171 
    2172 /* Blog Subscription */
    2173 .widget_blog_subscription input[type="text"] {
    2174     padding: 4px !important;
    2175     padding: 0.4rem !important;
    2176 }
    2177 
    21782144/* Caledar widget*/
    21792145.widget_calendar #wp-calendar a {
     
    22262192}
    22272193
    2228 /* Contact Info Widget */
    2229 .widget_contact_info #contact-map {
    2230     margin-bottom: 18px;
    2231     margin-bottom: 1.8rem;
    2232 }
    2233 .widget_contact_info #contact-info-map-canvas {
    2234     height: 168px;
    2235     height: 16.8rem;
    2236 }
    2237 
    2238 /* Flickr Widget (WP.com) */
    2239 .widget_flickr #flickr_badge_uber_wrapper {
    2240     margin-top: 4px;
    2241     margin-top: 0.4rem;
    2242 }
    2243 .widget_flickr #flickr_badge_uber_wrapper a:link,
    2244 .widget_flickr #flickr_badge_uber_wrapper a:active,
    2245 .widget_flickr #flickr_badge_uber_wrapper a:visited {
    2246     color: #fff;
    2247 }
    2248 .widget_flickr #flickr_badge_uber_wrapper a:hover {
    2249     color: #5FF23D;
    2250 }
    2251 .widget_flickr #flickr_badge_wrapper {
    2252     background-color: transparent;
    2253     border: none;
    2254 }
    2255 
    2256 /* Gravatar Profile widget */
    2257 .widget-area .widget-grofile h4 {
    2258     color: rgba(255, 255, 255, 0.75);
    2259     font-size: 11px;
    2260     font-size: 1.1rem;
    2261     line-height: 1.6363636363;
    2262     margin: 18px 0 0;
    2263     margin: 1.8rem 0 0;
    2264     text-transform: uppercase;
    2265 }
    2266 .widget-grofile .grofile-accounts {
    2267     margin-top: 4px;
    2268     margin-top: 0.4rem;
    2269 }
    2270 
    2271 /* Milestone Widget */
    2272 .widget-area .milestone-widget .milestone-content {
    2273     max-width: 100%;
    2274 }
    2275 .widget-area .milestone-countdown,
    2276 .widget-area .milestone-message {
    2277     border-color: rgba(255, 255, 255, 0.1);
    2278     border-top: 0;
    2279 }
    2280 .widget-area .milestone-header,
    2281 .widget-area .milestone-countdown,
    2282 .widget-area .milestone-message {
    2283     background-color: rgba(255, 255, 255, 0.1);
    2284     border: 1px solid rgba(255, 255, 255, 0.15);
    2285     color: rgba(255, 255, 255, 0.75);
    2286 }
    2287 .widget-area .milestone-countdown {
    2288     background-color: rgba(255, 255, 255, 0.1);
    2289 }
    2290 .widget-area .milestone-widget {
    2291     margin-bottom: 48px;
    2292     margin-bottom: 4.8rem;
    2293 }
    2294 .widget-area .milestone-content {
    2295     margin-top: 0;
    2296 }
    2297 
    22982194/* RSS Widget */
    22992195.widget_rss li {
     
    23352231.search-submit {
    23362232    display: none;
    2337 }
    2338 
    2339 /* Twitter Widget */
    2340 .widget_twitter li {
    2341     margin-bottom: 18px;
    2342     margin-bottom: 1.8rem;
    2343 }
    2344 .widget_twitter li:last-child {
    2345     margin-bottom: 0;
    2346 }
    2347 .widget_twitter li a {
    2348     word-wrap: break-word;
    2349 }
    2350 .widget_twitter iframe {
    2351     margin: 18px 0 0;
    2352     margin: 1.8rem 0 0;
    23532233}
    23542234
     
    24532333    background-color: rgba(0, 0, 0, 0.02);
    24542334}
    2455 #content-sidebar .widget_flickr #flickr_badge_uber_wrapper a:link,
    2456 #content-sidebar .widget_flickr #flickr_badge_uber_wrapper a:active,
    2457 #content-sidebar .widget_flickr #flickr_badge_uber_wrapper a:visited {
    2458     color: #2b2b2b;
    2459 }
    2460 #content-sidebar .widget_flickr #flickr_badge_uber_wrapper a:hover {
    2461     color: #41a62a;
    2462 }
    2463 #content-sidebar .widget-grofile h4 {
    2464     color: #2b2b2b;
    2465     font-size: 14px;
    2466     font-size: 1.4rem;
    2467     font-weight: 900;
    2468     line-height: 1.2857142857;
    2469 }
    2470 #content-sidebar .milestone-countdown,
    2471 #content-sidebar .milestone-message {
    2472     border-color: rgba(255, 255, 255, 0.1);
    2473     border-top: 0;
    2474 }
    2475 #content-sidebar .milestone-header,
    2476 #content-sidebar .milestone-countdown,
    2477 #content-sidebar .milestone-message {
    2478     background-color: #000;
    2479     border: 1px solid rgba(0, 0, 0, 0.1);
    2480     color: #fff;
    2481 }
    2482 #content-sidebar .milestone-countdown {
    2483     background-color: #fff;
    2484     color: #2b2b2b;
    2485 }
    2486 #content-sidebar .widget_rss li,
    2487 #content-sidebar .widget_twitter li {
     2335#content-sidebar .widget_rss li {
    24882336    margin-bottom: 0;
    2489 }
    2490 #content-sidebar .widget .widgets-multi-column-grid li {
    2491     border-top: none;
    2492     padding: 0 8px 6px 0;
    2493     padding: 0 0.8rem 0.6rem 0;
    24942337}
    24952338
     
    25022345    box-sizing: border-box;
    25032346}
    2504 
    2505 
    2506 /* =Jetpack
    2507 ----------------------------------------------- */
    2508 
    2509 /* Infinite Scroll */
    2510 
    2511 /* Hide elements when IS is in use  */
    2512 .infinite-scroll #nav-below,
    2513 .infinite-scroll.neverending #colophon {
    2514     display: none;
    2515 }
    2516 .infinite-scroll #content {
    2517     margin-bottom: 48px;
    2518     margin-bottom: 4.8rem;
    2519 }
    2520 #infinite-handle {
    2521     margin-top: 48px;
    2522     margin-top: 4.8rem;
    2523     text-align: center;
    2524 }
    2525 #infinite-handle span {
    2526     background-color: #000;
    2527     border: 0;
    2528     border-radius: 2px;
    2529     color: #fff;
    2530     font-weight: 700;
    2531     font-size: 12px;
    2532     font-size: 1.2rem;
    2533     line-height: 1;
    2534     padding: 11px 35px 10px;
    2535     padding: 1.1rem 3.5rem 1.0rem;
    2536     text-transform: uppercase;
    2537 }
    2538 #infinite-handle span:before {
    2539     color: #fff;
    2540 }
    2541 #infinite-handle span:hover {
    2542     background-color: #41a62a;
    2543 }
    2544 .infinite-loader {
    2545     margin: 48px auto;
    2546     margin: 4.8rem auto;
    2547     width: 25px;
    2548     width: 2.5rem;
    2549     height: 24px;
    2550     height: 2.4rem;
    2551 }
    2552 #infinite-footer {
    2553     z-index: 10;
    2554 }
    2555 #infinite-footer .container {
    2556     border-width: 1px 1px 0 0;
    2557     margin: 0;
    2558 }
    2559 /* Reset when IS is finished  */
    2560 .infinite-scroll.infinity-end #content {
    2561     margin-bottom: 0;
    2562 }
    2563 .infinite-end.neverending #colophon {
    2564     display: block;
    2565 }
    2566 
    2567 
    2568 /* Sharing */
    2569 #main div.sharedaddy div.sd-block {
    2570     border-top: 1px dotted rgba(0, 0, 0, 0.1);
    2571 }
    2572 #main div.sharedaddy h3.sd-title {
    2573     font-size: 11px;
    2574     font-size: 1.1rem;
    2575     font-family: lato, sans-serif;
    2576     text-transform: uppercase;
    2577 }
    2578 #main div.sharedaddy .sd-like h3.sd-title {
    2579     width: 17.875%;
    2580 }
    2581 .entry-content > .pd-rating .rating-msg {
    2582     font-size: 12px;
    2583     font-size: 1.2rem;
    2584 }
    2585 
    2586 /* Stats image */
    2587 img#wpstats {
    2588     margin-top: -5px;
    2589     margin-top: -0.5rem;
    2590     position: absolute;
    2591 }
    2592 
    2593 /* Subscription */
    2594 .jetpack_subscription_widget input[type="text"] {
    2595     padding: 4px !important;
    2596     width: 100% !important;
    2597 }
    2598 .comment-subscription-form {
    2599     margin-bottom: 0;
    2600 }
    2601 
    2602 
    2603 /* =WP.com
    2604 ----------------------------------------------- */
    2605 
    2606 /* Prevent stats images to break the layout */
    2607 img[src^="http://botd"] {
    2608     position: absolute;
    2609 }
    2610 
    2611 /* Corrects line number misalignemnt in GitHub Gist embeds */
    2612 .gist .gist-file .gist-data .line-numbers span {
    2613     line-height: 1.7142857142;
    2614 }
    2615 .entry-content .gist table {
    2616     margin-bottom: 0;
    2617 }
    2618 
    26192347
    26202348/* =Media Queries
     
    29282656    }
    29292657    .comments-title,
    2930     .nocomments,
     2658    .no-comments,
    29312659    #comments #respond,
    29322660    .comments-area article,
    29332661    .comment-list li.trackback,
    29342662    .comment-list li.pingback,
    2935     .post-navigation .nav-previous,
    2936     .post-navigation .nav-next {
     2663    .post-navigation [rel="prev"],
     2664    .post-navigation [rel="next"] {
    29372665        padding-right: 9.12778904%;
    29382666        padding-left: 9.12778904%;
     
    30312759    }
    30322760    .comments-title,
    3033     .nocomments,
     2761    .no-comments,
    30342762    #comments #respond,
    30352763    .comments-area article,
    30362764    .comment-list li.trackback,
    30372765    .comment-list li.pingback,
    3038     .post-navigation .nav-previous,
    3039     .post-navigation .nav-next {
     2766    .post-navigation [rel="prev"],
     2767    .post-navigation [rel="next"] {
    30402768        padding-right: 12.39493534%;
    30412769        padding-left: 17.06896551%;
     
    32262954    }
    32272955    .comments-title,
    3228     .nocomments,
     2956    .no-comments,
    32292957    #comments #respond,
    32302958    .comments-area article,
    32312959    .comment-list li.trackback,
    32322960    .comment-list li.pingback,
    3233     .post-navigation .nav-previous,
    3234     .post-navigation .nav-next {
     2961    .post-navigation [rel="prev"],
     2962    .post-navigation [rel="next"] {
    32352963        padding-right: 9.87001616%;
    32362964        padding-left: 9.19765166%;
     
    33193047    }
    33203048    .comments-title,
    3321     .nocomments,
     3049    .no-comments,
    33223050    #comments #respond,
    33233051    .comments-area article,
    33243052    .comment-list li.trackback,
    33253053    .comment-list li.pingback,
    3326     .post-navigation .nav-previous,
    3327     .post-navigation .nav-next {
     3054    .post-navigation [rel="prev"],
     3055    .post-navigation [rel="next"] {
    33283056        padding-right: 12.44146986%;
    33293057        padding-left: 16.77524429%;
Note: See TracChangeset for help on using the changeset viewer.