@@ -21,8 +21,9 @@ |
||
| 21 | 21 | <?php |
| 22 | 22 | $published_text = __( '<span class="attachment-meta">Published on <time class="entry-date" datetime="%1$s">%2$s</time> in <a href="%3$s" title="Return to %4$s" rel="gallery">%5$s</a></span>', 'twentythirteen' ); |
| 23 | 23 | $post_title = get_the_title( $post->post_parent ); |
| 24 | - if ( empty( $post_title ) || 0 == $post->post_parent ) |
|
| 25 | - $published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>'; |
|
| 24 | + if ( empty( $post_title ) || 0 == $post->post_parent ) { |
|
| 25 | + $published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>'; |
|
| 26 | + } |
|
| 26 | 27 | |
| 27 | 28 | printf( $published_text, |
| 28 | 29 | esc_attr( get_the_date( 'c' ) ), |
@@ -16,53 +16,53 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | <?php |
| 18 | 18 | // Start the Loop. |
| 19 | - while ( have_posts() ) : the_post(); |
|
| 19 | + while (have_posts()) : the_post(); |
|
| 20 | 20 | ?> |
| 21 | 21 | |
| 22 | - <article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>> |
|
| 22 | + <article id="post-<?php the_ID(); ?>" <?php post_class('image-attachment'); ?>> |
|
| 23 | 23 | <header class="entry-header"> |
| 24 | 24 | <h1 class="entry-title"><?php the_title(); ?></h1> |
| 25 | 25 | |
| 26 | 26 | <div class="entry-meta"> |
| 27 | 27 | <?php |
| 28 | - $published_text = __( '<span class="attachment-meta">Published on <time class="entry-date" datetime="%1$s">%2$s</time> in <a href="%3$s" title="Return to %4$s" rel="gallery">%5$s</a></span>', 'twentythirteen' ); |
|
| 29 | - $post_title = get_the_title( $post->post_parent ); |
|
| 30 | - if ( empty( $post_title ) || 0 == $post->post_parent ) |
|
| 28 | + $published_text = __('<span class="attachment-meta">Published on <time class="entry-date" datetime="%1$s">%2$s</time> in <a href="%3$s" title="Return to %4$s" rel="gallery">%5$s</a></span>', 'twentythirteen'); |
|
| 29 | + $post_title = get_the_title($post->post_parent); |
|
| 30 | + if (empty($post_title) || 0 == $post->post_parent) |
|
| 31 | 31 | $published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>'; |
| 32 | 32 | |
| 33 | - printf( $published_text, |
|
| 34 | - esc_attr( get_the_date( 'c' ) ), |
|
| 35 | - esc_html( get_the_date() ), |
|
| 36 | - esc_url( get_permalink( $post->post_parent ) ), |
|
| 37 | - esc_attr( strip_tags( $post_title ) ), |
|
| 33 | + printf($published_text, |
|
| 34 | + esc_attr(get_the_date('c')), |
|
| 35 | + esc_html(get_the_date()), |
|
| 36 | + esc_url(get_permalink($post->post_parent)), |
|
| 37 | + esc_attr(strip_tags($post_title)), |
|
| 38 | 38 | $post_title |
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | 41 | $metadata = wp_get_attachment_metadata(); |
| 42 | - printf( '<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s × %5$s)</a></span>', |
|
| 43 | - esc_url( wp_get_attachment_url() ), |
|
| 44 | - esc_attr__( 'Link to full-size image', 'twentythirteen' ), |
|
| 45 | - __( 'Full resolution', 'twentythirteen' ), |
|
| 42 | + printf('<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s × %5$s)</a></span>', |
|
| 43 | + esc_url(wp_get_attachment_url()), |
|
| 44 | + esc_attr__('Link to full-size image', 'twentythirteen'), |
|
| 45 | + __('Full resolution', 'twentythirteen'), |
|
| 46 | 46 | $metadata['width'], |
| 47 | 47 | $metadata['height'] |
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | - edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); |
|
| 50 | + edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); |
|
| 51 | 51 | ?> |
| 52 | 52 | </div><!-- .entry-meta --> |
| 53 | 53 | </header><!-- .entry-header --> |
| 54 | 54 | |
| 55 | 55 | <div class="entry-content"> |
| 56 | 56 | <nav id="image-navigation" class="navigation image-navigation" role="navigation"> |
| 57 | - <span class="nav-previous"><?php previous_image_link( false, __( '<span class="meta-nav">←</span> Previous', 'twentythirteen' ) ); ?></span> |
|
| 58 | - <span class="nav-next"><?php next_image_link( false, __( 'Next <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?></span> |
|
| 57 | + <span class="nav-previous"><?php previous_image_link(false, __('<span class="meta-nav">←</span> Previous', 'twentythirteen')); ?></span> |
|
| 58 | + <span class="nav-next"><?php next_image_link(false, __('Next <span class="meta-nav">→</span>', 'twentythirteen')); ?></span> |
|
| 59 | 59 | </nav><!-- #image-navigation --> |
| 60 | 60 | |
| 61 | 61 | <div class="entry-attachment"> |
| 62 | 62 | <div class="attachment"> |
| 63 | 63 | <?php twentythirteen_the_attached_image(); ?> |
| 64 | 64 | |
| 65 | - <?php if ( has_excerpt() ) : ?> |
|
| 65 | + <?php if (has_excerpt()) : ?> |
|
| 66 | 66 | <div class="entry-caption"> |
| 67 | 67 | <?php the_excerpt(); ?> |
| 68 | 68 | </div> |
@@ -70,10 +70,10 @@ discard block |
||
| 70 | 70 | </div><!-- .attachment --> |
| 71 | 71 | </div><!-- .entry-attachment --> |
| 72 | 72 | |
| 73 | - <?php if ( ! empty( $post->post_content ) ) : ?> |
|
| 73 | + <?php if ( ! empty($post->post_content)) : ?> |
|
| 74 | 74 | <div class="entry-description"> |
| 75 | 75 | <?php the_content(); ?> |
| 76 | - <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentythirteen' ), 'after' => '</div>' ) ); ?> |
|
| 76 | + <?php wp_link_pages(array('before' => '<div class="page-links">'.__('Pages:', 'twentythirteen'), 'after' => '</div>')); ?> |
|
| 77 | 77 | </div><!-- .entry-description --> |
| 78 | 78 | <?php endif; ?> |
| 79 | 79 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 12 | 12 | <header class="entry-header"> |
| 13 | - <?php if ( is_single() ) : ?> |
|
| 13 | + <?php if (is_single()) : ?> |
|
| 14 | 14 | <h1 class="entry-title"><?php the_title(); ?></h1> |
| 15 | 15 | <?php else : ?> |
| 16 | 16 | <h1 class="entry-title"> |
@@ -20,15 +20,15 @@ discard block |
||
| 20 | 20 | </header><!-- .entry-header --> |
| 21 | 21 | |
| 22 | 22 | <div class="entry-content"> |
| 23 | - <?php if ( is_single() || ! get_post_gallery() ) : ?> |
|
| 23 | + <?php if (is_single() || ! get_post_gallery()) : ?> |
|
| 24 | 24 | <?php |
| 25 | 25 | /* translators: %s: Name of current post */ |
| 26 | - the_content( sprintf( |
|
| 27 | - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen' ), |
|
| 28 | - the_title( '<span class="screen-reader-text">', '</span>', false ) |
|
| 29 | - ) ); |
|
| 26 | + the_content(sprintf( |
|
| 27 | + __('Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen'), |
|
| 28 | + the_title('<span class="screen-reader-text">', '</span>', false) |
|
| 29 | + )); |
|
| 30 | 30 | |
| 31 | - wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); |
|
| 31 | + wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>')); |
|
| 32 | 32 | ?> |
| 33 | 33 | <?php else : ?> |
| 34 | 34 | <?php echo get_post_gallery(); ?> |
@@ -38,15 +38,15 @@ discard block |
||
| 38 | 38 | <footer class="entry-meta"> |
| 39 | 39 | <?php twentythirteen_entry_meta(); ?> |
| 40 | 40 | |
| 41 | - <?php if ( comments_open() && ! is_single() ) : ?> |
|
| 41 | + <?php if (comments_open() && ! is_single()) : ?> |
|
| 42 | 42 | <span class="comments-link"> |
| 43 | - <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a comment', 'twentythirteen' ) . '</span>', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?> |
|
| 43 | + <?php comments_popup_link('<span class="leave-reply">'.__('Leave a comment', 'twentythirteen').'</span>', __('One comment so far', 'twentythirteen'), __('View all % comments', 'twentythirteen')); ?> |
|
| 44 | 44 | </span><!-- .comments-link --> |
| 45 | 45 | <?php endif; // comments_open() ?> |
| 46 | - <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 46 | + <?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?> |
|
| 47 | 47 | |
| 48 | - <?php if ( is_single() && get_the_author_meta( 'description' ) && is_multi_author() ) : ?> |
|
| 49 | - <?php get_template_part( 'author-bio' ); ?> |
|
| 48 | + <?php if (is_single() && get_the_author_meta('description') && is_multi_author()) : ?> |
|
| 49 | + <?php get_template_part('author-bio'); ?> |
|
| 50 | 50 | <?php endif; ?> |
| 51 | 51 | </footer><!-- .entry-meta --> |
| 52 | 52 | </article><!-- #post --> |
@@ -12,9 +12,12 @@ discard block |
||
| 12 | 12 | <header class="entry-header"> |
| 13 | 13 | <?php if ( is_single() ) : ?> |
| 14 | 14 | <h1 class="entry-title"><?php the_title(); ?></h1> |
| 15 | - <?php else : ?> |
|
| 15 | + <?php else { |
|
| 16 | + : ?> |
|
| 16 | 17 | <h1 class="entry-title"> |
| 17 | - <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
|
| 18 | + <a href="<?php the_permalink(); |
|
| 19 | +} |
|
| 20 | +?>" rel="bookmark"><?php the_title(); ?></a> |
|
| 18 | 21 | </h1> |
| 19 | 22 | <?php endif; // is_single() ?> |
| 20 | 23 | </header><!-- .entry-header --> |
@@ -30,8 +33,11 @@ discard block |
||
| 30 | 33 | |
| 31 | 34 | wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); |
| 32 | 35 | ?> |
| 33 | - <?php else : ?> |
|
| 34 | - <?php echo get_post_gallery(); ?> |
|
| 36 | + <?php else { |
|
| 37 | + : ?> |
|
| 38 | + <?php echo get_post_gallery(); |
|
| 39 | +} |
|
| 40 | +?> |
|
| 35 | 41 | <?php endif; // is_single() ?> |
| 36 | 42 | </div><!-- .entry-content --> |
| 37 | 43 | |
@@ -19,11 +19,11 @@ discard block |
||
| 19 | 19 | <html <?php language_attributes(); ?>> |
| 20 | 20 | <!--<![endif]--> |
| 21 | 21 | <head> |
| 22 | - <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
| 22 | + <meta charset="<?php bloginfo('charset'); ?>"> |
|
| 23 | 23 | <meta name="viewport" content="width=device-width"> |
| 24 | - <title><?php wp_title( '|', true, 'right' ); ?></title> |
|
| 24 | + <title><?php wp_title('|', true, 'right'); ?></title> |
|
| 25 | 25 | <link rel="profile" href="http://gmpg.org/xfn/11"> |
| 26 | - <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> |
|
| 26 | + <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>"> |
|
| 27 | 27 | <!--[if lt IE 9]> |
| 28 | 28 | <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script> |
| 29 | 29 | <![endif]--> |
@@ -33,16 +33,16 @@ discard block |
||
| 33 | 33 | <body <?php body_class(); ?>> |
| 34 | 34 | <div id="page" class="hfeed site"> |
| 35 | 35 | <header id="masthead" class="site-header" role="banner"> |
| 36 | - <a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> |
|
| 37 | - <h1 class="site-title"><?php bloginfo( 'name' ); ?></h1> |
|
| 38 | - <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2> |
|
| 36 | + <a class="home-link" href="<?php echo esc_url(home_url('/')); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home"> |
|
| 37 | + <h1 class="site-title"><?php bloginfo('name'); ?></h1> |
|
| 38 | + <h2 class="site-description"><?php bloginfo('description'); ?></h2> |
|
| 39 | 39 | </a> |
| 40 | 40 | |
| 41 | 41 | <div id="navbar" class="navbar"> |
| 42 | 42 | <nav id="site-navigation" class="navigation main-navigation" role="navigation"> |
| 43 | - <button class="menu-toggle"><?php _e( 'Menu', 'twentythirteen' ); ?></button> |
|
| 44 | - <a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentythirteen' ); ?>"><?php _e( 'Skip to content', 'twentythirteen' ); ?></a> |
|
| 45 | - <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) ); ?> |
|
| 43 | + <button class="menu-toggle"><?php _e('Menu', 'twentythirteen'); ?></button> |
|
| 44 | + <a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e('Skip to content', 'twentythirteen'); ?>"><?php _e('Skip to content', 'twentythirteen'); ?></a> |
|
| 45 | + <?php wp_nav_menu(array('theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu')); ?> |
|
| 46 | 46 | <?php get_search_form(); ?> |
| 47 | 47 | </nav><!-- #site-navigation --> |
| 48 | 48 | </div><!-- #navbar --> |
@@ -11,11 +11,11 @@ |
||
| 11 | 11 | * @since Twenty Thirteen 1.0 |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -if ( is_active_sidebar( 'sidebar-2' ) ) : ?> |
|
| 14 | +if (is_active_sidebar('sidebar-2')) : ?> |
|
| 15 | 15 | <div id="tertiary" class="sidebar-container" role="complementary"> |
| 16 | 16 | <div class="sidebar-inner"> |
| 17 | 17 | <div class="widget-area"> |
| 18 | - <?php dynamic_sidebar( 'sidebar-2' ); ?> |
|
| 18 | + <?php dynamic_sidebar('sidebar-2'); ?> |
|
| 19 | 19 | </div><!-- .widget-area --> |
| 20 | 20 | </div><!-- .sidebar-inner --> |
| 21 | 21 | </div><!-- #tertiary --> |
@@ -18,17 +18,17 @@ |
||
| 18 | 18 | |
| 19 | 19 | <div id="primary" class="content-area"> |
| 20 | 20 | <div id="content" class="site-content" role="main"> |
| 21 | - <?php if ( have_posts() ) : ?> |
|
| 21 | + <?php if (have_posts()) : ?> |
|
| 22 | 22 | |
| 23 | 23 | <?php /* The loop */ ?> |
| 24 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 25 | - <?php get_template_part( 'content', get_post_format() ); ?> |
|
| 24 | + <?php while (have_posts()) : the_post(); ?> |
|
| 25 | + <?php get_template_part('content', get_post_format()); ?> |
|
| 26 | 26 | <?php endwhile; ?> |
| 27 | 27 | |
| 28 | 28 | <?php twentythirteen_paging_nav(); ?> |
| 29 | 29 | |
| 30 | 30 | <?php else : ?> |
| 31 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 31 | + <?php get_template_part('content', 'none'); ?> |
|
| 32 | 32 | <?php endif; ?> |
| 33 | 33 | |
| 34 | 34 | </div><!-- #content --> |
@@ -51,8 +51,11 @@ |
||
| 51 | 51 | |
| 52 | 52 | <?php twentythirteen_paging_nav(); ?> |
| 53 | 53 | |
| 54 | - <?php else : ?> |
|
| 55 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 54 | + <?php else { |
|
| 55 | + : ?> |
|
| 56 | + <?php get_template_part( 'content', 'none' ); |
|
| 57 | +} |
|
| 58 | +?> |
|
| 56 | 59 | <?php endif; ?> |
| 57 | 60 | |
| 58 | 61 | </div><!-- #content --> |
@@ -28,8 +28,9 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @see twentythirteen_content_width() for template-specific adjustments. |
| 30 | 30 | */ |
| 31 | -if ( ! isset( $content_width ) ) |
|
| 31 | +if ( ! isset( $content_width ) ) { |
|
| 32 | 32 | $content_width = 604; |
| 33 | +} |
|
| 33 | 34 | |
| 34 | 35 | /** |
| 35 | 36 | * Add support for a custom header image. |
@@ -39,8 +40,9 @@ discard block |
||
| 39 | 40 | /** |
| 40 | 41 | * Twenty Thirteen only works in WordPress 3.6 or later. |
| 41 | 42 | */ |
| 42 | -if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) |
|
| 43 | +if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) { |
|
| 43 | 44 | require get_template_directory() . '/inc/back-compat.php'; |
| 45 | +} |
|
| 44 | 46 | |
| 45 | 47 | /** |
| 46 | 48 | * Twenty Thirteen setup. |
@@ -136,11 +138,13 @@ discard block |
||
| 136 | 138 | if ( 'off' !== $source_sans_pro || 'off' !== $bitter ) { |
| 137 | 139 | $font_families = array(); |
| 138 | 140 | |
| 139 | - if ( 'off' !== $source_sans_pro ) |
|
| 140 | - $font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic'; |
|
| 141 | + if ( 'off' !== $source_sans_pro ) { |
|
| 142 | + $font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic'; |
|
| 143 | + } |
|
| 141 | 144 | |
| 142 | - if ( 'off' !== $bitter ) |
|
| 143 | - $font_families[] = 'Bitter:400,700'; |
|
| 145 | + if ( 'off' !== $bitter ) { |
|
| 146 | + $font_families[] = 'Bitter:400,700'; |
|
| 147 | + } |
|
| 144 | 148 | |
| 145 | 149 | $query_args = array( |
| 146 | 150 | 'family' => urlencode( implode( '|', $font_families ) ), |
@@ -162,12 +166,14 @@ discard block |
||
| 162 | 166 | * Adds JavaScript to pages with the comment form to support |
| 163 | 167 | * sites with threaded comments (when in use). |
| 164 | 168 | */ |
| 165 | - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) |
|
| 166 | - wp_enqueue_script( 'comment-reply' ); |
|
| 169 | + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { |
|
| 170 | + wp_enqueue_script( 'comment-reply' ); |
|
| 171 | + } |
|
| 167 | 172 | |
| 168 | 173 | // Adds Masonry to handle vertical alignment of footer widgets. |
| 169 | - if ( is_active_sidebar( 'sidebar-1' ) ) |
|
| 170 | - wp_enqueue_script( 'jquery-masonry' ); |
|
| 174 | + if ( is_active_sidebar( 'sidebar-1' ) ) { |
|
| 175 | + wp_enqueue_script( 'jquery-masonry' ); |
|
| 176 | + } |
|
| 171 | 177 | |
| 172 | 178 | // Loads JavaScript file with functionality specific to Twenty Thirteen. |
| 173 | 179 | wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true ); |
@@ -202,20 +208,23 @@ discard block |
||
| 202 | 208 | function twentythirteen_wp_title( $title, $sep ) { |
| 203 | 209 | global $paged, $page; |
| 204 | 210 | |
| 205 | - if ( is_feed() ) |
|
| 206 | - return $title; |
|
| 211 | + if ( is_feed() ) { |
|
| 212 | + return $title; |
|
| 213 | + } |
|
| 207 | 214 | |
| 208 | 215 | // Add the site name. |
| 209 | 216 | $title .= get_bloginfo( 'name', 'display' ); |
| 210 | 217 | |
| 211 | 218 | // Add the site description for the home/front page. |
| 212 | 219 | $site_description = get_bloginfo( 'description', 'display' ); |
| 213 | - if ( $site_description && ( is_home() || is_front_page() ) ) |
|
| 214 | - $title = "$title $sep $site_description"; |
|
| 220 | + if ( $site_description && ( is_home() || is_front_page() ) ) { |
|
| 221 | + $title = "$title $sep $site_description"; |
|
| 222 | + } |
|
| 215 | 223 | |
| 216 | 224 | // Add a page number if necessary. |
| 217 | - if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) |
|
| 218 | - $title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) ); |
|
| 225 | + if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { |
|
| 226 | + $title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) ); |
|
| 227 | + } |
|
| 219 | 228 | |
| 220 | 229 | return $title; |
| 221 | 230 | } |
@@ -259,8 +268,9 @@ discard block |
||
| 259 | 268 | global $wp_query; |
| 260 | 269 | |
| 261 | 270 | // Don't print empty markup if there's only one page. |
| 262 | - if ( $wp_query->max_num_pages < 2 ) |
|
| 263 | - return; |
|
| 271 | + if ( $wp_query->max_num_pages < 2 ) { |
|
| 272 | + return; |
|
| 273 | + } |
|
| 264 | 274 | ?> |
| 265 | 275 | <nav class="navigation paging-navigation" role="navigation"> |
| 266 | 276 | <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1> |
@@ -293,8 +303,9 @@ discard block |
||
| 293 | 303 | $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); |
| 294 | 304 | $next = get_adjacent_post( false, '', false ); |
| 295 | 305 | |
| 296 | - if ( ! $next && ! $previous ) |
|
| 297 | - return; |
|
| 306 | + if ( ! $next && ! $previous ) { |
|
| 307 | + return; |
|
| 308 | + } |
|
| 298 | 309 | ?> |
| 299 | 310 | <nav class="navigation post-navigation" role="navigation"> |
| 300 | 311 | <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1> |
@@ -318,11 +329,13 @@ discard block |
||
| 318 | 329 | * @since Twenty Thirteen 1.0 |
| 319 | 330 | */ |
| 320 | 331 | function twentythirteen_entry_meta() { |
| 321 | - if ( is_sticky() && is_home() && ! is_paged() ) |
|
| 322 | - echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>'; |
|
| 332 | + if ( is_sticky() && is_home() && ! is_paged() ) { |
|
| 333 | + echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>'; |
|
| 334 | + } |
|
| 323 | 335 | |
| 324 | - if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) |
|
| 325 | - twentythirteen_entry_date(); |
|
| 336 | + if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) { |
|
| 337 | + twentythirteen_entry_date(); |
|
| 338 | + } |
|
| 326 | 339 | |
| 327 | 340 | // Translators: used between list items, there is a space after the comma. |
| 328 | 341 | $categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) ); |
@@ -359,10 +372,11 @@ discard block |
||
| 359 | 372 | * @return string The HTML-formatted post date. |
| 360 | 373 | */ |
| 361 | 374 | function twentythirteen_entry_date( $echo = true ) { |
| 362 | - if ( has_post_format( array( 'chat', 'status' ) ) ) |
|
| 363 | - $format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' ); |
|
| 364 | - else |
|
| 365 | - $format_prefix = '%2$s'; |
|
| 375 | + if ( has_post_format( array( 'chat', 'status' ) ) ) { |
|
| 376 | + $format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' ); |
|
| 377 | + } else { |
|
| 378 | + $format_prefix = '%2$s'; |
|
| 379 | + } |
|
| 366 | 380 | |
| 367 | 381 | $date = sprintf( '<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>', |
| 368 | 382 | esc_url( get_permalink() ), |
@@ -371,8 +385,9 @@ discard block |
||
| 371 | 385 | esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) ) |
| 372 | 386 | ); |
| 373 | 387 | |
| 374 | - if ( $echo ) |
|
| 375 | - echo $date; |
|
| 388 | + if ( $echo ) { |
|
| 389 | + echo $date; |
|
| 390 | + } |
|
| 376 | 391 | |
| 377 | 392 | return $date; |
| 378 | 393 | } |
@@ -426,12 +441,14 @@ discard block |
||
| 426 | 441 | } |
| 427 | 442 | |
| 428 | 443 | // get the URL of the next image attachment... |
| 429 | - if ( $next_id ) |
|
| 430 | - $next_attachment_url = get_attachment_link( $next_id ); |
|
| 444 | + if ( $next_id ) { |
|
| 445 | + $next_attachment_url = get_attachment_link( $next_id ); |
|
| 446 | + } |
|
| 431 | 447 | |
| 432 | 448 | // or get the URL of the first image attachment. |
| 433 | - else |
|
| 434 | - $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); |
|
| 449 | + else { |
|
| 450 | + $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); |
|
| 451 | + } |
|
| 435 | 452 | } |
| 436 | 453 | |
| 437 | 454 | printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>', |
@@ -496,14 +513,17 @@ discard block |
||
| 496 | 513 | * @return array The filtered body class list. |
| 497 | 514 | */ |
| 498 | 515 | function twentythirteen_body_class( $classes ) { |
| 499 | - if ( ! is_multi_author() ) |
|
| 500 | - $classes[] = 'single-author'; |
|
| 516 | + if ( ! is_multi_author() ) { |
|
| 517 | + $classes[] = 'single-author'; |
|
| 518 | + } |
|
| 501 | 519 | |
| 502 | - if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() ) |
|
| 503 | - $classes[] = 'sidebar'; |
|
| 520 | + if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() ) { |
|
| 521 | + $classes[] = 'sidebar'; |
|
| 522 | + } |
|
| 504 | 523 | |
| 505 | - if ( ! get_option( 'show_avatars' ) ) |
|
| 506 | - $classes[] = 'no-avatars'; |
|
| 524 | + if ( ! get_option( 'show_avatars' ) ) { |
|
| 525 | + $classes[] = 'no-avatars'; |
|
| 526 | + } |
|
| 507 | 527 | |
| 508 | 528 | return $classes; |
| 509 | 529 | } |
@@ -517,11 +537,12 @@ discard block |
||
| 517 | 537 | function twentythirteen_content_width() { |
| 518 | 538 | global $content_width; |
| 519 | 539 | |
| 520 | - if ( is_attachment() ) |
|
| 521 | - $content_width = 724; |
|
| 522 | - elseif ( has_post_format( 'audio' ) ) |
|
| 523 | - $content_width = 484; |
|
| 524 | -} |
|
| 540 | + if ( is_attachment() ) { |
|
| 541 | + $content_width = 724; |
|
| 542 | + } elseif ( has_post_format( 'audio' ) ) { |
|
| 543 | + $content_width = 484; |
|
| 544 | + } |
|
| 545 | + } |
|
| 525 | 546 | add_action( 'template_redirect', 'twentythirteen_content_width' ); |
| 526 | 547 | |
| 527 | 548 | /** |
@@ -28,19 +28,19 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @see twentythirteen_content_width() for template-specific adjustments. |
| 30 | 30 | */ |
| 31 | -if ( ! isset( $content_width ) ) |
|
| 31 | +if ( ! isset($content_width)) |
|
| 32 | 32 | $content_width = 604; |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Add support for a custom header image. |
| 36 | 36 | */ |
| 37 | -require get_template_directory() . '/inc/custom-header.php'; |
|
| 37 | +require get_template_directory().'/inc/custom-header.php'; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Twenty Thirteen only works in WordPress 3.6 or later. |
| 41 | 41 | */ |
| 42 | -if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) |
|
| 43 | - require get_template_directory() . '/inc/back-compat.php'; |
|
| 42 | +if (version_compare($GLOBALS['wp_version'], '3.6-alpha', '<')) |
|
| 43 | + require get_template_directory().'/inc/back-compat.php'; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Twenty Thirteen setup. |
@@ -66,50 +66,50 @@ discard block |
||
| 66 | 66 | * replace to change 'twentythirteen' to the name of your theme in all |
| 67 | 67 | * template files. |
| 68 | 68 | */ |
| 69 | - load_theme_textdomain( 'twentythirteen' ); |
|
| 69 | + load_theme_textdomain('twentythirteen'); |
|
| 70 | 70 | |
| 71 | 71 | /* |
| 72 | 72 | * This theme styles the visual editor to resemble the theme style, |
| 73 | 73 | * specifically font, colors, icons, and column width. |
| 74 | 74 | */ |
| 75 | - add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentythirteen_fonts_url() ) ); |
|
| 75 | + add_editor_style(array('css/editor-style.css', 'genericons/genericons.css', twentythirteen_fonts_url())); |
|
| 76 | 76 | |
| 77 | 77 | // Adds RSS feed links to <head> for posts and comments. |
| 78 | - add_theme_support( 'automatic-feed-links' ); |
|
| 78 | + add_theme_support('automatic-feed-links'); |
|
| 79 | 79 | |
| 80 | 80 | /* |
| 81 | 81 | * Switches default core markup for search form, comment form, |
| 82 | 82 | * and comments to output valid HTML5. |
| 83 | 83 | */ |
| 84 | - add_theme_support( 'html5', array( |
|
| 84 | + add_theme_support('html5', array( |
|
| 85 | 85 | 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' |
| 86 | - ) ); |
|
| 86 | + )); |
|
| 87 | 87 | |
| 88 | 88 | /* |
| 89 | 89 | * This theme supports all available post formats by default. |
| 90 | 90 | * See https://codex.wordpress.org/Post_Formats |
| 91 | 91 | */ |
| 92 | - add_theme_support( 'post-formats', array( |
|
| 92 | + add_theme_support('post-formats', array( |
|
| 93 | 93 | 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' |
| 94 | - ) ); |
|
| 94 | + )); |
|
| 95 | 95 | |
| 96 | 96 | // This theme uses wp_nav_menu() in one location. |
| 97 | - register_nav_menu( 'primary', __( 'Navigation Menu', 'twentythirteen' ) ); |
|
| 97 | + register_nav_menu('primary', __('Navigation Menu', 'twentythirteen')); |
|
| 98 | 98 | |
| 99 | 99 | /* |
| 100 | 100 | * This theme uses a custom image size for featured images, displayed on |
| 101 | 101 | * "standard" posts and pages. |
| 102 | 102 | */ |
| 103 | - add_theme_support( 'post-thumbnails' ); |
|
| 104 | - set_post_thumbnail_size( 604, 270, true ); |
|
| 103 | + add_theme_support('post-thumbnails'); |
|
| 104 | + set_post_thumbnail_size(604, 270, true); |
|
| 105 | 105 | |
| 106 | 106 | // This theme uses its own gallery styles. |
| 107 | - add_filter( 'use_default_gallery_style', '__return_false' ); |
|
| 107 | + add_filter('use_default_gallery_style', '__return_false'); |
|
| 108 | 108 | |
| 109 | 109 | // Indicate widget sidebars can use selective refresh in the Customizer. |
| 110 | - add_theme_support( 'customize-selective-refresh-widgets' ); |
|
| 110 | + add_theme_support('customize-selective-refresh-widgets'); |
|
| 111 | 111 | } |
| 112 | -add_action( 'after_setup_theme', 'twentythirteen_setup' ); |
|
| 112 | +add_action('after_setup_theme', 'twentythirteen_setup'); |
|
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Return the Google font stylesheet URL, if available. |
@@ -128,28 +128,28 @@ discard block |
||
| 128 | 128 | * supported by Source Sans Pro, translate this to 'off'. Do not translate |
| 129 | 129 | * into your own language. |
| 130 | 130 | */ |
| 131 | - $source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'twentythirteen' ); |
|
| 131 | + $source_sans_pro = _x('on', 'Source Sans Pro font: on or off', 'twentythirteen'); |
|
| 132 | 132 | |
| 133 | 133 | /* Translators: If there are characters in your language that are not |
| 134 | 134 | * supported by Bitter, translate this to 'off'. Do not translate into your |
| 135 | 135 | * own language. |
| 136 | 136 | */ |
| 137 | - $bitter = _x( 'on', 'Bitter font: on or off', 'twentythirteen' ); |
|
| 137 | + $bitter = _x('on', 'Bitter font: on or off', 'twentythirteen'); |
|
| 138 | 138 | |
| 139 | - if ( 'off' !== $source_sans_pro || 'off' !== $bitter ) { |
|
| 139 | + if ('off' !== $source_sans_pro || 'off' !== $bitter) { |
|
| 140 | 140 | $font_families = array(); |
| 141 | 141 | |
| 142 | - if ( 'off' !== $source_sans_pro ) |
|
| 142 | + if ('off' !== $source_sans_pro) |
|
| 143 | 143 | $font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic'; |
| 144 | 144 | |
| 145 | - if ( 'off' !== $bitter ) |
|
| 145 | + if ('off' !== $bitter) |
|
| 146 | 146 | $font_families[] = 'Bitter:400,700'; |
| 147 | 147 | |
| 148 | 148 | $query_args = array( |
| 149 | - 'family' => urlencode( implode( '|', $font_families ) ), |
|
| 150 | - 'subset' => urlencode( 'latin,latin-ext' ), |
|
| 149 | + 'family' => urlencode(implode('|', $font_families)), |
|
| 150 | + 'subset' => urlencode('latin,latin-ext'), |
|
| 151 | 151 | ); |
| 152 | - $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); |
|
| 152 | + $fonts_url = add_query_arg($query_args, 'https://fonts.googleapis.com/css'); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | return $fonts_url; |
@@ -165,30 +165,30 @@ discard block |
||
| 165 | 165 | * Adds JavaScript to pages with the comment form to support |
| 166 | 166 | * sites with threaded comments (when in use). |
| 167 | 167 | */ |
| 168 | - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) |
|
| 169 | - wp_enqueue_script( 'comment-reply' ); |
|
| 168 | + if (is_singular() && comments_open() && get_option('thread_comments')) |
|
| 169 | + wp_enqueue_script('comment-reply'); |
|
| 170 | 170 | |
| 171 | 171 | // Adds Masonry to handle vertical alignment of footer widgets. |
| 172 | - if ( is_active_sidebar( 'sidebar-1' ) ) |
|
| 173 | - wp_enqueue_script( 'jquery-masonry' ); |
|
| 172 | + if (is_active_sidebar('sidebar-1')) |
|
| 173 | + wp_enqueue_script('jquery-masonry'); |
|
| 174 | 174 | |
| 175 | 175 | // Loads JavaScript file with functionality specific to Twenty Thirteen. |
| 176 | - wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160717', true ); |
|
| 176 | + wp_enqueue_script('twentythirteen-script', get_template_directory_uri().'/js/functions.js', array('jquery'), '20160717', true); |
|
| 177 | 177 | |
| 178 | 178 | // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. |
| 179 | - wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null ); |
|
| 179 | + wp_enqueue_style('twentythirteen-fonts', twentythirteen_fonts_url(), array(), null); |
|
| 180 | 180 | |
| 181 | 181 | // Add Genericons font, used in the main stylesheet. |
| 182 | - wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03' ); |
|
| 182 | + wp_enqueue_style('genericons', get_template_directory_uri().'/genericons/genericons.css', array(), '3.03'); |
|
| 183 | 183 | |
| 184 | 184 | // Loads our main stylesheet. |
| 185 | - wp_enqueue_style( 'twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18' ); |
|
| 185 | + wp_enqueue_style('twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18'); |
|
| 186 | 186 | |
| 187 | 187 | // Loads the Internet Explorer specific stylesheet. |
| 188 | - wp_enqueue_style( 'twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentythirteen-style' ), '2013-07-18' ); |
|
| 189 | - wp_style_add_data( 'twentythirteen-ie', 'conditional', 'lt IE 9' ); |
|
| 188 | + wp_enqueue_style('twentythirteen-ie', get_template_directory_uri().'/css/ie.css', array('twentythirteen-style'), '2013-07-18'); |
|
| 189 | + wp_style_add_data('twentythirteen-ie', 'conditional', 'lt IE 9'); |
|
| 190 | 190 | } |
| 191 | -add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' ); |
|
| 191 | +add_action('wp_enqueue_scripts', 'twentythirteen_scripts_styles'); |
|
| 192 | 192 | |
| 193 | 193 | /** |
| 194 | 194 | * Filter the page title. |
@@ -202,27 +202,27 @@ discard block |
||
| 202 | 202 | * @param string $sep Optional separator. |
| 203 | 203 | * @return string The filtered title. |
| 204 | 204 | */ |
| 205 | -function twentythirteen_wp_title( $title, $sep ) { |
|
| 205 | +function twentythirteen_wp_title($title, $sep) { |
|
| 206 | 206 | global $paged, $page; |
| 207 | 207 | |
| 208 | - if ( is_feed() ) |
|
| 208 | + if (is_feed()) |
|
| 209 | 209 | return $title; |
| 210 | 210 | |
| 211 | 211 | // Add the site name. |
| 212 | - $title .= get_bloginfo( 'name', 'display' ); |
|
| 212 | + $title .= get_bloginfo('name', 'display'); |
|
| 213 | 213 | |
| 214 | 214 | // Add the site description for the home/front page. |
| 215 | - $site_description = get_bloginfo( 'description', 'display' ); |
|
| 216 | - if ( $site_description && ( is_home() || is_front_page() ) ) |
|
| 215 | + $site_description = get_bloginfo('description', 'display'); |
|
| 216 | + if ($site_description && (is_home() || is_front_page())) |
|
| 217 | 217 | $title = "$title $sep $site_description"; |
| 218 | 218 | |
| 219 | 219 | // Add a page number if necessary. |
| 220 | - if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) |
|
| 221 | - $title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) ); |
|
| 220 | + if (($paged >= 2 || $page >= 2) && ! is_404()) |
|
| 221 | + $title = "$title $sep ".sprintf(__('Page %s', 'twentythirteen'), max($paged, $page)); |
|
| 222 | 222 | |
| 223 | 223 | return $title; |
| 224 | 224 | } |
| 225 | -add_filter( 'wp_title', 'twentythirteen_wp_title', 10, 2 ); |
|
| 225 | +add_filter('wp_title', 'twentythirteen_wp_title', 10, 2); |
|
| 226 | 226 | |
| 227 | 227 | /** |
| 228 | 228 | * Register two widget areas. |
@@ -230,29 +230,29 @@ discard block |
||
| 230 | 230 | * @since Twenty Thirteen 1.0 |
| 231 | 231 | */ |
| 232 | 232 | function twentythirteen_widgets_init() { |
| 233 | - register_sidebar( array( |
|
| 234 | - 'name' => __( 'Main Widget Area', 'twentythirteen' ), |
|
| 233 | + register_sidebar(array( |
|
| 234 | + 'name' => __('Main Widget Area', 'twentythirteen'), |
|
| 235 | 235 | 'id' => 'sidebar-1', |
| 236 | - 'description' => __( 'Appears in the footer section of the site.', 'twentythirteen' ), |
|
| 236 | + 'description' => __('Appears in the footer section of the site.', 'twentythirteen'), |
|
| 237 | 237 | 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
| 238 | 238 | 'after_widget' => '</aside>', |
| 239 | 239 | 'before_title' => '<h3 class="widget-title">', |
| 240 | 240 | 'after_title' => '</h3>', |
| 241 | - ) ); |
|
| 241 | + )); |
|
| 242 | 242 | |
| 243 | - register_sidebar( array( |
|
| 244 | - 'name' => __( 'Secondary Widget Area', 'twentythirteen' ), |
|
| 243 | + register_sidebar(array( |
|
| 244 | + 'name' => __('Secondary Widget Area', 'twentythirteen'), |
|
| 245 | 245 | 'id' => 'sidebar-2', |
| 246 | - 'description' => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ), |
|
| 246 | + 'description' => __('Appears on posts and pages in the sidebar.', 'twentythirteen'), |
|
| 247 | 247 | 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
| 248 | 248 | 'after_widget' => '</aside>', |
| 249 | 249 | 'before_title' => '<h3 class="widget-title">', |
| 250 | 250 | 'after_title' => '</h3>', |
| 251 | - ) ); |
|
| 251 | + )); |
|
| 252 | 252 | } |
| 253 | -add_action( 'widgets_init', 'twentythirteen_widgets_init' ); |
|
| 253 | +add_action('widgets_init', 'twentythirteen_widgets_init'); |
|
| 254 | 254 | |
| 255 | -if ( ! function_exists( 'twentythirteen_paging_nav' ) ) : |
|
| 255 | +if ( ! function_exists('twentythirteen_paging_nav')) : |
|
| 256 | 256 | /** |
| 257 | 257 | * Display navigation to next/previous set of posts when applicable. |
| 258 | 258 | * |
@@ -262,19 +262,19 @@ discard block |
||
| 262 | 262 | global $wp_query; |
| 263 | 263 | |
| 264 | 264 | // Don't print empty markup if there's only one page. |
| 265 | - if ( $wp_query->max_num_pages < 2 ) |
|
| 265 | + if ($wp_query->max_num_pages < 2) |
|
| 266 | 266 | return; |
| 267 | 267 | ?> |
| 268 | 268 | <nav class="navigation paging-navigation" role="navigation"> |
| 269 | - <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1> |
|
| 269 | + <h1 class="screen-reader-text"><?php _e('Posts navigation', 'twentythirteen'); ?></h1> |
|
| 270 | 270 | <div class="nav-links"> |
| 271 | 271 | |
| 272 | - <?php if ( get_next_posts_link() ) : ?> |
|
| 273 | - <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentythirteen' ) ); ?></div> |
|
| 272 | + <?php if (get_next_posts_link()) : ?> |
|
| 273 | + <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">←</span> Older posts', 'twentythirteen')); ?></div> |
|
| 274 | 274 | <?php endif; ?> |
| 275 | 275 | |
| 276 | - <?php if ( get_previous_posts_link() ) : ?> |
|
| 277 | - <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?></div> |
|
| 276 | + <?php if (get_previous_posts_link()) : ?> |
|
| 277 | + <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">→</span>', 'twentythirteen')); ?></div> |
|
| 278 | 278 | <?php endif; ?> |
| 279 | 279 | |
| 280 | 280 | </div><!-- .nav-links --> |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | } |
| 284 | 284 | endif; |
| 285 | 285 | |
| 286 | -if ( ! function_exists( 'twentythirteen_post_nav' ) ) : |
|
| 286 | +if ( ! function_exists('twentythirteen_post_nav')) : |
|
| 287 | 287 | /** |
| 288 | 288 | * Display navigation to next/previous post when applicable. |
| 289 | 289 | * |
@@ -293,18 +293,18 @@ discard block |
||
| 293 | 293 | global $post; |
| 294 | 294 | |
| 295 | 295 | // Don't print empty markup if there's nowhere to navigate. |
| 296 | - $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); |
|
| 297 | - $next = get_adjacent_post( false, '', false ); |
|
| 296 | + $previous = (is_attachment()) ? get_post($post->post_parent) : get_adjacent_post(false, '', true); |
|
| 297 | + $next = get_adjacent_post(false, '', false); |
|
| 298 | 298 | |
| 299 | - if ( ! $next && ! $previous ) |
|
| 299 | + if ( ! $next && ! $previous) |
|
| 300 | 300 | return; |
| 301 | 301 | ?> |
| 302 | 302 | <nav class="navigation post-navigation" role="navigation"> |
| 303 | - <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1> |
|
| 303 | + <h1 class="screen-reader-text"><?php _e('Post navigation', 'twentythirteen'); ?></h1> |
|
| 304 | 304 | <div class="nav-links"> |
| 305 | 305 | |
| 306 | - <?php previous_post_link( '%link', _x( '<span class="meta-nav">←</span> %title', 'Previous post link', 'twentythirteen' ) ); ?> |
|
| 307 | - <?php next_post_link( '%link', _x( '%title <span class="meta-nav">→</span>', 'Next post link', 'twentythirteen' ) ); ?> |
|
| 306 | + <?php previous_post_link('%link', _x('<span class="meta-nav">←</span> %title', 'Previous post link', 'twentythirteen')); ?> |
|
| 307 | + <?php next_post_link('%link', _x('%title <span class="meta-nav">→</span>', 'Next post link', 'twentythirteen')); ?> |
|
| 308 | 308 | |
| 309 | 309 | </div><!-- .nav-links --> |
| 310 | 310 | </nav><!-- .navigation --> |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | } |
| 313 | 313 | endif; |
| 314 | 314 | |
| 315 | -if ( ! function_exists( 'twentythirteen_entry_meta' ) ) : |
|
| 315 | +if ( ! function_exists('twentythirteen_entry_meta')) : |
|
| 316 | 316 | /** |
| 317 | 317 | * Print HTML with meta information for current post: categories, tags, permalink, author, and date. |
| 318 | 318 | * |
@@ -321,36 +321,36 @@ discard block |
||
| 321 | 321 | * @since Twenty Thirteen 1.0 |
| 322 | 322 | */ |
| 323 | 323 | function twentythirteen_entry_meta() { |
| 324 | - if ( is_sticky() && is_home() && ! is_paged() ) |
|
| 325 | - echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>'; |
|
| 324 | + if (is_sticky() && is_home() && ! is_paged()) |
|
| 325 | + echo '<span class="featured-post">'.esc_html__('Sticky', 'twentythirteen').'</span>'; |
|
| 326 | 326 | |
| 327 | - if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) |
|
| 327 | + if ( ! has_post_format('link') && 'post' == get_post_type()) |
|
| 328 | 328 | twentythirteen_entry_date(); |
| 329 | 329 | |
| 330 | 330 | // Translators: used between list items, there is a space after the comma. |
| 331 | - $categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) ); |
|
| 332 | - if ( $categories_list ) { |
|
| 333 | - echo '<span class="categories-links">' . $categories_list . '</span>'; |
|
| 331 | + $categories_list = get_the_category_list(__(', ', 'twentythirteen')); |
|
| 332 | + if ($categories_list) { |
|
| 333 | + echo '<span class="categories-links">'.$categories_list.'</span>'; |
|
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | // Translators: used between list items, there is a space after the comma. |
| 337 | - $tag_list = get_the_tag_list( '', __( ', ', 'twentythirteen' ) ); |
|
| 338 | - if ( $tag_list ) { |
|
| 339 | - echo '<span class="tags-links">' . $tag_list . '</span>'; |
|
| 337 | + $tag_list = get_the_tag_list('', __(', ', 'twentythirteen')); |
|
| 338 | + if ($tag_list) { |
|
| 339 | + echo '<span class="tags-links">'.$tag_list.'</span>'; |
|
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | // Post author |
| 343 | - if ( 'post' == get_post_type() ) { |
|
| 344 | - printf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>', |
|
| 345 | - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), |
|
| 346 | - esc_attr( sprintf( __( 'View all posts by %s', 'twentythirteen' ), get_the_author() ) ), |
|
| 343 | + if ('post' == get_post_type()) { |
|
| 344 | + printf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>', |
|
| 345 | + esc_url(get_author_posts_url(get_the_author_meta('ID'))), |
|
| 346 | + esc_attr(sprintf(__('View all posts by %s', 'twentythirteen'), get_the_author())), |
|
| 347 | 347 | get_the_author() |
| 348 | 348 | ); |
| 349 | 349 | } |
| 350 | 350 | } |
| 351 | 351 | endif; |
| 352 | 352 | |
| 353 | -if ( ! function_exists( 'twentythirteen_entry_date' ) ) : |
|
| 353 | +if ( ! function_exists('twentythirteen_entry_date')) : |
|
| 354 | 354 | /** |
| 355 | 355 | * Print HTML with date information for current post. |
| 356 | 356 | * |
@@ -361,27 +361,27 @@ discard block |
||
| 361 | 361 | * @param boolean $echo (optional) Whether to echo the date. Default true. |
| 362 | 362 | * @return string The HTML-formatted post date. |
| 363 | 363 | */ |
| 364 | -function twentythirteen_entry_date( $echo = true ) { |
|
| 365 | - if ( has_post_format( array( 'chat', 'status' ) ) ) |
|
| 366 | - $format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' ); |
|
| 364 | +function twentythirteen_entry_date($echo = true) { |
|
| 365 | + if (has_post_format(array('chat', 'status'))) |
|
| 366 | + $format_prefix = _x('%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen'); |
|
| 367 | 367 | else |
| 368 | 368 | $format_prefix = '%2$s'; |
| 369 | 369 | |
| 370 | - $date = sprintf( '<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>', |
|
| 371 | - esc_url( get_permalink() ), |
|
| 372 | - esc_attr( sprintf( __( 'Permalink to %s', 'twentythirteen' ), the_title_attribute( 'echo=0' ) ) ), |
|
| 373 | - esc_attr( get_the_date( 'c' ) ), |
|
| 374 | - esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) ) |
|
| 370 | + $date = sprintf('<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>', |
|
| 371 | + esc_url(get_permalink()), |
|
| 372 | + esc_attr(sprintf(__('Permalink to %s', 'twentythirteen'), the_title_attribute('echo=0'))), |
|
| 373 | + esc_attr(get_the_date('c')), |
|
| 374 | + esc_html(sprintf($format_prefix, get_post_format_string(get_post_format()), get_the_date())) |
|
| 375 | 375 | ); |
| 376 | 376 | |
| 377 | - if ( $echo ) |
|
| 377 | + if ($echo) |
|
| 378 | 378 | echo $date; |
| 379 | 379 | |
| 380 | 380 | return $date; |
| 381 | 381 | } |
| 382 | 382 | endif; |
| 383 | 383 | |
| 384 | -if ( ! function_exists( 'twentythirteen_the_attached_image' ) ) : |
|
| 384 | +if ( ! function_exists('twentythirteen_the_attached_image')) : |
|
| 385 | 385 | /** |
| 386 | 386 | * Print the attached image with a link to the next attached image. |
| 387 | 387 | * |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | * @type int The attachment width in pixels. |
| 399 | 399 | * } |
| 400 | 400 | */ |
| 401 | - $attachment_size = apply_filters( 'twentythirteen_attachment_size', array( 724, 724 ) ); |
|
| 401 | + $attachment_size = apply_filters('twentythirteen_attachment_size', array(724, 724)); |
|
| 402 | 402 | $next_attachment_url = wp_get_attachment_url(); |
| 403 | 403 | $post = get_post(); |
| 404 | 404 | |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | * looking at the last image in a gallery), or, in a gallery of one, just the |
| 409 | 409 | * link to that image file. |
| 410 | 410 | */ |
| 411 | - $attachment_ids = get_posts( array( |
|
| 411 | + $attachment_ids = get_posts(array( |
|
| 412 | 412 | 'post_parent' => $post->post_parent, |
| 413 | 413 | 'fields' => 'ids', |
| 414 | 414 | 'numberposts' => -1, |
@@ -417,30 +417,30 @@ discard block |
||
| 417 | 417 | 'post_mime_type' => 'image', |
| 418 | 418 | 'order' => 'ASC', |
| 419 | 419 | 'orderby' => 'menu_order ID', |
| 420 | - ) ); |
|
| 420 | + )); |
|
| 421 | 421 | |
| 422 | 422 | // If there is more than 1 attachment in a gallery... |
| 423 | - if ( count( $attachment_ids ) > 1 ) { |
|
| 424 | - foreach ( $attachment_ids as $idx => $attachment_id ) { |
|
| 425 | - if ( $attachment_id == $post->ID ) { |
|
| 426 | - $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ]; |
|
| 423 | + if (count($attachment_ids) > 1) { |
|
| 424 | + foreach ($attachment_ids as $idx => $attachment_id) { |
|
| 425 | + if ($attachment_id == $post->ID) { |
|
| 426 | + $next_id = $attachment_ids[($idx + 1) % count($attachment_ids)]; |
|
| 427 | 427 | break; |
| 428 | 428 | } |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | // get the URL of the next image attachment... |
| 432 | - if ( $next_id ) |
|
| 433 | - $next_attachment_url = get_attachment_link( $next_id ); |
|
| 432 | + if ($next_id) |
|
| 433 | + $next_attachment_url = get_attachment_link($next_id); |
|
| 434 | 434 | |
| 435 | 435 | // or get the URL of the first image attachment. |
| 436 | 436 | else |
| 437 | - $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); |
|
| 437 | + $next_attachment_url = get_attachment_link(reset($attachment_ids)); |
|
| 438 | 438 | } |
| 439 | 439 | |
| 440 | - printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>', |
|
| 441 | - esc_url( $next_attachment_url ), |
|
| 442 | - the_title_attribute( array( 'echo' => false ) ), |
|
| 443 | - wp_get_attachment_image( $post->ID, $attachment_size ) |
|
| 440 | + printf('<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>', |
|
| 441 | + esc_url($next_attachment_url), |
|
| 442 | + the_title_attribute(array('echo' => false)), |
|
| 443 | + wp_get_attachment_image($post->ID, $attachment_size) |
|
| 444 | 444 | ); |
| 445 | 445 | } |
| 446 | 446 | endif; |
@@ -459,12 +459,12 @@ discard block |
||
| 459 | 459 | */ |
| 460 | 460 | function twentythirteen_get_link_url() { |
| 461 | 461 | $content = get_the_content(); |
| 462 | - $has_url = get_url_in_content( $content ); |
|
| 462 | + $has_url = get_url_in_content($content); |
|
| 463 | 463 | |
| 464 | - return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); |
|
| 464 | + return ($has_url) ? $has_url : apply_filters('the_permalink', get_permalink()); |
|
| 465 | 465 | } |
| 466 | 466 | |
| 467 | -if ( ! function_exists( 'twentythirteen_excerpt_more' ) && ! is_admin() ) : |
|
| 467 | +if ( ! function_exists('twentythirteen_excerpt_more') && ! is_admin()) : |
|
| 468 | 468 | /** |
| 469 | 469 | * Replaces "[...]" (appended to automatically generated excerpts) with ... |
| 470 | 470 | * and a Continue reading link. |
@@ -474,15 +474,15 @@ discard block |
||
| 474 | 474 | * @param string $more Default Read More excerpt link. |
| 475 | 475 | * @return string Filtered Read More excerpt link. |
| 476 | 476 | */ |
| 477 | -function twentythirteen_excerpt_more( $more ) { |
|
| 478 | - $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>', |
|
| 479 | - esc_url( get_permalink( get_the_ID() ) ), |
|
| 477 | +function twentythirteen_excerpt_more($more) { |
|
| 478 | + $link = sprintf('<a href="%1$s" class="more-link">%2$s</a>', |
|
| 479 | + esc_url(get_permalink(get_the_ID())), |
|
| 480 | 480 | /* translators: %s: Name of current post */ |
| 481 | - sprintf( __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' ) |
|
| 481 | + sprintf(__('Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen'), '<span class="screen-reader-text">'.get_the_title(get_the_ID()).'</span>') |
|
| 482 | 482 | ); |
| 483 | - return ' … ' . $link; |
|
| 483 | + return ' … '.$link; |
|
| 484 | 484 | } |
| 485 | -add_filter( 'excerpt_more', 'twentythirteen_excerpt_more' ); |
|
| 485 | +add_filter('excerpt_more', 'twentythirteen_excerpt_more'); |
|
| 486 | 486 | endif; |
| 487 | 487 | |
| 488 | 488 | /** |
@@ -498,19 +498,19 @@ discard block |
||
| 498 | 498 | * @param array $classes A list of existing body class values. |
| 499 | 499 | * @return array The filtered body class list. |
| 500 | 500 | */ |
| 501 | -function twentythirteen_body_class( $classes ) { |
|
| 502 | - if ( ! is_multi_author() ) |
|
| 501 | +function twentythirteen_body_class($classes) { |
|
| 502 | + if ( ! is_multi_author()) |
|
| 503 | 503 | $classes[] = 'single-author'; |
| 504 | 504 | |
| 505 | - if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() ) |
|
| 505 | + if (is_active_sidebar('sidebar-2') && ! is_attachment() && ! is_404()) |
|
| 506 | 506 | $classes[] = 'sidebar'; |
| 507 | 507 | |
| 508 | - if ( ! get_option( 'show_avatars' ) ) |
|
| 508 | + if ( ! get_option('show_avatars')) |
|
| 509 | 509 | $classes[] = 'no-avatars'; |
| 510 | 510 | |
| 511 | 511 | return $classes; |
| 512 | 512 | } |
| 513 | -add_filter( 'body_class', 'twentythirteen_body_class' ); |
|
| 513 | +add_filter('body_class', 'twentythirteen_body_class'); |
|
| 514 | 514 | |
| 515 | 515 | /** |
| 516 | 516 | * Adjust content_width value for video post formats and attachment templates. |
@@ -520,12 +520,12 @@ discard block |
||
| 520 | 520 | function twentythirteen_content_width() { |
| 521 | 521 | global $content_width; |
| 522 | 522 | |
| 523 | - if ( is_attachment() ) |
|
| 523 | + if (is_attachment()) |
|
| 524 | 524 | $content_width = 724; |
| 525 | - elseif ( has_post_format( 'audio' ) ) |
|
| 525 | + elseif (has_post_format('audio')) |
|
| 526 | 526 | $content_width = 484; |
| 527 | 527 | } |
| 528 | -add_action( 'template_redirect', 'twentythirteen_content_width' ); |
|
| 528 | +add_action('template_redirect', 'twentythirteen_content_width'); |
|
| 529 | 529 | |
| 530 | 530 | /** |
| 531 | 531 | * Add postMessage support for site title and description for the Customizer. |
@@ -534,25 +534,25 @@ discard block |
||
| 534 | 534 | * |
| 535 | 535 | * @param WP_Customize_Manager $wp_customize Customizer object. |
| 536 | 536 | */ |
| 537 | -function twentythirteen_customize_register( $wp_customize ) { |
|
| 538 | - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; |
|
| 539 | - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
|
| 540 | - $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; |
|
| 537 | +function twentythirteen_customize_register($wp_customize) { |
|
| 538 | + $wp_customize->get_setting('blogname')->transport = 'postMessage'; |
|
| 539 | + $wp_customize->get_setting('blogdescription')->transport = 'postMessage'; |
|
| 540 | + $wp_customize->get_setting('header_textcolor')->transport = 'postMessage'; |
|
| 541 | 541 | |
| 542 | - if ( isset( $wp_customize->selective_refresh ) ) { |
|
| 543 | - $wp_customize->selective_refresh->add_partial( 'blogname', array( |
|
| 542 | + if (isset($wp_customize->selective_refresh)) { |
|
| 543 | + $wp_customize->selective_refresh->add_partial('blogname', array( |
|
| 544 | 544 | 'selector' => '.site-title', |
| 545 | 545 | 'container_inclusive' => false, |
| 546 | 546 | 'render_callback' => 'twentythirteen_customize_partial_blogname', |
| 547 | - ) ); |
|
| 548 | - $wp_customize->selective_refresh->add_partial( 'blogdescription', array( |
|
| 547 | + )); |
|
| 548 | + $wp_customize->selective_refresh->add_partial('blogdescription', array( |
|
| 549 | 549 | 'selector' => '.site-description', |
| 550 | 550 | 'container_inclusive' => false, |
| 551 | 551 | 'render_callback' => 'twentythirteen_customize_partial_blogdescription', |
| 552 | - ) ); |
|
| 552 | + )); |
|
| 553 | 553 | } |
| 554 | 554 | } |
| 555 | -add_action( 'customize_register', 'twentythirteen_customize_register' ); |
|
| 555 | +add_action('customize_register', 'twentythirteen_customize_register'); |
|
| 556 | 556 | |
| 557 | 557 | /** |
| 558 | 558 | * Render the site title for the selective refresh partial. |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | * @return void |
| 564 | 564 | */ |
| 565 | 565 | function twentythirteen_customize_partial_blogname() { |
| 566 | - bloginfo( 'name' ); |
|
| 566 | + bloginfo('name'); |
|
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | /** |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | * @return void |
| 576 | 576 | */ |
| 577 | 577 | function twentythirteen_customize_partial_blogdescription() { |
| 578 | - bloginfo( 'description' ); |
|
| 578 | + bloginfo('description'); |
|
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | /** |
@@ -587,6 +587,6 @@ discard block |
||
| 587 | 587 | * @since Twenty Thirteen 1.0 |
| 588 | 588 | */ |
| 589 | 589 | function twentythirteen_customize_preview_js() { |
| 590 | - wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true ); |
|
| 590 | + wp_enqueue_script('twentythirteen-customizer', get_template_directory_uri().'/js/theme-customizer.js', array('customize-preview'), '20141120', true); |
|
| 591 | 591 | } |
| 592 | -add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' ); |
|
| 592 | +add_action('customize_preview_init', 'twentythirteen_customize_preview_js'); |
|
@@ -12,27 +12,27 @@ |
||
| 12 | 12 | <div class="entry-content"> |
| 13 | 13 | <?php |
| 14 | 14 | /* translators: %s: Name of current post */ |
| 15 | - the_content( sprintf( |
|
| 16 | - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen' ), |
|
| 17 | - the_title( '<span class="screen-reader-text">', '</span>', false ) |
|
| 18 | - ) ); |
|
| 15 | + the_content(sprintf( |
|
| 16 | + __('Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen'), |
|
| 17 | + the_title('<span class="screen-reader-text">', '</span>', false) |
|
| 18 | + )); |
|
| 19 | 19 | |
| 20 | - wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); |
|
| 20 | + wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>')); |
|
| 21 | 21 | ?> |
| 22 | 22 | </div><!-- .entry-content --> |
| 23 | 23 | |
| 24 | 24 | <footer class="entry-meta"> |
| 25 | - <?php if ( is_single() ) : ?> |
|
| 25 | + <?php if (is_single()) : ?> |
|
| 26 | 26 | <?php twentythirteen_entry_meta(); ?> |
| 27 | - <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 27 | + <?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?> |
|
| 28 | 28 | |
| 29 | - <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?> |
|
| 30 | - <?php get_template_part( 'author-bio' ); ?> |
|
| 29 | + <?php if (get_the_author_meta('description') && is_multi_author()) : ?> |
|
| 30 | + <?php get_template_part('author-bio'); ?> |
|
| 31 | 31 | <?php endif; ?> |
| 32 | 32 | |
| 33 | 33 | <?php else : ?> |
| 34 | 34 | <?php twentythirteen_entry_date(); ?> |
| 35 | - <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 35 | + <?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?> |
|
| 36 | 36 | <?php endif; // is_single() ?> |
| 37 | 37 | </footer><!-- .entry-meta --> |
| 38 | 38 | </article><!-- #post --> |
@@ -30,8 +30,11 @@ |
||
| 30 | 30 | <?php get_template_part( 'author-bio' ); ?> |
| 31 | 31 | <?php endif; ?> |
| 32 | 32 | |
| 33 | - <?php else : ?> |
|
| 34 | - <?php twentythirteen_entry_date(); ?> |
|
| 33 | + <?php else { |
|
| 34 | + : ?> |
|
| 35 | + <?php twentythirteen_entry_date(); |
|
| 36 | +} |
|
| 37 | +?> |
|
| 35 | 38 | <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
| 36 | 39 | <?php endif; // is_single() ?> |
| 37 | 40 | </footer><!-- .entry-meta --> |
@@ -14,24 +14,24 @@ |
||
| 14 | 14 | <div id="primary" class="content-area"> |
| 15 | 15 | <div id="content" class="site-content" role="main"> |
| 16 | 16 | |
| 17 | - <?php if ( have_posts() ) : ?> |
|
| 17 | + <?php if (have_posts()) : ?> |
|
| 18 | 18 | <header class="archive-header"> |
| 19 | - <h1 class="archive-title"><?php printf( __( 'Category Archives: %s', 'twentythirteen' ), single_cat_title( '', false ) ); ?></h1> |
|
| 19 | + <h1 class="archive-title"><?php printf(__('Category Archives: %s', 'twentythirteen'), single_cat_title('', false)); ?></h1> |
|
| 20 | 20 | |
| 21 | - <?php if ( category_description() ) : // Show an optional category description ?> |
|
| 21 | + <?php if (category_description()) : // Show an optional category description ?> |
|
| 22 | 22 | <div class="archive-meta"><?php echo category_description(); ?></div> |
| 23 | 23 | <?php endif; ?> |
| 24 | 24 | </header><!-- .archive-header --> |
| 25 | 25 | |
| 26 | 26 | <?php /* The loop */ ?> |
| 27 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 28 | - <?php get_template_part( 'content', get_post_format() ); ?> |
|
| 27 | + <?php while (have_posts()) : the_post(); ?> |
|
| 28 | + <?php get_template_part('content', get_post_format()); ?> |
|
| 29 | 29 | <?php endwhile; ?> |
| 30 | 30 | |
| 31 | 31 | <?php twentythirteen_paging_nav(); ?> |
| 32 | 32 | |
| 33 | 33 | <?php else : ?> |
| 34 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 34 | + <?php get_template_part('content', 'none'); ?> |
|
| 35 | 35 | <?php endif; ?> |
| 36 | 36 | |
| 37 | 37 | </div><!-- #content --> |
@@ -51,8 +51,11 @@ |
||
| 51 | 51 | |
| 52 | 52 | <?php twentythirteen_paging_nav(); ?> |
| 53 | 53 | |
| 54 | - <?php else : ?> |
|
| 55 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 54 | + <?php else { |
|
| 55 | + : ?> |
|
| 56 | + <?php get_template_part( 'content', 'none' ); |
|
| 57 | +} |
|
| 58 | +?> |
|
| 56 | 59 | <?php endif; ?> |
| 57 | 60 | |
| 58 | 61 | </div><!-- #content --> |
@@ -11,32 +11,32 @@ |
||
| 11 | 11 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 12 | 12 | <header class="entry-header"> |
| 13 | 13 | <h1 class="entry-title"> |
| 14 | - <a href="<?php echo esc_url( twentythirteen_get_link_url() ); ?>"><?php the_title(); ?></a> |
|
| 14 | + <a href="<?php echo esc_url(twentythirteen_get_link_url()); ?>"><?php the_title(); ?></a> |
|
| 15 | 15 | </h1> |
| 16 | 16 | |
| 17 | 17 | <div class="entry-meta"> |
| 18 | 18 | <?php twentythirteen_entry_date(); ?> |
| 19 | - <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 19 | + <?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?> |
|
| 20 | 20 | </div><!-- .entry-meta --> |
| 21 | 21 | </header><!-- .entry-header --> |
| 22 | 22 | |
| 23 | 23 | <div class="entry-content"> |
| 24 | 24 | <?php |
| 25 | 25 | /* translators: %s: Name of current post */ |
| 26 | - the_content( sprintf( |
|
| 27 | - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen' ), |
|
| 28 | - the_title( '<span class="screen-reader-text">', '</span>', false ) |
|
| 29 | - ) ); |
|
| 26 | + the_content(sprintf( |
|
| 27 | + __('Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen'), |
|
| 28 | + the_title('<span class="screen-reader-text">', '</span>', false) |
|
| 29 | + )); |
|
| 30 | 30 | |
| 31 | - wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); |
|
| 31 | + wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>')); |
|
| 32 | 32 | ?> |
| 33 | 33 | </div><!-- .entry-content --> |
| 34 | 34 | |
| 35 | - <?php if ( is_single() ) : ?> |
|
| 35 | + <?php if (is_single()) : ?> |
|
| 36 | 36 | <footer class="entry-meta"> |
| 37 | 37 | <?php twentythirteen_entry_meta(); ?> |
| 38 | - <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?> |
|
| 39 | - <?php get_template_part( 'author-bio' ); ?> |
|
| 38 | + <?php if (get_the_author_meta('description') && is_multi_author()) : ?> |
|
| 39 | + <?php get_template_part('author-bio'); ?> |
|
| 40 | 40 | <?php endif; ?> |
| 41 | 41 | </footer><!-- .entry-meta --> |
| 42 | 42 | <?php endif; // is_single() ?> |