Remove extra get_option() calls (the functions default to that), Use the Media API for attachment image HTML, Replace deprecated function use(1.2~2.9 deprecated). See #9015
git-svn-id: http://svn.automattic.com/wordpress/trunk@13109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e70189bba5
commit
cba1eb5db4
|
@ -6,7 +6,7 @@
|
|||
<?php the_post(); ?>
|
||||
|
||||
<?php if ( is_day() ) : ?>
|
||||
<h1 class="page-title"><?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_time(get_option('date_format')) ) ?></h1>
|
||||
<h1 class="page-title"><?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_time() ) ?></h1>
|
||||
<?php elseif ( is_month() ) : ?>
|
||||
<h1 class="page-title"><?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_time('F Y') ) ?></h1>
|
||||
<?php elseif ( is_year() ) : ?>
|
||||
|
@ -32,7 +32,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 echo esc_attr( get_the_time('Y-m-d\TH:i:sO') ); ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
|
||||
the_permalink(); ?>" title="<?php echo esc_attr( get_the_time('Y-m-d\TH:i:sO') ); ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
|
||||
<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( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
|
|
@ -15,15 +15,16 @@
|
|||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
|
||||
<span class="meta-sep"> | </span>
|
||||
<span class="meta-prep meta-prep-entry-date"><?php _e('Published ', 'twentyten'); ?></span>
|
||||
<span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_time( get_option( 'date_format' ) ); ?></abbr></span>
|
||||
<span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_time(); ?></abbr></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ) ?>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-content">
|
||||
<div class="entry-attachment">
|
||||
<?php if ( wp_attachment_is_image( $post->ID ) ) : $att_image = wp_get_attachment_image_src( $post->ID, array(640, 640)); ?>
|
||||
<p class="attachment"><a href="<?php echo wp_get_attachment_url($post->ID); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><img src="<?php echo $att_image[0];?>" width="<?php echo $att_image[1];?>" height="<?php echo $att_image[2];?>" class="attachment-medium" alt="<?php $post->post_excerpt; ?>" /></a>
|
||||
</p>
|
||||
<?php if ( wp_attachment_is_image( $post->ID ) ) : ?>
|
||||
<p class="attachment"><a href="<?php echo wp_get_attachment_url($post->ID); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
|
||||
echo wp_get_attachment_image( $post->ID, array($content_width, $content_width) ); // max $content_width wide or high.
|
||||
?></a></p>
|
||||
|
||||
|
||||
<div id="nav-below" class="navigation">
|
||||
|
@ -31,7 +32,7 @@
|
|||
<div class="nav-next"><?php next_image_link( false ); ?></div>
|
||||
</div><!-- #nav-below -->
|
||||
<?php else : ?>
|
||||
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" title="<?php echo esc_attr( get_the_title($post->ID) ); ?>" rel="attachment"><?php echo basename($post->guid) ?></a>
|
||||
<a href="<?php echo wp_get_attachment_url($post->ID) ?>" title="<?php echo esc_attr( get_the_title($post->ID) ); ?>" rel="attachment"><?php echo basename(get_permalink()) ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="entry-caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt() ?></div>
|
||||
|
|
|
@ -36,7 +36,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('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
|
||||
the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-summary">
|
||||
|
|
|
@ -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('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
|
||||
the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
|
||||
<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( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
<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('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
|
||||
the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
|
||||
<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( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-content">
|
||||
<div class="gallery-thumb"><a class="size-thumbnail" href="<?php permalink_link() ?>"><?php
|
||||
<div class="gallery-thumb"><a class="size-thumbnail" href="<?php the_permalink() ?>"><?php
|
||||
$images =& get_children( array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999) );
|
||||
$total_images = count($images);
|
||||
$image = array_shift($images);
|
||||
|
@ -60,7 +60,7 @@ the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><
|
|||
<div class="entry-utility">
|
||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||
<a href="<?php
|
||||
the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
|
||||
the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
|
||||
<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( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
|
||||
<span class="meta-sep"> | </span>
|
||||
|
|
|
@ -23,7 +23,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('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
|
||||
the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
|
||||
<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( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
|
||||
<span class="meta-sep"> <?php _e('on ', 'twentyten'); ?> </span>
|
||||
<a href="<?php
|
||||
the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
|
||||
the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ) ?>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
|
|
|
@ -23,7 +23,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('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
|
||||
<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( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
|
Loading…
Reference in New Issue