<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[13109] trunk/wp-content/themes/twentyten: 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).</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13109">13109</a></dd>
<dt>Author</dt> <dd>dd32</dd>
<dt>Date</dt> <dd>2010-02-13 11:09:51 +0000 (Sat, 13 Feb 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>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 <a href="http://trac.wordpress.org/ticket/9015">#9015</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpcontentthemestwentytenarchivephp">trunk/wp-content/themes/twentyten/archive.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenattachmentphp">trunk/wp-content/themes/twentyten/attachment.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenauthorphp">trunk/wp-content/themes/twentyten/author.php</a></li>
<li><a href="#trunkwpcontentthemestwentytencategoryphp">trunk/wp-content/themes/twentyten/category.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenindexphp">trunk/wp-content/themes/twentyten/index.php</a></li>
<li><a href="#trunkwpcontentthemestwentytensearchphp">trunk/wp-content/themes/twentyten/search.php</a></li>
<li><a href="#trunkwpcontentthemestwentytensinglephp">trunk/wp-content/themes/twentyten/single.php</a></li>
<li><a href="#trunkwpcontentthemestwentytentagphp">trunk/wp-content/themes/twentyten/tag.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpcontentthemestwentytenarchivephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/archive.php (13108 => 13109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/archive.php        2010-02-13 10:58:01 UTC (rev 13108)
+++ trunk/wp-content/themes/twentyten/archive.php        2010-02-13 11:09:51 UTC (rev 13109)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> <?php the_post(); ?>
</span><span class="cx">
</span><span class="cx"> <?php if ( is_day() ) : ?>
</span><del>-                                <h1 class="page-title"><?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_time(get_option('date_format')) ) ?></h1>
</del><ins>+                                <h1 class="page-title"><?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_time() ) ?></h1>
</ins><span class="cx"> <?php elseif ( is_month() ) : ?>
</span><span class="cx">                                 <h1 class="page-title"><?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_time('F Y') ) ?></h1>
</span><span class="cx"> <?php elseif ( is_year() ) : ?>
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">                                         <div class="entry-meta">
</span><span class="cx">                                                 <span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
</span><span class="cx">                                                 <a href="<?php
</span><del>-                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>
</del><ins>+                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>
</ins><span class="cx">                                                 <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span>
</span><span class="cx">                                                 <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><span class="cx">                                         </div><!-- .entry-meta -->
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenattachmentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/attachment.php (13108 => 13109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/attachment.php        2010-02-13 10:58:01 UTC (rev 13108)
+++ trunk/wp-content/themes/twentyten/attachment.php        2010-02-13 11:09:51 UTC (rev 13109)
</span><span class="lines">@@ -15,15 +15,16 @@
</span><span class="cx">                                                 <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><span class="cx">                                                 <span class="meta-sep"> | </span>
</span><span class="cx">                                                 <span class="meta-prep meta-prep-entry-date"><?php _e('Published ', 'twentyten'); ?></span>
</span><del>-                                                <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>
</del><ins>+                                                <span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_time(); ?></abbr></span>
</ins><span class="cx">                                                 <?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" ) ?>
</span><span class="cx">                                         </div><!-- .entry-meta -->
</span><span class="cx">
</span><span class="cx">                                         <div class="entry-content">
</span><span class="cx">                                                 <div class="entry-attachment">
</span><del>-<?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>
</del><ins>+<?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>
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx">                                 <div id="nav-below" class="navigation">
</span><span class="lines">@@ -31,7 +32,7 @@
</span><span class="cx">                                         <div class="nav-next"><?php next_image_link( false ); ?></div>
</span><span class="cx">                                 </div><!-- #nav-below -->
</span><span class="cx"> <?php else : ?>
</span><del>-                                                <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>
</del><ins>+                                                <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>
</ins><span class="cx"> <?php endif; ?>
</span><span class="cx">                                                 </div>
</span><span class="cx">                                                 <div class="entry-caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt() ?></div>
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenauthorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/author.php (13108 => 13109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/author.php        2010-02-13 10:58:01 UTC (rev 13108)
+++ trunk/wp-content/themes/twentyten/author.php        2010-02-13 11:09:51 UTC (rev 13109)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">                                         <div class="entry-meta">
</span><span class="cx">                                                 <span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
</span><span class="cx">                                                 <a href="<?php
</span><del>-                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>
</del><ins>+                the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
</ins><span class="cx">                                         </div><!-- .entry-meta -->
</span><span class="cx">
</span><span class="cx">                                         <div class="entry-summary">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytencategoryphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/category.php (13108 => 13109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/category.php        2010-02-13 10:58:01 UTC (rev 13108)
+++ trunk/wp-content/themes/twentyten/category.php        2010-02-13 11:09:51 UTC (rev 13109)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx">                                         <div class="entry-meta">
</span><span class="cx">                                                 <span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
</span><span class="cx">                                                 <a href="<?php
</span><del>-                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>
</del><ins>+                the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
</ins><span class="cx">                                                 <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span>
</span><span class="cx">                                                 <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><span class="cx">                                         </div><!-- .entry-meta -->
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenindexphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/index.php (13108 => 13109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/index.php        2010-02-13 10:58:01 UTC (rev 13108)
+++ trunk/wp-content/themes/twentyten/index.php        2010-02-13 11:09:51 UTC (rev 13109)
</span><span class="lines">@@ -18,13 +18,13 @@
</span><span class="cx">                         <div class="entry-meta">
</span><span class="cx">                                 <span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
</span><span class="cx">                                 <a href="<?php
</span><del>-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>
</del><ins>+the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
</ins><span class="cx">                                 <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span>
</span><span class="cx">                                 <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><span class="cx">                         </div><!-- .entry-meta -->
</span><span class="cx">
</span><span class="cx">                         <div class="entry-content">
</span><del>-                                <div class="gallery-thumb"><a class="size-thumbnail" href="<?php permalink_link() ?>"><?php
</del><ins>+                                <div class="gallery-thumb"><a class="size-thumbnail" href="<?php the_permalink() ?>"><?php
</ins><span class="cx">                                 $images =& get_children( array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999) );
</span><span class="cx">                                 $total_images = count($images);
</span><span class="cx">                                 $image = array_shift($images);
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">                         <div class="entry-utility">
</span><span class="cx">                                 <span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
</span><span class="cx">                                 <a href="<?php
</span><del>-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>
</del><ins>+the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
</ins><span class="cx">                                 <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span>
</span><span class="cx">                                 <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><span class="cx">                                 <span class="meta-sep"> | </span>
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensearchphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/search.php (13108 => 13109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/search.php        2010-02-13 10:58:01 UTC (rev 13108)
+++ trunk/wp-content/themes/twentyten/search.php        2010-02-13 11:09:51 UTC (rev 13109)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">                                         <div class="entry-meta">
</span><span class="cx">                                                 <span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
</span><span class="cx">                                                 <a href="<?php
</span><del>-                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>
</del><ins>+                the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
</ins><span class="cx">                                                 <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span>
</span><span class="cx">                                                 <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><span class="cx">                                         </div><!-- .entry-meta -->
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensinglephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/single.php (13108 => 13109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/single.php        2010-02-13 10:58:01 UTC (rev 13108)
+++ trunk/wp-content/themes/twentyten/single.php        2010-02-13 11:09:51 UTC (rev 13109)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">                                                 <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><span class="cx">                                                 <span class="meta-sep"> <?php _e('on ', 'twentyten'); ?> </span>
</span><span class="cx">                                                 <a href="<?php
</span><del>-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>
</del><ins>+the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time(); ?></span></a>
</ins><span class="cx">                                                 <?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" ) ?>
</span><span class="cx">                                         </div><!-- .entry-meta -->
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytentagphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/tag.php (13108 => 13109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/tag.php        2010-02-13 10:58:01 UTC (rev 13108)
+++ trunk/wp-content/themes/twentyten/tag.php        2010-02-13 11:09:51 UTC (rev 13109)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx">                                         <div class="entry-meta">
</span><span class="cx">                                                 <span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
</span><del>-                                                <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>
</del><ins>+                                                <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>
</ins><span class="cx">                                                 <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span>
</span><span class="cx">                                                 <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><span class="cx">                                         </div><!-- .entry-meta -->
</span></span></pre>
</div>
</div>
</body>
</html>