Twenty Ten spacing and string cleanups. props zeo, markmcwilliams. see #13198. Add a twentyten_credits filter, props nathanrice, fixes #12804. Also clean up the generator/credits string.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
86c5154557
commit
3e035809a1
|
@ -96,7 +96,7 @@
|
|||
<?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?>
|
||||
<?php _e( 'Both comments and trackbacks are currently closed.', 'twentyten' ); ?>
|
||||
<?php endif; ?>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
|
||||
</div><!-- .entry-utility -->
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<?php if ( have_comments() ) : ?>
|
||||
<h3 id="comments-title">
|
||||
<?php
|
||||
printf( _n('One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten'),
|
||||
printf( _n( 'One 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>' );
|
||||
?>
|
||||
</h3>
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
</div>
|
||||
|
||||
<div id="site-generator">
|
||||
<?php printf( __( 'Proudly powered by <span id="generator-link">%s</span>.', 'twentyten' ), '<a href="http://wordpress.org/" title="' . esc_attr__( 'Semantic Personal Publishing Platform', 'twentyten' ) . '" rel="generator">' . __( 'WordPress', 'twentyten' ) . '</a>' ); ?>
|
||||
<?php do_action('twentyten_credits' ); ?>
|
||||
<a href="http://wordpress.org/" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?></a>
|
||||
</div>
|
||||
|
||||
</div><!-- #colophon -->
|
||||
|
|
|
@ -227,7 +227,7 @@ add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
|
|||
* @return string A pretty 'Continue reading' link.
|
||||
*/
|
||||
function twentyten_excerpt_more( $more ) {
|
||||
return ' … <a href="'. get_permalink() . '">' . __('Continue reading <span class="meta-nav">→</span>', 'twentyten') . '</a>';
|
||||
return ' … <a href="'. get_permalink() . '">' . __('Continue reading <span class="meta-nav">→</span>', 'twentyten') . '</a>';
|
||||
}
|
||||
add_filter( 'excerpt_more', 'twentyten_excerpt_more' );
|
||||
|
||||
|
@ -268,7 +268,7 @@ function twentyten_comment( $comment, $args, $depth ) {
|
|||
<br />
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ),' ','' ); ?></div>
|
||||
<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></div>
|
||||
|
||||
<div class="comment-body"><?php comment_text(); ?></div>
|
||||
|
||||
|
@ -279,7 +279,7 @@ function twentyten_comment( $comment, $args, $depth ) {
|
|||
|
||||
<?php else : ?>
|
||||
<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 endif;
|
||||
}
|
||||
endif;
|
||||
|
@ -294,9 +294,9 @@ endif;
|
|||
function twentyten_widgets_init() {
|
||||
// Area 1
|
||||
register_sidebar( array (
|
||||
'name' => __( 'Primary Widget Area' , 'twentyten' ),
|
||||
'name' => __( 'Primary Widget Area', 'twentyten' ),
|
||||
'id' => 'primary-widget-area',
|
||||
'description' => __( 'The primary widget area' , 'twentyten' ),
|
||||
'description' => __( 'The primary widget area', 'twentyten' ),
|
||||
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
|
||||
'after_widget' => "</li>",
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
|
@ -305,9 +305,9 @@ function twentyten_widgets_init() {
|
|||
|
||||
// Area 2
|
||||
register_sidebar( array (
|
||||
'name' => __( 'Secondary Widget Area' , 'twentyten' ),
|
||||
'name' => __( 'Secondary Widget Area', 'twentyten' ),
|
||||
'id' => 'secondary-widget-area',
|
||||
'description' => __( 'The secondary widget area' , 'twentyten' ),
|
||||
'description' => __( 'The secondary widget area', 'twentyten' ),
|
||||
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
|
||||
'after_widget' => "</li>",
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
|
@ -316,9 +316,9 @@ function twentyten_widgets_init() {
|
|||
|
||||
// Area 3
|
||||
register_sidebar( array (
|
||||
'name' => __( 'First Footer Widget Area' , 'twentyten' ),
|
||||
'name' => __( 'First Footer Widget Area', 'twentyten' ),
|
||||
'id' => 'first-footer-widget-area',
|
||||
'description' => __( 'The first footer widget area' , 'twentyten' ),
|
||||
'description' => __( 'The first footer widget area', 'twentyten' ),
|
||||
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
|
||||
'after_widget' => "</li>",
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
|
@ -327,9 +327,9 @@ function twentyten_widgets_init() {
|
|||
|
||||
// Area 4
|
||||
register_sidebar( array (
|
||||
'name' => __( 'Second Footer Widget Area' , 'twentyten' ),
|
||||
'name' => __( 'Second Footer Widget Area', 'twentyten' ),
|
||||
'id' => 'second-footer-widget-area',
|
||||
'description' => __( 'The second footer widget area' , 'twentyten' ),
|
||||
'description' => __( 'The second footer widget area', 'twentyten' ),
|
||||
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
|
||||
'after_widget' => "</li>",
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
|
@ -338,9 +338,9 @@ function twentyten_widgets_init() {
|
|||
|
||||
// Area 5
|
||||
register_sidebar( array (
|
||||
'name' => __( 'Third Footer Widget Area' , 'twentyten' ),
|
||||
'name' => __( 'Third Footer Widget Area', 'twentyten' ),
|
||||
'id' => 'third-footer-widget-area',
|
||||
'description' => __( 'The third footer widget area' , 'twentyten' ),
|
||||
'description' => __( 'The third footer widget area', 'twentyten' ),
|
||||
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
|
||||
'after_widget' => "</li>",
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
|
@ -349,9 +349,9 @@ function twentyten_widgets_init() {
|
|||
|
||||
// Area 6
|
||||
register_sidebar( array (
|
||||
'name' => __( 'Fourth Footer Widget Area' , 'twentyten' ),
|
||||
'name' => __( 'Fourth Footer Widget Area', 'twentyten' ),
|
||||
'id' => 'fourth-footer-widget-area',
|
||||
'description' => __( 'The fourth footer widget area' , 'twentyten' ),
|
||||
'description' => __( 'The fourth footer widget area', 'twentyten' ),
|
||||
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
|
||||
'after_widget' => "</li>",
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
|
@ -375,17 +375,15 @@ add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );
|
|||
function twentyten_get_next_attachment_url() {
|
||||
global $post;
|
||||
$post = get_post($post);
|
||||
$attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ));
|
||||
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
|
||||
|
||||
foreach ( $attachments as $k => $attachment )
|
||||
foreach ( $attachments as $k => $attachment ) {
|
||||
if ( $attachment->ID == $post->ID )
|
||||
break;
|
||||
|
||||
$k = $k + 1;
|
||||
|
||||
if ( isset($attachments[$k]) ) {
|
||||
return get_attachment_link($attachments[$k]->ID);
|
||||
} else {
|
||||
return get_permalink($post->post_parent);
|
||||
}
|
||||
$k++;
|
||||
if ( isset( $attachments[ $k ] ) )
|
||||
return get_attachment_link( $attachments[ $k ]->ID );
|
||||
else
|
||||
return get_permalink( $post->post_parent );
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* The main template file
|
||||
*
|
||||
|
@ -13,7 +12,6 @@
|
|||
* @subpackage Twenty Ten
|
||||
* @since 3.0.0
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php get_header(); ?>
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
@ -136,7 +136,7 @@
|
|||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?> </span>
|
||||
<span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?></span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
|
|
Loading…
Reference in New Issue