@@ -25,19 +25,19 @@ discard block |
||
| 25 | 25 | * We reset this later so we can run the loop |
| 26 | 26 | * properly with a call to rewind_posts(). |
| 27 | 27 | */ |
| 28 | - if ( have_posts() ) |
|
| 28 | + if (have_posts()) |
|
| 29 | 29 | the_post(); |
| 30 | 30 | ?> |
| 31 | 31 | |
| 32 | 32 | <h1 class="page-title"> |
| 33 | -<?php if ( is_day() ) : ?> |
|
| 34 | - <?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?> |
|
| 35 | -<?php elseif ( is_month() ) : ?> |
|
| 36 | - <?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyten' ) ) ); ?> |
|
| 37 | -<?php elseif ( is_year() ) : ?> |
|
| 38 | - <?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyten' ) ) ); ?> |
|
| 33 | +<?php if (is_day()) : ?> |
|
| 34 | + <?php printf(__('Daily Archives: <span>%s</span>', 'twentyten'), get_the_date()); ?> |
|
| 35 | +<?php elseif (is_month()) : ?> |
|
| 36 | + <?php printf(__('Monthly Archives: <span>%s</span>', 'twentyten'), get_the_date(_x('F Y', 'monthly archives date format', 'twentyten'))); ?> |
|
| 37 | +<?php elseif (is_year()) : ?> |
|
| 38 | + <?php printf(__('Yearly Archives: <span>%s</span>', 'twentyten'), get_the_date(_x('Y', 'yearly archives date format', 'twentyten'))); ?> |
|
| 39 | 39 | <?php else : ?> |
| 40 | - <?php _e( 'Blog Archives', 'twentyten' ); ?> |
|
| 40 | + <?php _e('Blog Archives', 'twentyten'); ?> |
|
| 41 | 41 | <?php endif; ?> |
| 42 | 42 | </h1> |
| 43 | 43 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * If you want to overload this in a child theme then include a file |
| 55 | 55 | * called loop-archive.php and that will be used instead. |
| 56 | 56 | */ |
| 57 | - get_template_part( 'loop', 'archive' ); |
|
| 57 | + get_template_part('loop', 'archive'); |
|
| 58 | 58 | ?> |
| 59 | 59 | |
| 60 | 60 | </div><!-- #content --> |
@@ -25,9 +25,10 @@ discard block |
||
| 25 | 25 | * We reset this later so we can run the loop |
| 26 | 26 | * properly with a call to rewind_posts(). |
| 27 | 27 | */ |
| 28 | - if ( have_posts() ) |
|
| 29 | - the_post(); |
|
| 30 | -?> |
|
| 28 | + if ( have_posts() ) { |
|
| 29 | + the_post(); |
|
| 30 | + } |
|
| 31 | + ?> |
|
| 31 | 32 | |
| 32 | 33 | <h1 class="page-title"> |
| 33 | 34 | <?php if ( is_day() ) : ?> |
@@ -36,8 +37,11 @@ discard block |
||
| 36 | 37 | <?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyten' ) ) ); ?> |
| 37 | 38 | <?php elseif ( is_year() ) : ?> |
| 38 | 39 | <?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyten' ) ) ); ?> |
| 39 | -<?php else : ?> |
|
| 40 | - <?php _e( 'Blog Archives', 'twentyten' ); ?> |
|
| 40 | +<?php else { |
|
| 41 | + : ?> |
|
| 42 | + <?php _e( 'Blog Archives', 'twentyten' ); |
|
| 43 | +} |
|
| 44 | +?> |
|
| 41 | 45 | <?php endif; ?> |
| 42 | 46 | </h1> |
| 43 | 47 | |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template for displaying Archive pages |
|
| 4 | - * |
|
| 5 | - * Used to display archive-type pages if nothing more specific matches a query. |
|
| 6 | - * For example, puts together date-based pages if no date.php file exists. |
|
| 7 | - * |
|
| 8 | - * @link https://codex.wordpress.org/Template_Hierarchy |
|
| 9 | - * |
|
| 10 | - * @package WordPress |
|
| 11 | - * @subpackage Twenty_Ten |
|
| 12 | - * @since Twenty Ten 1.0 |
|
| 13 | - */ |
|
| 3 | + * Template for displaying Archive pages |
|
| 4 | + * |
|
| 5 | + * Used to display archive-type pages if nothing more specific matches a query. |
|
| 6 | + * For example, puts together date-based pages if no date.php file exists. |
|
| 7 | + * |
|
| 8 | + * @link https://codex.wordpress.org/Template_Hierarchy |
|
| 9 | + * |
|
| 10 | + * @package WordPress |
|
| 11 | + * @subpackage Twenty_Ten |
|
| 12 | + * @since Twenty Ten 1.0 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | get_header(); ?> |
| 16 | 16 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template for displaying attachments |
|
| 4 | - * |
|
| 5 | - * @package WordPress |
|
| 6 | - * @subpackage Twenty_Ten |
|
| 7 | - * @since Twenty Ten 1.0 |
|
| 8 | - */ |
|
| 3 | + * Template for displaying attachments |
|
| 4 | + * |
|
| 5 | + * @package WordPress |
|
| 6 | + * @subpackage Twenty_Ten |
|
| 7 | + * @since Twenty Ten 1.0 |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | get_header(); ?> |
| 11 | 11 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * If you want to overload this in a child theme then include a file |
| 19 | 19 | * called loop-attachment.php and that will be used instead. |
| 20 | 20 | */ |
| 21 | - get_template_part( 'loop', 'attachment' ); |
|
| 21 | + get_template_part('loop', 'attachment'); |
|
| 22 | 22 | ?> |
| 23 | 23 | |
| 24 | 24 | </div><!-- #content --> |
@@ -15,10 +15,10 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | ?> |
| 17 | 17 | |
| 18 | -<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> |
|
| 18 | +<?php if (have_posts()) while (have_posts()) : the_post(); ?> |
|
| 19 | 19 | |
| 20 | 20 | <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 21 | - <?php if ( is_front_page() ) { ?> |
|
| 21 | + <?php if (is_front_page()) { ?> |
|
| 22 | 22 | <h2 class="entry-title"><?php the_title(); ?></h2> |
| 23 | 23 | <?php } else { ?> |
| 24 | 24 | <h1 class="entry-title"><?php the_title(); ?></h1> |
@@ -26,11 +26,11 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | <div class="entry-content"> |
| 28 | 28 | <?php the_content(); ?> |
| 29 | - <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> |
|
| 30 | - <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 29 | + <?php wp_link_pages(array('before' => '<div class="page-link">'.__('Pages:', 'twentyten'), 'after' => '</div>')); ?> |
|
| 30 | + <?php edit_post_link(__('Edit', 'twentyten'), '<span class="edit-link">', '</span>'); ?> |
|
| 31 | 31 | </div><!-- .entry-content --> |
| 32 | 32 | </div><!-- #post-## --> |
| 33 | 33 | |
| 34 | - <?php comments_template( '', true ); ?> |
|
| 34 | + <?php comments_template('', true); ?> |
|
| 35 | 35 | |
| 36 | 36 | <?php endwhile; // end of the loop. ?> |
@@ -15,7 +15,10 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | ?> |
| 17 | 17 | |
| 18 | -<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> |
|
| 18 | +<?php if ( have_posts() ) { |
|
| 19 | + while ( have_posts() ) : the_post(); |
|
| 20 | +} |
|
| 21 | +?> |
|
| 19 | 22 | |
| 20 | 23 | <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 21 | 24 | <?php if ( is_front_page() ) { ?> |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The loop that displays a page |
|
| 4 | - * |
|
| 5 | - * The loop displays the posts and the post content. See |
|
| 6 | - * https://codex.wordpress.org/The_Loop to understand it and |
|
| 7 | - * https://codex.wordpress.org/Template_Tags to understand |
|
| 8 | - * the tags used in it. |
|
| 9 | - * |
|
| 10 | - * This can be overridden in child themes with loop-page.php. |
|
| 11 | - * |
|
| 12 | - * @package WordPress |
|
| 13 | - * @subpackage Twenty_Ten |
|
| 14 | - * @since Twenty Ten 1.2 |
|
| 15 | - */ |
|
| 3 | + * The loop that displays a page |
|
| 4 | + * |
|
| 5 | + * The loop displays the posts and the post content. See |
|
| 6 | + * https://codex.wordpress.org/The_Loop to understand it and |
|
| 7 | + * https://codex.wordpress.org/Template_Tags to understand |
|
| 8 | + * the tags used in it. |
|
| 9 | + * |
|
| 10 | + * This can be overridden in child themes with loop-page.php. |
|
| 11 | + * |
|
| 12 | + * @package WordPress |
|
| 13 | + * @subpackage Twenty_Ten |
|
| 14 | + * @since Twenty Ten 1.2 |
|
| 15 | + */ |
|
| 16 | 16 | ?> |
| 17 | 17 | |
| 18 | 18 | <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> |
@@ -21,15 +21,15 @@ discard block |
||
| 21 | 21 | * We reset this later so we can run the loop |
| 22 | 22 | * properly with a call to rewind_posts(). |
| 23 | 23 | */ |
| 24 | - if ( have_posts() ) |
|
| 24 | + if (have_posts()) |
|
| 25 | 25 | the_post(); |
| 26 | 26 | ?> |
| 27 | 27 | |
| 28 | - <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyten' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1> |
|
| 28 | + <h1 class="page-title author"><?php printf(__('Author Archives: %s', 'twentyten'), '<span class="vcard"><a class="url fn n" href="'.esc_url(get_author_posts_url(get_the_author_meta('ID'))).'" title="'.esc_attr(get_the_author()).'" rel="me">'.get_the_author().'</a></span>'); ?></h1> |
|
| 29 | 29 | |
| 30 | 30 | <?php |
| 31 | 31 | // If a user has filled out their description, show a bio on their entries. |
| 32 | -if ( get_the_author_meta( 'description' ) ) : ?> |
|
| 32 | +if (get_the_author_meta('description')) : ?> |
|
| 33 | 33 | <div id="entry-author-info"> |
| 34 | 34 | <div id="author-avatar"> |
| 35 | 35 | <?php |
@@ -40,12 +40,12 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | * @param int The height and width avatar dimensions in pixels. Default 60. |
| 42 | 42 | */ |
| 43 | - echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); |
|
| 43 | + echo get_avatar(get_the_author_meta('user_email'), apply_filters('twentyten_author_bio_avatar_size', 60)); |
|
| 44 | 44 | ?> |
| 45 | 45 | </div><!-- #author-avatar --> |
| 46 | 46 | <div id="author-description"> |
| 47 | - <h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2> |
|
| 48 | - <?php the_author_meta( 'description' ); ?> |
|
| 47 | + <h2><?php printf(__('About %s', 'twentyten'), get_the_author()); ?></h2> |
|
| 48 | + <?php the_author_meta('description'); ?> |
|
| 49 | 49 | </div><!-- #author-description --> |
| 50 | 50 | </div><!-- #entry-author-info --> |
| 51 | 51 | <?php endif; ?> |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * If you want to overload this in a child theme then include a file |
| 64 | 64 | * called loop-author.php and that will be used instead. |
| 65 | 65 | */ |
| 66 | - get_template_part( 'loop', 'author' ); |
|
| 66 | + get_template_part('loop', 'author'); |
|
| 67 | 67 | ?> |
| 68 | 68 | </div><!-- #content --> |
| 69 | 69 | </div><!-- #container --> |
@@ -21,9 +21,10 @@ |
||
| 21 | 21 | * We reset this later so we can run the loop |
| 22 | 22 | * properly with a call to rewind_posts(). |
| 23 | 23 | */ |
| 24 | - if ( have_posts() ) |
|
| 25 | - the_post(); |
|
| 26 | -?> |
|
| 24 | + if ( have_posts() ) { |
|
| 25 | + the_post(); |
|
| 26 | + } |
|
| 27 | + ?> |
|
| 27 | 28 | |
| 28 | 29 | <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyten' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1> |
| 29 | 30 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template for displaying Author Archive pages |
|
| 4 | - * |
|
| 5 | - * @package WordPress |
|
| 6 | - * @subpackage Twenty_Ten |
|
| 7 | - * @since Twenty Ten 1.0 |
|
| 8 | - */ |
|
| 3 | + * Template for displaying Author Archive pages |
|
| 4 | + * |
|
| 5 | + * @package WordPress |
|
| 6 | + * @subpackage Twenty_Ten |
|
| 7 | + * @since Twenty Ten 1.0 |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | get_header(); ?> |
| 11 | 11 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template for displaying all single posts |
|
| 4 | - * |
|
| 5 | - * @package WordPress |
|
| 6 | - * @subpackage Twenty_Ten |
|
| 7 | - * @since Twenty Ten 1.0 |
|
| 8 | - */ |
|
| 3 | + * Template for displaying all single posts |
|
| 4 | + * |
|
| 5 | + * @package WordPress |
|
| 6 | + * @subpackage Twenty_Ten |
|
| 7 | + * @since Twenty Ten 1.0 |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | get_header(); ?> |
| 11 | 11 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * If you want to overload this in a child theme then include a file |
| 19 | 19 | * called loop-single.php and that will be used instead. |
| 20 | 20 | */ |
| 21 | - get_template_part( 'loop', 'single' ); |
|
| 21 | + get_template_part('loop', 'single'); |
|
| 22 | 22 | ?> |
| 23 | 23 | |
| 24 | 24 | </div><!-- #content --> |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | * If you want to overload this in a child theme then include a file |
| 24 | 24 | * called loop-page.php and that will be used instead. |
| 25 | 25 | */ |
| 26 | - get_template_part( 'loop', 'page' ); |
|
| 26 | + get_template_part('loop', 'page'); |
|
| 27 | 27 | ?> |
| 28 | 28 | |
| 29 | 29 | </div><!-- #content --> |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template Name: One column, no sidebar |
|
| 4 | - * |
|
| 5 | - * A custom page template without sidebar. |
|
| 6 | - * |
|
| 7 | - * The "Template Name:" bit above allows this to be selectable |
|
| 8 | - * from a dropdown menu on the edit page screen. |
|
| 9 | - * |
|
| 10 | - * @package WordPress |
|
| 11 | - * @subpackage Twenty_Ten |
|
| 12 | - * @since Twenty Ten 1.0 |
|
| 13 | - */ |
|
| 3 | + * Template Name: One column, no sidebar |
|
| 4 | + * |
|
| 5 | + * A custom page template without sidebar. |
|
| 6 | + * |
|
| 7 | + * The "Template Name:" bit above allows this to be selectable |
|
| 8 | + * from a dropdown menu on the edit page screen. |
|
| 9 | + * |
|
| 10 | + * @package WordPress |
|
| 11 | + * @subpackage Twenty_Ten |
|
| 12 | + * @since Twenty Ten 1.0 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | get_header(); ?> |
| 16 | 16 | |
@@ -20,19 +20,19 @@ discard block |
||
| 20 | 20 | ?> |
| 21 | 21 | |
| 22 | 22 | <?php /* Display navigation to next/previous pages when applicable */ ?> |
| 23 | -<?php if ( $wp_query->max_num_pages > 1 ) : ?> |
|
| 23 | +<?php if ($wp_query->max_num_pages > 1) : ?> |
|
| 24 | 24 | <div id="nav-above" class="navigation"> |
| 25 | - <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> |
|
| 26 | - <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> |
|
| 25 | + <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">←</span> Older posts', 'twentyten')); ?></div> |
|
| 26 | + <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">→</span>', 'twentyten')); ?></div> |
|
| 27 | 27 | </div><!-- #nav-above --> |
| 28 | 28 | <?php endif; ?> |
| 29 | 29 | |
| 30 | 30 | <?php /* If there are no posts to display, such as an empty archive page */ ?> |
| 31 | -<?php if ( ! have_posts() ) : ?> |
|
| 31 | +<?php if ( ! have_posts()) : ?> |
|
| 32 | 32 | <div id="post-0" class="post error404 not-found"> |
| 33 | - <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> |
|
| 33 | + <h1 class="entry-title"><?php _e('Not Found', 'twentyten'); ?></h1> |
|
| 34 | 34 | <div class="entry-content"> |
| 35 | - <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p> |
|
| 35 | + <p><?php _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten'); ?></p> |
|
| 36 | 36 | <?php get_search_form(); ?> |
| 37 | 37 | </div><!-- .entry-content --> |
| 38 | 38 | </div><!-- #post-0 --> |
@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | * Without further ado, the loop: |
| 56 | 56 | */ |
| 57 | 57 | ?> |
| 58 | -<?php while ( have_posts() ) : the_post(); ?> |
|
| 58 | +<?php while (have_posts()) : the_post(); ?> |
|
| 59 | 59 | |
| 60 | 60 | <?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?> |
| 61 | 61 | |
| 62 | - <?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> |
|
| 62 | + <?php if ((function_exists('get_post_format') && 'gallery' == get_post_format($post->ID)) || in_category(_x('gallery', 'gallery category slug', 'twentyten'))) : ?> |
|
| 63 | 63 | <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 64 | 64 | <h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2> |
| 65 | 65 | |
@@ -68,21 +68,21 @@ discard block |
||
| 68 | 68 | </div><!-- .entry-meta --> |
| 69 | 69 | |
| 70 | 70 | <div class="entry-content"> |
| 71 | -<?php if ( post_password_required() ) : ?> |
|
| 71 | +<?php if (post_password_required()) : ?> |
|
| 72 | 72 | <?php the_content(); ?> |
| 73 | 73 | <?php else : ?> |
| 74 | 74 | <?php |
| 75 | 75 | $images = twentyten_get_gallery_images(); |
| 76 | - if ( $images ) : |
|
| 77 | - $total_images = count( $images ); |
|
| 78 | - $image = reset( $images ); |
|
| 76 | + if ($images) : |
|
| 77 | + $total_images = count($images); |
|
| 78 | + $image = reset($images); |
|
| 79 | 79 | ?> |
| 80 | 80 | <div class="gallery-thumb"> |
| 81 | - <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a> |
|
| 81 | + <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image($image, 'thumbnail'); ?></a> |
|
| 82 | 82 | </div><!-- .gallery-thumb --> |
| 83 | - <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ), |
|
| 84 | - 'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', |
|
| 85 | - number_format_i18n( $total_images ) |
|
| 83 | + <p><em><?php printf(_n('This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten'), |
|
| 84 | + 'href="'.esc_url(get_permalink()).'" title="'.esc_attr(sprintf(__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0'))).'" rel="bookmark"', |
|
| 85 | + number_format_i18n($total_images) |
|
| 86 | 86 | ); ?></em></p> |
| 87 | 87 | <?php endif; // end twentyten_get_gallery_images() check ?> |
| 88 | 88 | <?php the_excerpt(); ?> |
@@ -90,38 +90,38 @@ discard block |
||
| 90 | 90 | </div><!-- .entry-content --> |
| 91 | 91 | |
| 92 | 92 | <div class="entry-utility"> |
| 93 | - <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?> |
|
| 94 | - <a href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> |
|
| 93 | + <?php if (function_exists('get_post_format') && 'gallery' == get_post_format($post->ID)) : ?> |
|
| 94 | + <a href="<?php echo esc_url(get_post_format_link('gallery')); ?>" title="<?php esc_attr_e('View Galleries', 'twentyten'); ?>"><?php _e('More Galleries', 'twentyten'); ?></a> |
|
| 95 | 95 | <span class="meta-sep">|</span> |
| 96 | - <?php elseif ( $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ) && in_category( $gallery->term_id ) ) : ?> |
|
| 97 | - <a href="<?php echo esc_url( get_category_link( $gallery ) ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> |
|
| 96 | + <?php elseif ($gallery = get_term_by('slug', _x('gallery', 'gallery category slug', 'twentyten'), 'category') && in_category($gallery->term_id)) : ?> |
|
| 97 | + <a href="<?php echo esc_url(get_category_link($gallery)); ?>" title="<?php esc_attr_e('View posts in the Gallery category', 'twentyten'); ?>"><?php _e('More Galleries', 'twentyten'); ?></a> |
|
| 98 | 98 | <span class="meta-sep">|</span> |
| 99 | 99 | <?php endif; ?> |
| 100 | - <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> |
|
| 101 | - <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> |
|
| 100 | + <span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'twentyten'), __('1 Comment', 'twentyten'), __('% Comments', 'twentyten')); ?></span> |
|
| 101 | + <?php edit_post_link(__('Edit', 'twentyten'), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?> |
|
| 102 | 102 | </div><!-- .entry-utility --> |
| 103 | 103 | </div><!-- #post-## --> |
| 104 | 104 | |
| 105 | 105 | <?php /* How to display posts of the Aside format. The asides category is the old way. */ ?> |
| 106 | 106 | |
| 107 | - <?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?> |
|
| 107 | + <?php elseif ((function_exists('get_post_format') && 'aside' == get_post_format($post->ID)) || in_category(_x('asides', 'asides category slug', 'twentyten'))) : ?> |
|
| 108 | 108 | <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 109 | 109 | |
| 110 | - <?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?> |
|
| 110 | + <?php if (is_archive() || is_search()) : // Display excerpts for archives and search. ?> |
|
| 111 | 111 | <div class="entry-summary"> |
| 112 | 112 | <?php the_excerpt(); ?> |
| 113 | 113 | </div><!-- .entry-summary --> |
| 114 | 114 | <?php else : ?> |
| 115 | 115 | <div class="entry-content"> |
| 116 | - <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> |
|
| 116 | + <?php the_content(__('Continue reading <span class="meta-nav">→</span>', 'twentyten')); ?> |
|
| 117 | 117 | </div><!-- .entry-content --> |
| 118 | 118 | <?php endif; ?> |
| 119 | 119 | |
| 120 | 120 | <div class="entry-utility"> |
| 121 | 121 | <?php twentyten_posted_on(); ?> |
| 122 | 122 | <span class="meta-sep">|</span> |
| 123 | - <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> |
|
| 124 | - <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> |
|
| 123 | + <span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'twentyten'), __('1 Comment', 'twentyten'), __('% Comments', 'twentyten')); ?></span> |
|
| 124 | + <?php edit_post_link(__('Edit', 'twentyten'), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?> |
|
| 125 | 125 | </div><!-- .entry-utility --> |
| 126 | 126 | </div><!-- #post-## --> |
| 127 | 127 | |
@@ -135,48 +135,48 @@ discard block |
||
| 135 | 135 | <?php twentyten_posted_on(); ?> |
| 136 | 136 | </div><!-- .entry-meta --> |
| 137 | 137 | |
| 138 | - <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?> |
|
| 138 | + <?php if (is_archive() || is_search()) : // Only display excerpts for archives and search. ?> |
|
| 139 | 139 | <div class="entry-summary"> |
| 140 | 140 | <?php the_excerpt(); ?> |
| 141 | 141 | </div><!-- .entry-summary --> |
| 142 | 142 | <?php else : ?> |
| 143 | 143 | <div class="entry-content"> |
| 144 | - <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> |
|
| 145 | - <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> |
|
| 144 | + <?php the_content(__('Continue reading <span class="meta-nav">→</span>', 'twentyten')); ?> |
|
| 145 | + <?php wp_link_pages(array('before' => '<div class="page-link">'.__('Pages:', 'twentyten'), 'after' => '</div>')); ?> |
|
| 146 | 146 | </div><!-- .entry-content --> |
| 147 | 147 | <?php endif; ?> |
| 148 | 148 | |
| 149 | 149 | <div class="entry-utility"> |
| 150 | - <?php if ( count( get_the_category() ) ) : ?> |
|
| 150 | + <?php if (count(get_the_category())) : ?> |
|
| 151 | 151 | <span class="cat-links"> |
| 152 | - <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> |
|
| 152 | + <?php printf(__('<span class="%1$s">Posted in</span> %2$s', 'twentyten'), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list(', ')); ?> |
|
| 153 | 153 | </span> |
| 154 | 154 | <span class="meta-sep">|</span> |
| 155 | 155 | <?php endif; ?> |
| 156 | 156 | <?php |
| 157 | - $tags_list = get_the_tag_list( '', ', ' ); |
|
| 158 | - if ( $tags_list ): |
|
| 157 | + $tags_list = get_the_tag_list('', ', '); |
|
| 158 | + if ($tags_list): |
|
| 159 | 159 | ?> |
| 160 | 160 | <span class="tag-links"> |
| 161 | - <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> |
|
| 161 | + <?php printf(__('<span class="%1$s">Tagged</span> %2$s', 'twentyten'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list); ?> |
|
| 162 | 162 | </span> |
| 163 | 163 | <span class="meta-sep">|</span> |
| 164 | 164 | <?php endif; ?> |
| 165 | - <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> |
|
| 166 | - <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> |
|
| 165 | + <span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'twentyten'), __('1 Comment', 'twentyten'), __('% Comments', 'twentyten')); ?></span> |
|
| 166 | + <?php edit_post_link(__('Edit', 'twentyten'), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?> |
|
| 167 | 167 | </div><!-- .entry-utility --> |
| 168 | 168 | </div><!-- #post-## --> |
| 169 | 169 | |
| 170 | - <?php comments_template( '', true ); ?> |
|
| 170 | + <?php comments_template('', true); ?> |
|
| 171 | 171 | |
| 172 | 172 | <?php endif; // This was the if statement that broke the loop into three parts based on categories. ?> |
| 173 | 173 | |
| 174 | 174 | <?php endwhile; // End the loop. Whew. ?> |
| 175 | 175 | |
| 176 | 176 | <?php /* Display navigation to next/previous pages when applicable */ ?> |
| 177 | -<?php if ( $wp_query->max_num_pages > 1 ) : ?> |
|
| 177 | +<?php if ($wp_query->max_num_pages > 1) : ?> |
|
| 178 | 178 | <div id="nav-below" class="navigation"> |
| 179 | - <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> |
|
| 180 | - <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> |
|
| 179 | + <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">←</span> Older posts', 'twentyten')); ?></div> |
|
| 180 | + <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">→</span>', 'twentyten')); ?></div> |
|
| 181 | 181 | </div><!-- #nav-below --> |
| 182 | 182 | <?php endif; ?> |
@@ -70,9 +70,11 @@ discard block |
||
| 70 | 70 | <div class="entry-content"> |
| 71 | 71 | <?php if ( post_password_required() ) : ?> |
| 72 | 72 | <?php the_content(); ?> |
| 73 | -<?php else : ?> |
|
| 73 | +<?php else { |
|
| 74 | + : ?> |
|
| 74 | 75 | <?php |
| 75 | 76 | $images = twentyten_get_gallery_images(); |
| 77 | +} |
|
| 76 | 78 | if ( $images ) : |
| 77 | 79 | $total_images = count( $images ); |
| 78 | 80 | $image = reset( $images ); |
@@ -111,9 +113,12 @@ discard block |
||
| 111 | 113 | <div class="entry-summary"> |
| 112 | 114 | <?php the_excerpt(); ?> |
| 113 | 115 | </div><!-- .entry-summary --> |
| 114 | - <?php else : ?> |
|
| 116 | + <?php else { |
|
| 117 | + : ?> |
|
| 115 | 118 | <div class="entry-content"> |
| 116 | - <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> |
|
| 119 | + <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); |
|
| 120 | +} |
|
| 121 | +?> |
|
| 117 | 122 | </div><!-- .entry-content --> |
| 118 | 123 | <?php endif; ?> |
| 119 | 124 | |
@@ -127,8 +132,11 @@ discard block |
||
| 127 | 132 | |
| 128 | 133 | <?php /* How to display all other posts. */ ?> |
| 129 | 134 | |
| 130 | - <?php else : ?> |
|
| 131 | - <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
|
| 135 | + <?php else { |
|
| 136 | + : ?> |
|
| 137 | + <div id="post-<?php the_ID(); |
|
| 138 | +} |
|
| 139 | +?>" <?php post_class(); ?>> |
|
| 132 | 140 | <h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2> |
| 133 | 141 | |
| 134 | 142 | <div class="entry-meta"> |
@@ -139,9 +147,12 @@ discard block |
||
| 139 | 147 | <div class="entry-summary"> |
| 140 | 148 | <?php the_excerpt(); ?> |
| 141 | 149 | </div><!-- .entry-summary --> |
| 142 | - <?php else : ?> |
|
| 150 | + <?php else { |
|
| 151 | + : ?> |
|
| 143 | 152 | <div class="entry-content"> |
| 144 | - <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> |
|
| 153 | + <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); |
|
| 154 | +} |
|
| 155 | +?> |
|
| 145 | 156 | <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> |
| 146 | 157 | </div><!-- .entry-content --> |
| 147 | 158 | <?php endif; ?> |
@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The loop that displays posts |
|
| 4 | - * |
|
| 5 | - * The loop displays the posts and the post content. See |
|
| 6 | - * https://codex.wordpress.org/The_Loop to understand it and |
|
| 7 | - * https://codex.wordpress.org/Template_Tags to understand |
|
| 8 | - * the tags used in it. |
|
| 9 | - * |
|
| 10 | - * This can be overridden in child themes with loop.php or |
|
| 11 | - * loop-template.php, where 'template' is the loop context |
|
| 12 | - * requested by a template. For example, loop-index.php would |
|
| 13 | - * be used if it exists and we ask for the loop with: |
|
| 14 | - * <code>get_template_part( 'loop', 'index' );</code> |
|
| 15 | - * |
|
| 16 | - * @package WordPress |
|
| 17 | - * @subpackage Twenty_Ten |
|
| 18 | - * @since Twenty Ten 1.0 |
|
| 19 | - */ |
|
| 3 | + * The loop that displays posts |
|
| 4 | + * |
|
| 5 | + * The loop displays the posts and the post content. See |
|
| 6 | + * https://codex.wordpress.org/The_Loop to understand it and |
|
| 7 | + * https://codex.wordpress.org/Template_Tags to understand |
|
| 8 | + * the tags used in it. |
|
| 9 | + * |
|
| 10 | + * This can be overridden in child themes with loop.php or |
|
| 11 | + * loop-template.php, where 'template' is the loop context |
|
| 12 | + * requested by a template. For example, loop-index.php would |
|
| 13 | + * be used if it exists and we ask for the loop with: |
|
| 14 | + * <code>get_template_part( 'loop', 'index' );</code> |
|
| 15 | + * |
|
| 16 | + * @package WordPress |
|
| 17 | + * @subpackage Twenty_Ten |
|
| 18 | + * @since Twenty Ten 1.0 |
|
| 19 | + */ |
|
| 20 | 20 | ?> |
| 21 | 21 | |
| 22 | 22 | <?php /* Display navigation to next/previous pages when applicable */ ?> |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | <div id="content" role="main"> |
| 14 | 14 | |
| 15 | 15 | <div id="post-0" class="post error404 not-found"> |
| 16 | - <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> |
|
| 16 | + <h1 class="entry-title"><?php _e('Not Found', 'twentyten'); ?></h1> |
|
| 17 | 17 | <div class="entry-content"> |
| 18 | - <p><?php _e( 'Apologies, but the page you requested could not be found. Perhaps searching will help.', 'twentyten' ); ?></p> |
|
| 18 | + <p><?php _e('Apologies, but the page you requested could not be found. Perhaps searching will help.', 'twentyten'); ?></p> |
|
| 19 | 19 | <?php get_search_form(); ?> |
| 20 | 20 | </div><!-- .entry-content --> |
| 21 | 21 | </div><!-- #post-0 --> |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template for displaying 404 pages (Not Found) |
|
| 4 | - * |
|
| 5 | - * @package WordPress |
|
| 6 | - * @subpackage Twenty_Ten |
|
| 7 | - * @since Twenty Ten 1.0 |
|
| 8 | - */ |
|
| 3 | + * Template for displaying 404 pages (Not Found) |
|
| 4 | + * |
|
| 5 | + * @package WordPress |
|
| 6 | + * @subpackage Twenty_Ten |
|
| 7 | + * @since Twenty Ten 1.0 |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | get_header(); ?> |
| 11 | 11 | |
@@ -14,8 +14,8 @@ discard block |
||
| 14 | 14 | ?> |
| 15 | 15 | |
| 16 | 16 | <div id="comments"> |
| 17 | -<?php if ( post_password_required() ) : ?> |
|
| 18 | - <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p> |
|
| 17 | +<?php if (post_password_required()) : ?> |
|
| 18 | + <p class="nopassword"><?php _e('This post is password protected. Enter the password to view any comments.', 'twentyten'); ?></p> |
|
| 19 | 19 | </div><!-- #comments --> |
| 20 | 20 | <?php |
| 21 | 21 | /* |
@@ -31,16 +31,16 @@ discard block |
||
| 31 | 31 | // You can start editing here -- including this comment! |
| 32 | 32 | ?> |
| 33 | 33 | |
| 34 | -<?php if ( have_comments() ) : ?> |
|
| 34 | +<?php if (have_comments()) : ?> |
|
| 35 | 35 | <h3 id="comments-title"><?php |
| 36 | - printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ), |
|
| 37 | - number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' ); |
|
| 36 | + printf(_n('One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten'), |
|
| 37 | + number_format_i18n(get_comments_number()), '<em>'.get_the_title().'</em>'); |
|
| 38 | 38 | ?></h3> |
| 39 | 39 | |
| 40 | -<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> |
|
| 40 | +<?php if (get_comment_pages_count() > 1 && get_option('page_comments')) : // Are there comments to navigate through? ?> |
|
| 41 | 41 | <div class="navigation"> |
| 42 | - <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div> |
|
| 43 | - <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> |
|
| 42 | + <div class="nav-previous"><?php previous_comments_link(__('<span class="meta-nav">←</span> Older Comments', 'twentyten')); ?></div> |
|
| 43 | + <div class="nav-next"><?php next_comments_link(__('Newer Comments <span class="meta-nav">→</span>', 'twentyten')); ?></div> |
|
| 44 | 44 | </div> <!-- .navigation --> |
| 45 | 45 | <?php endif; // check for comment navigation ?> |
| 46 | 46 | |
@@ -53,14 +53,14 @@ discard block |
||
| 53 | 53 | * define twentyten_comment() and that will be used instead. |
| 54 | 54 | * See twentyten_comment() in twentyten/functions.php for more. |
| 55 | 55 | */ |
| 56 | - wp_list_comments( array( 'callback' => 'twentyten_comment' ) ); |
|
| 56 | + wp_list_comments(array('callback' => 'twentyten_comment')); |
|
| 57 | 57 | ?> |
| 58 | 58 | </ol> |
| 59 | 59 | |
| 60 | -<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> |
|
| 60 | +<?php if (get_comment_pages_count() > 1 && get_option('page_comments')) : // Are there comments to navigate through? ?> |
|
| 61 | 61 | <div class="navigation"> |
| 62 | - <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div> |
|
| 63 | - <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> |
|
| 62 | + <div class="nav-previous"><?php previous_comments_link(__('<span class="meta-nav">←</span> Older Comments', 'twentyten')); ?></div> |
|
| 63 | + <div class="nav-next"><?php next_comments_link(__('Newer Comments <span class="meta-nav">→</span>', 'twentyten')); ?></div> |
|
| 64 | 64 | </div><!-- .navigation --> |
| 65 | 65 | <?php endif; // check for comment navigation ?> |
| 66 | 66 | |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | * If there are no comments and comments are closed, let's leave a little note, shall we? |
| 70 | 70 | * But we only want the note on posts and pages that had comments in the first place. |
| 71 | 71 | */ |
| 72 | - if ( ! comments_open() && get_comments_number() ) : ?> |
|
| 73 | - <p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyten' ); ?></p> |
|
| 74 | - <?php endif; ?> |
|
| 72 | + if ( ! comments_open() && get_comments_number()) : ?> |
|
| 73 | + <p class="nocomments"><?php _e('Comments are closed.', 'twentyten'); ?></p> |
|
| 74 | + <?php endif; ?> |
|
| 75 | 75 | |
| 76 | 76 | <?php endif; // end have_comments() ?> |
| 77 | 77 | |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template for displaying Comments |
|
| 4 | - * |
|
| 5 | - * The area of the page that contains both current comments |
|
| 6 | - * and the comment form. The actual display of comments is |
|
| 7 | - * handled by a callback to twentyten_comment which is |
|
| 8 | - * located in the functions.php file. |
|
| 9 | - * |
|
| 10 | - * @package WordPress |
|
| 11 | - * @subpackage Twenty_Ten |
|
| 12 | - * @since Twenty Ten 1.0 |
|
| 13 | - */ |
|
| 3 | + * Template for displaying Comments |
|
| 4 | + * |
|
| 5 | + * The area of the page that contains both current comments |
|
| 6 | + * and the comment form. The actual display of comments is |
|
| 7 | + * handled by a callback to twentyten_comment which is |
|
| 8 | + * located in the functions.php file. |
|
| 9 | + * |
|
| 10 | + * @package WordPress |
|
| 11 | + * @subpackage Twenty_Ten |
|
| 12 | + * @since Twenty Ten 1.0 |
|
| 13 | + */ |
|
| 14 | 14 | ?> |
| 15 | 15 | |
| 16 | 16 | <div id="comments"> |