Skip to content
Snippets Groups Projects
Commit fe09b7ce authored by agata's avatar agata
Browse files

[auto] theme: twentyten 3.0

parent 5a8d06da
Branches master
No related tags found
No related merge requests found
Showing
with 3457 additions and 3382 deletions
......@@ -23,7 +23,7 @@ get_header(); ?>
</div><!-- #content -->
</div><!-- #container -->
<script type="text/javascript">
// focus on search field after it has loaded
// Focus on search field after it has loaded.
document.getElementById('s') && document.getElementById('s').focus();
</script>
......
......@@ -31,22 +31,27 @@ if ( have_posts() ) {
?>
<h1 class="page-title">
<?php if ( is_day() ) : ?>
<?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyten' ) ) ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyten' ) ) ); ?>
<?php else : ?>
<?php _e( 'Blog Archives', 'twentyten' ); ?>
<?php endif; ?>
<?php
if ( is_day() ) {
/* translators: %s: Date. */
printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() );
} elseif ( is_month() ) {
/* translators: %s: Date. */
printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyten' ) ) );
} elseif ( is_year() ) {
/* translators: %s: Date. */
printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyten' ) ) );
} else {
_e( 'Blog Archives', 'twentyten' );
}
?>
</h1>
<?php
/*
* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
* Since we called the_post() above, we need
* to rewind the loop back to the beginning.
* That way we can run the loop properly, in full.
*/
rewind_posts();
......
......@@ -26,7 +26,12 @@ if ( have_posts() ) {
}
?>
<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>
<h1 class="page-title author">
<?php
/* translators: %s: Author display name. */
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>
<?php
// If a user has filled out their description, show a bio on their entries.
......@@ -42,11 +47,17 @@ if ( get_the_author_meta( 'description' ) ) :
*
* @param int The height and width avatar dimensions in pixels. Default 60.
*/
echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) );
$author_bio_avatar_size = apply_filters( 'twentyten_author_bio_avatar_size', 60 );
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
<h2>
<?php
/* translators: %s: Author display name. */
printf( __( 'About %s', 'twentyten' ), get_the_author() );
?>
</h2>
<?php the_author_meta( 'description' ); ?>
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
......@@ -54,9 +65,9 @@ if ( get_the_author_meta( 'description' ) ) :
<?php
/*
* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
* Since we called the_post() above, we need
* to rewind the loop back to the beginning.
* That way we can run the loop properly, in full.
*/
rewind_posts();
......
......@@ -55,7 +55,7 @@ p.has-drop-cap:not(:focus)::first-letter {
}
.wp-block-image figcaption {
margin: -7px 0 20px;;
margin: -7px 0 20px;
padding: 9px 9px 1.0em;
text-align: center;
}
......
......@@ -14,6 +14,7 @@ get_header(); ?>
<h1 class="page-title">
<?php
/* translators: %s: Category title. */
printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?>
</h1>
......
......@@ -41,8 +41,8 @@
'<em>' . get_the_title() . '</em>'
);
} else {
/* translators: %1$s: The number of comments. %2$s: The post title. */
printf(
/* translators: %1$s: The number of comments. %2$s: The post title. */
_n( '%1$s Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
number_format_i18n( get_comments_number() ),
'<em>' . get_the_title() . '</em>'
......@@ -56,7 +56,7 @@
<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
</div> <!-- .navigation -->
<?php endif; // check for comment navigation ?>
<?php endif; // Check for comment navigation. ?>
<ol class="commentlist">
<?php
......@@ -76,7 +76,7 @@
<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
</div><!-- .navigation -->
<?php endif; // check for comment navigation ?>
<?php endif; // Check for comment navigation. ?>
<?php
/*
......@@ -88,7 +88,7 @@
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
<?php endif; ?>
<?php endif; // end have_comments() ?>
<?php endif; // End have_comments(). ?>
<?php comment_form(); ?>
......
......@@ -44,7 +44,10 @@
do_action( 'twentyten_credits' );
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyten' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>">
<?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?>
<?php
/* translators: %s: WordPress */
printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' );
?>
</a>
</div><!-- #site-generator -->
......
......@@ -14,7 +14,7 @@
* functions.php file. The child theme's functions.php file is included before
* the parent theme's file, so the child theme functions would be used.
*
* @link https://codex.wordpress.org/Theme_Development
* @link https://developer.wordpress.org/themes/basics/theme-functions/
* @link https://developer.wordpress.org/themes/advanced-topics/child-themes/
*
* Functions that are not pluggable (not wrapped in function_exists()) are instead attached
......@@ -27,13 +27,13 @@
* <code>
* add_action( 'after_setup_theme', 'my_child_theme_setup' );
* function my_child_theme_setup() {
* // We are providing our own filter for excerpt_length (or using the unfiltered value)
* // We are providing our own filter for excerpt_length (or using the unfiltered value).
* remove_filter( 'excerpt_length', 'twentyten_excerpt_length' );
* ...
* }
* </code>
*
* For more information on hooks, actions, and filters, see https://codex.wordpress.org/Plugin_API.
* For more information on hooks, actions, and filters, see https://developer.wordpress.org/plugins/.
*
* @package WordPress
* @subpackage Twenty_Ten
......@@ -119,15 +119,15 @@ if ( ! function_exists( 'twentyten_setup' ) ) :
// Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories.
add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );
// This theme uses post thumbnails
// This theme uses post thumbnails.
add_theme_support( 'post-thumbnails' );
// Add default posts and comments RSS feed links to head
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory
* Translations can be filed in the /languages/ directory.
*/
load_theme_textdomain( 'twentyten', get_template_directory() . '/languages' );
......@@ -208,49 +208,49 @@ if ( ! function_exists( 'twentyten_setup' ) ) :
'berries' => array(
'url' => '%s/images/headers/berries.jpg',
'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg',
/* translators: header image description */
/* translators: Header image description. */
'description' => __( 'Berries', 'twentyten' ),
),
'cherryblossom' => array(
'url' => '%s/images/headers/cherryblossoms.jpg',
'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg',
/* translators: header image description */
/* translators: Header image description. */
'description' => __( 'Cherry Blossoms', 'twentyten' ),
),
'concave' => array(
'url' => '%s/images/headers/concave.jpg',
'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg',
/* translators: header image description */
/* translators: Header image description. */
'description' => __( 'Concave', 'twentyten' ),
),
'fern' => array(
'url' => '%s/images/headers/fern.jpg',
'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg',
/* translators: header image description */
/* translators: Header image description. */
'description' => __( 'Fern', 'twentyten' ),
),
'forestfloor' => array(
'url' => '%s/images/headers/forestfloor.jpg',
'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg',
/* translators: header image description */
/* translators: Header image description. */
'description' => __( 'Forest Floor', 'twentyten' ),
),
'inkwell' => array(
'url' => '%s/images/headers/inkwell.jpg',
'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg',
/* translators: header image description */
/* translators: Header image description. */
'description' => __( 'Inkwell', 'twentyten' ),
),
'path' => array(
'url' => '%s/images/headers/path.jpg',
'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg',
/* translators: header image description */
/* translators: Header image description. */
'description' => __( 'Path', 'twentyten' ),
),
'sunset' => array(
'url' => '%s/images/headers/sunset.jpg',
'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg',
/* translators: header image description */
/* translators: Header image description. */
'description' => __( 'Sunset', 'twentyten' ),
),
)
......@@ -394,7 +394,7 @@ add_filter( 'use_default_gallery_style', '__return_false' );
function twentyten_remove_gallery_css( $css ) {
return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
}
// Backwards compatibility with WordPress 3.0.
// Backward compatibility with WordPress 3.0.
if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) {
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
}
......@@ -423,16 +423,29 @@ if ( ! function_exists( 'twentyten_comment' ) ) :
<div id="comment-<?php comment_ID(); ?>">
<div class="comment-author vcard">
<?php echo get_avatar( $comment, 40 ); ?>
<?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
<?php
/* translators: %s: Author display name. */
printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) );
?>
</div><!-- .comment-author .vcard -->
<?php if ( $comment->comment_approved == '0' ) : ?>
<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
<?php
$commenter = wp_get_current_commenter();
if ( $commenter['comment_author_email'] ) {
$moderation_note = __( 'Your comment is awaiting moderation.', 'twentyten' );
} else {
$moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.', 'twentyten' );
}
?>
<?php if ( '0' == $comment->comment_approved ) : ?>
<em class="comment-awaiting-moderation"><?php echo $moderation_note; ?></em>
<br />
<?php endif; ?>
<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
<?php
/* translators: 1: date, 2: time */
/* translators: 1: Date, 2: Time. */
printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() );
?>
</a>
......@@ -588,6 +601,7 @@ if ( ! function_exists( 'twentyten_posted_on' ) ) :
*/
function twentyten_posted_on() {
printf(
/* translators: 1: CSS classes, 2: Date, 3: Author display name. */
__( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
'meta-prep meta-prep-author',
sprintf(
......@@ -599,6 +613,7 @@ if ( ! function_exists( 'twentyten_posted_on' ) ) :
sprintf(
'<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
get_author_posts_url( get_the_author_meta( 'ID' ) ),
/* translators: %s: Author display name. */
esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
get_the_author()
)
......@@ -616,10 +631,13 @@ if ( ! function_exists( 'twentyten_posted_in' ) ) :
// Retrieves tag list of current post, separated by commas.
$tag_list = get_the_tag_list( '', ', ' );
if ( $tag_list && ! is_wp_error( $tag_list ) ) {
/* translators: 1: Category name, 2: Tag name, 3: Post permalink, 4: Post title. */
$posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
/* translators: 1: Category name, 3: Post permalink, 4: Post title. */
$posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
} else {
/* translators: 3: Post permalink, 4: Post title. */
$posted_in = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
}
// Prints the string, replacing the placeholders.
......@@ -703,7 +721,7 @@ add_filter( 'widget_tag_cloud_args', 'twentyten_widget_tag_cloud_args' );
*/
function twentyten_scripts_styles() {
// Theme block stylesheet.
wp_enqueue_style( 'twentyten-block-style', get_template_directory_uri() . '/blocks.css', array(), '20181018' );
wp_enqueue_style( 'twentyten-block-style', get_template_directory_uri() . '/blocks.css', array(), '20181218' );
}
add_action( 'wp_enqueue_scripts', 'twentyten_scripts_styles' );
......@@ -714,7 +732,7 @@ add_action( 'wp_enqueue_scripts', 'twentyten_scripts_styles' );
*/
function twentyten_block_editor_styles() {
// Block styles.
wp_enqueue_style( 'twentyten-block-editor-style', get_template_directory_uri() . '/editor-blocks.css' );
wp_enqueue_style( 'twentyten-block-editor-style', get_template_directory_uri() . '/editor-blocks.css', array(), '20181218' );
}
add_action( 'enqueue_block_editor_assets', 'twentyten_block_editor_styles' );
......@@ -722,7 +740,7 @@ if ( ! function_exists( 'wp_body_open' ) ) :
/**
* Fire the wp_body_open action.
*
* Added for backwards compatibility to support pre 5.2.0 WordPress versions.
* Added for backward compatibility to support pre-5.2.0 WordPress versions.
*
* @since Twenty Ten 2.9
*/
......
......@@ -32,13 +32,14 @@ if ( $site_description && ( is_home() || is_front_page() ) ) {
// Add a page number if necessary:
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
/* translators: %s: Page number. */
echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ) );
}
?>
</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>?ver=20190507" />
<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
<?php
/*
......@@ -85,14 +86,14 @@ if ( is_singular() && get_option( 'thread_comments' ) ) {
$header_image_width = HEADER_IMAGE_WIDTH;
}
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image[1] >= $header_image_width ) :
// Check if this is a post or page, if it has a thumbnail, and if it's a big one.
if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) );
if ( $image && $image[1] >= $header_image_width ) {
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID );
elseif ( get_header_image() ) :
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
}
} else {
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
$header_image_width = get_custom_header()->width;
......@@ -103,14 +104,20 @@ if ( is_singular() && get_option( 'thread_comments' ) ) {
}
?>
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="" />
<?php endif; ?>
<?php
} // End check for featured image or standard header.
?>
</div><!-- #branding -->
<div id="access" role="navigation">
<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
<?php // Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. ?>
<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
<?php
/*
* Our navigation menu. If one isn't filled out, wp_nav_menu() falls back to wp_page_menu().
* The menu assigned to the primary location is the one used.
* If one isn't assigned, the menu with the lowest ID is used.
*/
wp_nav_menu(
array(
'container_class' => 'menu-header',
......
......@@ -3,8 +3,8 @@
* The loop that displays an attachment
*
* The loop displays the posts and the post content. See
* https://codex.wordpress.org/The_Loop to understand it and
* https://codex.wordpress.org/Template_Tags to understand
* https://developer.wordpress.org/themes/basics/the-loop/ to understand it and
* https://developer.wordpress.org/themes/basics/template-tags/ to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-attachment.php.
......@@ -21,10 +21,14 @@ if ( have_posts() ) {
the_post();
?>
<?php if ( ! empty( $post->post_parent ) ) : ?>
<p class="page-title"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'Return to %s', 'twentyten' ), strip_tags( get_the_title( $post->post_parent ) ) ) ); ?>" rel="gallery">
<?php
/* translators: %s - title of parent post */
if ( ! empty( $post->post_parent ) ) :
/* translators: %s: Post title. */
$post_tile = sprintf( __( 'Return to %s', 'twentyten' ), strip_tags( get_the_title( $post->post_parent ) ) );
?>
<p class="page-title"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>" rel="gallery">
<?php
/* translators: %s: Title of parent post. */
printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
?>
</a></p>
......@@ -36,11 +40,13 @@ if ( have_posts() ) {
<div class="entry-meta">
<?php
printf(
/* translators: %s: Author display name. */
__( '<span class="%1$s">By</span> %2$s', 'twentyten' ),
'meta-prep meta-prep-author',
sprintf(
'<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
get_author_posts_url( get_the_author_meta( 'ID' ) ),
/* translators: %s: Author display name. */
esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
get_the_author()
)
......@@ -49,6 +55,7 @@ if ( have_posts() ) {
<span class="meta-sep">|</span>
<?php
printf(
/* translators: 1: CSS classes, 2: Date. */
__( '<span class="%1$s">Published</span> %2$s', 'twentyten' ),
'meta-prep meta-prep-entry-date',
sprintf(
......@@ -61,6 +68,7 @@ if ( have_posts() ) {
echo ' <span class="meta-sep">|</span> ';
$metadata = wp_get_attachment_metadata();
printf(
/* translators: %s: Image dimensions. */
__( 'Full size is %s pixels', 'twentyten' ),
sprintf(
'<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
......@@ -97,17 +105,18 @@ if ( have_posts() ) {
}
}
// If there is more than 1 image attachment in a gallery
// If there is more than 1 image attachment in a gallery...
if ( count( $attachments ) > 1 ) {
$k++;
if ( isset( $attachments[ $k ] ) ) {
// get the URL of the next image attachment
// ...get the URL of the next image attachment.
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
} else { // or get the URL of the first image attachment
} else {
// ...or get the URL of the first image attachment.
$next_attachment_url = get_attachment_link( $attachments[0]->ID );
}
} else {
// or, if there's only 1 image attachment, get the URL of the image
// Or, if there's only 1 image attachment, get the URL of the image.
$next_attachment_url = wp_get_attachment_url();
}
?>
......@@ -129,7 +138,8 @@ if ( have_posts() ) {
* @param int The default attachment height in pixels. Default 900.
*/
$attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
// Filterable image width with, essentially, no limit for image height.
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) );
?>
</a></p>
......@@ -169,4 +179,4 @@ if ( have_posts() ) {
<?php comments_template(); ?>
<?php endwhile;
}; // end of the loop. ?>
}; // End of the loop. ?>
......@@ -3,8 +3,8 @@
* The loop that displays a page
*
* The loop displays the posts and the post content. See
* https://codex.wordpress.org/The_Loop to understand it and
* https://codex.wordpress.org/Template_Tags to understand
* https://developer.wordpress.org/themes/basics/the-loop/ to understand it and
* https://developer.wordpress.org/themes/basics/template-tags/ to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-page.php.
......@@ -45,4 +45,4 @@ if ( have_posts() ) {
<?php comments_template( '', true ); ?>
<?php endwhile;
}; // end of the loop. ?>
}; // End of the loop. ?>
......@@ -3,8 +3,8 @@
* The loop that displays a single post
*
* The loop displays the posts and the post content. See
* https://codex.wordpress.org/The_Loop to understand it and
* https://codex.wordpress.org/Template_Tags to understand
* https://developer.wordpress.org/themes/basics/the-loop/ to understand it and
* https://developer.wordpress.org/themes/basics/template-tags/ to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-single.php.
......@@ -45,20 +45,29 @@ if ( have_posts() ) {
?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries. ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php
/** This filter is documented in author.php */
echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) );
$author_bio_avatar_size = apply_filters( 'twentyten_author_bio_avatar_size', 60 );
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
<h2>
<?php
/* translators: %s: Author display name. */
printf( __( 'About %s', 'twentyten' ), get_the_author() );
?>
</h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
<?php
/* translators: %s: Author display name. */
printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() );
?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
......@@ -79,4 +88,4 @@ if ( have_posts() ) {
<?php comments_template( '', true ); ?>
<?php endwhile;
}; // end of the loop. ?>
}; // End of the loop. ?>
......@@ -3,8 +3,8 @@
* The loop that displays posts
*
* The loop displays the posts and the post content. See
* https://codex.wordpress.org/The_Loop to understand it and
* https://codex.wordpress.org/Template_Tags to understand
* https://developer.wordpress.org/themes/basics/the-loop/ to understand it and
* https://developer.wordpress.org/themes/basics/template-tags/ to understand
* the tags used in it.
*
* This can be overridden in child themes with loop.php or
......@@ -19,7 +19,7 @@
*/
?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php // Display navigation to next/previous pages when applicable. ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
......@@ -86,22 +86,27 @@ while ( have_posts() ) :
<p><em>
<?php
printf(
/* translators: 1: HTML tag attributes, 2: Image count. */
_n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ),
/* translators: %s: Post title. */
'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"',
number_format_i18n( $total_images )
);
?>
</em></p>
<?php endif; // end twentyten_get_gallery_images() check ?>
<?php endif; // End twentyten_get_gallery_images() check. ?>
<?php the_excerpt(); ?>
<?php endif; ?>
</div><!-- .entry-content -->
<div class="entry-utility">
<?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
<?php
$gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' );
if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) :
?>
<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>
<span class="meta-sep">|</span>
<?php elseif ( $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ) && in_category( $gallery->term_id ) ) : ?>
<?php elseif ( $gallery && in_category( $gallery->term_id ) ) : ?>
<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>
<span class="meta-sep">|</span>
<?php endif; ?>
......@@ -164,7 +169,10 @@ while ( have_posts() ) :
<div class="entry-utility">
<?php if ( count( get_the_category() ) ) : ?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
<?php
/* translators: 1: CSS classes, 2: Category list. */
printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) );
?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
......@@ -173,7 +181,10 @@ while ( have_posts() ) :
if ( $tags_list ) :
?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
<?php
/* translators: 1: CSS classes, 2: Category list. */
printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
......@@ -186,9 +197,9 @@ while ( have_posts() ) :
<?php endif; // This was the if statement that broke the loop into three parts based on categories. ?>
<?php endwhile; // End the loop. Whew. ?>
<?php endwhile; // End of the loop. Whew. ?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php // Display navigation to next/previous pages when applicable. ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment