- Timestamp:
- 11/18/2013 11:11:01 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php
r26227 r26260 18 18 function twentyfourteen_paging_nav() { 19 19 // 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 ) { 21 21 return; 22 } 22 23 23 24 $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; … … 26 27 $url_parts = explode( '?', $pagenum_link ); 27 28 28 if ( isset( $url_parts[1] ) ) 29 if ( isset( $url_parts[1] ) ) { 29 30 wp_parse_str( $url_parts[1], $query_args ); 31 } 30 32 31 33 $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); … … 73 75 $next = get_adjacent_post( false, '', false ); 74 76 75 if ( ! $next && ! $previous ) 77 if ( ! $next && ! $previous ) { 76 78 return; 79 } 77 80 78 81 ?> … … 103 106 */ 104 107 function twentyfourteen_posted_on() { 105 if ( is_sticky() && is_home() && ! is_paged() ) 108 if ( is_sticky() && is_home() && ! is_paged() ) { 106 109 echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>'; 110 } 107 111 108 112 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' ), … … 168 172 */ 169 173 function twentyfourteen_post_thumbnail() { 170 if ( post_password_required() || ! has_post_thumbnail() ) 174 if ( post_password_required() || ! has_post_thumbnail() ) { 171 175 return; 176 } 172 177 173 178 if ( is_singular() ) : … … 176 181 <div class="post-thumbnail"> 177 182 <?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() ) { 179 184 the_post_thumbnail( 'twentyfourteen-full-width' ); 180 else185 } else { 181 186 the_post_thumbnail(); 187 } 182 188 ?> 183 189 </div> … … 187 193 <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> 188 194 <?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() ) { 190 196 the_post_thumbnail( 'twentyfourteen-full-width' ); 191 else197 } else { 192 198 the_post_thumbnail(); 199 } 193 200 ?> 194 201 </a>
Note: See TracChangeset
for help on using the changeset viewer.