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: https://develop.svn.wordpress.org/trunk@13109 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
91bfbda120
commit
04a1493757
|
@ -6,7 +6,7 @@
|
||||||
<?php the_post(); ?>
|
<?php the_post(); ?>
|
||||||
|
|
||||||
<?php if ( is_day() ) : ?>
|
<?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() ) : ?>
|
<?php elseif ( is_month() ) : ?>
|
||||||
<h1 class="page-title"><?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_time('F Y') ) ?></h1>
|
<h1 class="page-title"><?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_time('F Y') ) ?></h1>
|
||||||
<?php elseif ( is_year() ) : ?>
|
<?php elseif ( is_year() ) : ?>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||||
<a href="<?php
|
<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="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="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><!-- .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="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-sep"> | </span>
|
||||||
<span class="meta-prep meta-prep-entry-date"><?php _e('Published ', 'twentyten'); ?></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" ) ?>
|
<?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><!-- .entry-meta -->
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
<div class="entry-attachment">
|
<div class="entry-attachment">
|
||||||
<?php if ( wp_attachment_is_image( $post->ID ) ) : $att_image = wp_get_attachment_image_src( $post->ID, array(640, 640)); ?>
|
<?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"><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 class="attachment"><a href="<?php echo wp_get_attachment_url($post->ID); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
|
||||||
</p>
|
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">
|
<div id="nav-below" class="navigation">
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
<div class="nav-next"><?php next_image_link( false ); ?></div>
|
<div class="nav-next"><?php next_image_link( false ); ?></div>
|
||||||
</div><!-- #nav-below -->
|
</div><!-- #nav-below -->
|
||||||
<?php else : ?>
|
<?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; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="entry-caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt() ?></div>
|
<div class="entry-caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt() ?></div>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||||
<a href="<?php
|
<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><!-- .entry-meta -->
|
||||||
|
|
||||||
<div class="entry-summary">
|
<div class="entry-summary">
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||||
<a href="<?php
|
<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="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="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><!-- .entry-meta -->
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||||
<a href="<?php
|
<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="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="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><!-- .entry-meta -->
|
||||||
|
|
||||||
<div class="entry-content">
|
<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) );
|
$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);
|
$total_images = count($images);
|
||||||
$image = array_shift($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">
|
<div class="entry-utility">
|
||||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||||
<a href="<?php
|
<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="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="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-sep"> | </span>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||||
<a href="<?php
|
<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="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="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><!-- .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="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>
|
<span class="meta-sep"> <?php _e('on ', 'twentyten'); ?> </span>
|
||||||
<a href="<?php
|
<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" ) ?>
|
<?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><!-- .entry-meta -->
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
<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="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="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><!-- .entry-meta -->
|
||||||
|
|
Loading…
Reference in New Issue