Make WordPress Core


Ignore:
Timestamp:
11/18/2013 11:11:01 PM (10 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: updates all PHP files to meet new brace style in WP coding standards. Props rickalee for initial patch, fixes #26093.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r26227 r26260  
    1818function twentyfourteen_paging_nav() {
    1919    // Don't print empty markup if there's only one page.
    20     if ( $GLOBALS['wp_query']->max_num_pages < 2 )
     20    if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
    2121        return;
     22    }
    2223
    2324    $paged        = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
     
    2627    $url_parts    = explode( '?', $pagenum_link );
    2728
    28     if ( isset( $url_parts[1] ) )
     29    if ( isset( $url_parts[1] ) ) {
    2930        wp_parse_str( $url_parts[1], $query_args );
     31    }
    3032
    3133    $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
     
    7375    $next     = get_adjacent_post( false, '', false );
    7476
    75     if ( ! $next && ! $previous )
     77    if ( ! $next && ! $previous ) {
    7678        return;
     79    }
    7780
    7881    ?>
     
    103106 */
    104107function twentyfourteen_posted_on() {
    105     if ( is_sticky() && is_home() && ! is_paged() )
     108    if ( is_sticky() && is_home() && ! is_paged() ) {
    106109        echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
     110    }
    107111
    108112    printf( __( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>', 'twentyfourteen' ),
     
    168172*/
    169173function twentyfourteen_post_thumbnail() {
    170     if ( post_password_required() || ! has_post_thumbnail() )
     174    if ( post_password_required() || ! has_post_thumbnail() ) {
    171175        return;
     176    }
    172177
    173178    if ( is_singular() ) :
     
    176181    <div class="post-thumbnail">
    177182    <?php
    178         if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() )
     183        if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) {
    179184            the_post_thumbnail( 'twentyfourteen-full-width' );
    180         else
     185        } else {
    181186            the_post_thumbnail();
     187        }
    182188    ?>
    183189    </div>
     
    187193    <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
    188194    <?php
    189         if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() )
     195        if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) {
    190196            the_post_thumbnail( 'twentyfourteen-full-width' );
    191         else
     197        } else {
    192198            the_post_thumbnail();
     199        }
    193200    ?>
    194201    </a>
Note: See TracChangeset for help on using the changeset viewer.