Twenty Ten code cleanups. props lancewillett, fixes #15476.
git-svn-id: https://develop.svn.wordpress.org/trunk@16480 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f86af64e5f
commit
c5665d8ed2
|
@ -32,9 +32,9 @@ get_header(); ?>
|
||||||
<?php if ( is_day() ) : ?>
|
<?php if ( is_day() ) : ?>
|
||||||
<?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?>
|
<?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?>
|
||||||
<?php elseif ( is_month() ) : ?>
|
<?php elseif ( is_month() ) : ?>
|
||||||
<?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date('F Y') ); ?>
|
<?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date( 'F Y' ) ); ?>
|
||||||
<?php elseif ( is_year() ) : ?>
|
<?php elseif ( is_year() ) : ?>
|
||||||
<?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y') ); ?>
|
<?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date( 'Y' ) ); ?>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<?php _e( 'Blog Archives', 'twentyten' ); ?>
|
<?php _e( 'Blog Archives', 'twentyten' ); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -23,17 +23,14 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="site-info">
|
<div id="site-info">
|
||||||
<a href="<?php echo home_url( '/' ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
|
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
|
||||||
<?php bloginfo( 'name' ); ?>
|
<?php bloginfo( 'name' ); ?>
|
||||||
</a>
|
</a>
|
||||||
</div><!-- #site-info -->
|
</div><!-- #site-info -->
|
||||||
|
|
||||||
<div id="site-generator">
|
<div id="site-generator">
|
||||||
<?php do_action( 'twentyten_credits' ); ?>
|
<?php do_action( 'twentyten_credits' ); ?>
|
||||||
<a href="<?php echo esc_url( __('http://wordpress.org/', 'twentyten') ); ?>"
|
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyten' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?></a>
|
||||||
title="<?php esc_attr_e('Semantic Personal Publishing Platform', 'twentyten'); ?>" rel="generator">
|
|
||||||
<?php printf( __('Proudly powered by %s.', 'twentyten'), 'WordPress' ); ?>
|
|
||||||
</a>
|
|
||||||
</div><!-- #site-generator -->
|
</div><!-- #site-generator -->
|
||||||
|
|
||||||
</div><!-- #colophon -->
|
</div><!-- #colophon -->
|
||||||
|
|
|
@ -335,7 +335,7 @@ function twentyten_comment( $comment, $args, $depth ) {
|
||||||
case 'trackback' :
|
case 'trackback' :
|
||||||
?>
|
?>
|
||||||
<li class="post pingback">
|
<li class="post pingback">
|
||||||
<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'twentyten'), ' ' ); ?></p>
|
<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
endswitch;
|
endswitch;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<?php
|
<?php
|
||||||
printf(__('<span class="%1$s">By</span> %2$s', 'twentyten'),
|
printf( __( '<span class="%1$s">By</span> %2$s', 'twentyten' ),
|
||||||
'meta-prep meta-prep-author',
|
'meta-prep meta-prep-author',
|
||||||
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
|
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' ) ),
|
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
?>
|
?>
|
||||||
<span class="meta-sep">|</span>
|
<span class="meta-sep">|</span>
|
||||||
<?php
|
<?php
|
||||||
printf( __('<span class="%1$s">Published</span> %2$s', 'twentyten'),
|
printf( __( '<span class="%1$s">Published</span> %2$s', 'twentyten' ),
|
||||||
'meta-prep meta-prep-entry-date',
|
'meta-prep meta-prep-entry-date',
|
||||||
sprintf( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>',
|
sprintf( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>',
|
||||||
esc_attr( get_the_time() ),
|
esc_attr( get_the_time() ),
|
||||||
|
@ -50,10 +50,10 @@
|
||||||
if ( wp_attachment_is_image() ) {
|
if ( wp_attachment_is_image() ) {
|
||||||
echo ' <span class="meta-sep">|</span> ';
|
echo ' <span class="meta-sep">|</span> ';
|
||||||
$metadata = wp_get_attachment_metadata();
|
$metadata = wp_get_attachment_metadata();
|
||||||
printf( __( 'Full size is %s pixels', 'twentyten'),
|
printf( __( 'Full size is %s pixels', 'twentyten' ),
|
||||||
sprintf( '<a href="%1$s" title="%2$s">%3$s × %4$s</a>',
|
sprintf( '<a href="%1$s" title="%2$s">%3$s × %4$s</a>',
|
||||||
wp_get_attachment_url(),
|
wp_get_attachment_url(),
|
||||||
esc_attr( __('Link to full-size image', 'twentyten') ),
|
esc_attr( __( 'Link to full-size image', 'twentyten' ) ),
|
||||||
$metadata['width'],
|
$metadata['width'],
|
||||||
$metadata['height']
|
$metadata['height']
|
||||||
)
|
)
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
<?php /* How to display posts in the Gallery category. */ ?>
|
<?php /* How to display posts in the Gallery category. */ ?>
|
||||||
|
|
||||||
<?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) || 'gallery' == get_post_format( $post->ID ) ) : ?>
|
<?php if ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) || 'gallery' == get_post_format( $post->ID ) ) : ?>
|
||||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<div class="entry-utility">
|
<div class="entry-utility">
|
||||||
<a href="<?php echo get_term_link( _x('gallery', 'gallery category slug', 'twentyten'), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
|
<a href="<?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
|
||||||
<span class="meta-sep">|</span>
|
<span class="meta-sep">|</span>
|
||||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
|
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
|
|
||||||
<?php /* How to display posts in the asides category */ ?>
|
<?php /* How to display posts in the asides category */ ?>
|
||||||
|
|
||||||
<?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) || 'aside' == get_post_format( $post->ID ) ) : ?>
|
<?php elseif ( in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) || 'aside' == get_post_format( $post->ID ) ) : ?>
|
||||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
|
|
||||||
<?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
|
<?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
|
||||||
|
|
|
@ -94,7 +94,7 @@ input[type=submit] {
|
||||||
-------------------------------------------------------------- */
|
-------------------------------------------------------------- */
|
||||||
|
|
||||||
/* Text elements */
|
/* Text elements */
|
||||||
ul {
|
ul, ol {
|
||||||
margin: 0 1.5em 18px 0;
|
margin: 0 1.5em 18px 0;
|
||||||
}
|
}
|
||||||
blockquote {
|
blockquote {
|
||||||
|
|
Loading…
Reference in New Issue