<!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>[12542] trunk/wp-admin: Media editing:
  When you have many custom taxonomies this page can get rather long,
  or just normally, so adding a &quot;save&quot; button to the top as well,
  for easy access.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12542">12542</a></dd>
<dt>Author</dt> <dd>matt</dd>
<dt>Date</dt> <dd>2009-12-25 22:22:21 +0000 (Fri, 25 Dec 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Media editing: When you have many custom taxonomies this page can get rather long, or just normally, so adding a &quot;save&quot; button to the top as well, for easy access.

There was no place on this page that actually linked to the item being edited, so I hyperinked the thumbnail.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminmediaphp">trunk/wp-admin/media.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (12541 => 12542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2009-12-25 03:16:25 UTC (rev 12541)
+++ trunk/wp-admin/includes/media.php        2009-12-25 22:22:21 UTC (rev 12542)
</span><span class="lines">@@ -1201,6 +1201,8 @@
</span><span class="cx">                 $image_edit_button = &quot;&lt;input type='button' id='imgedit-open-btn-{$post-&gt;ID}' onclick='imageEdit.open($post-&gt;ID, \&quot;$nonce\&quot;)' class='button' value='&quot; . esc_attr__( 'Edit image' ) . &quot;' /&gt; &lt;img src='images/wpspin_light.gif' class='imgedit-wait-spin' alt='' /&gt;&quot;;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        $attachment_url = get_permalink( $attachment_id );
+
</ins><span class="cx">         $item = &quot;
</span><span class="cx">         $type_html
</span><span class="cx">         $toggle_links
</span><span class="lines">@@ -1209,7 +1211,9 @@
</span><span class="cx">         &lt;table class='slidetoggle describe $class'&gt;
</span><span class="cx">                 &lt;thead class='media-item-info' id='media-head-$post-&gt;ID'&gt;
</span><span class="cx">                 &lt;tr&gt;
</span><del>-                        &lt;td class='A1B1' id='thumbnail-head-$post-&gt;ID' rowspan='5'&gt;&lt;img class='thumbnail' src='$thumb_url' alt='' /&gt;&lt;/td&gt;
</del><ins>+                        &lt;td class='A1B1' id='thumbnail-head-$post-&gt;ID' rowspan='5'&gt;
+                        &lt;a href='$attachment_url' target='_blank'&gt;&lt;img class='thumbnail' src='$thumb_url' alt='' /&gt;&lt;/a&gt;
+                        &lt;/td&gt;
</ins><span class="cx">                         &lt;td&gt;&lt;strong&gt;&quot; . __('File name:') . &quot;&lt;/strong&gt; $filename&lt;/td&gt;
</span><span class="cx">                 &lt;/tr&gt;
</span><span class="cx">                 &lt;tr&gt;&lt;td&gt;&lt;strong&gt;&quot; . __('File type:') . &quot;&lt;/strong&gt; $post-&gt;post_mime_type&lt;/td&gt;&lt;/tr&gt;
</span><span class="lines">@@ -1441,7 +1445,7 @@
</span><span class="cx">         &lt;div&gt;
</span><span class="cx">         &lt;?php _e( 'Choose files to upload' ); ?&gt;
</span><span class="cx">         &lt;div id=&quot;flash-browse-button&quot;&gt;&lt;/div&gt;
</span><del>-        &lt;span&gt;&lt;input id=&quot;cancel-upload&quot; disabled=&quot;disabled&quot; onclick=&quot;cancelUpload()&quot; type=&quot;button&quot; value=&quot;&lt;?php esc_attr_e('Cancel Upload'); ?&gt;&quot; class=&quot;button&quot; /&gt;&lt;/span&gt;
</del><ins>+        &lt;span&gt;&lt;input id=&quot;cancel-upload&quot; disabled=&quot;disabled&quot; onClick=&quot;cancelUpload()&quot; type=&quot;button&quot; value=&quot;&lt;?php esc_attr_e('Cancel Upload'); ?&gt;&quot; class=&quot;button&quot; /&gt;&lt;/span&gt;
</ins><span class="cx">         &lt;/div&gt;
</span><span class="cx"> &lt;?php do_action('post-flash-upload-ui'); ?&gt;
</span><span class="cx">         &lt;p class=&quot;howto&quot;&gt;&lt;?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?&gt;&lt;/p&gt;
</span><span class="lines">@@ -1452,7 +1456,7 @@
</span><span class="cx"> &lt;?php do_action('pre-html-upload-ui'); ?&gt;
</span><span class="cx">         &lt;p id=&quot;async-upload-wrap&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;async-upload&quot;&gt;&lt;?php _e('Upload'); ?&gt;&lt;/label&gt;
</span><del>-        &lt;input type=&quot;file&quot; name=&quot;async-upload&quot; id=&quot;async-upload&quot; /&gt; &lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;html-upload&quot; value=&quot;&lt;?php esc_attr_e('Upload'); ?&gt;&quot; /&gt; &lt;a href=&quot;#&quot; onclick=&quot;try{top.tb_remove();}catch(e){}; return false;&quot;&gt;&lt;?php _e('Cancel'); ?&gt;&lt;/a&gt;
</del><ins>+        &lt;input type=&quot;file&quot; name=&quot;async-upload&quot; id=&quot;async-upload&quot; /&gt; &lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;html-upload&quot; value=&quot;&lt;?php esc_attr_e('Upload'); ?&gt;&quot; /&gt; &lt;a href=&quot;#&quot; onClick=&quot;try{top.tb_remove();}catch(e){}; return false;&quot;&gt;&lt;?php _e('Cancel'); ?&gt;&lt;/a&gt;
</ins><span class="cx">         &lt;/p&gt;
</span><span class="cx">         &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
</span><span class="cx">         &lt;?php if ( is_lighttpd_before_150() ): ?&gt;
</span><span class="lines">@@ -1772,8 +1776,8 @@
</span><span class="cx"> &lt;/tbody&gt;&lt;/table&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;p class=&quot;ml-submit&quot;&gt;
</span><del>-&lt;input type=&quot;button&quot; class=&quot;button&quot; style=&quot;display:none;&quot; onmousedown=&quot;wpgallery.update();&quot; name=&quot;insert-gallery&quot; id=&quot;insert-gallery&quot; value=&quot;&lt;?php esc_attr_e( 'Insert gallery' ); ?&gt;&quot; /&gt;
-&lt;input type=&quot;button&quot; class=&quot;button&quot; style=&quot;display:none;&quot; onmousedown=&quot;wpgallery.update();&quot; name=&quot;update-gallery&quot; id=&quot;update-gallery&quot; value=&quot;&lt;?php esc_attr_e( 'Update gallery settings' ); ?&gt;&quot; /&gt;
</del><ins>+&lt;input type=&quot;button&quot; class=&quot;button&quot; style=&quot;display:none;&quot; onMouseDown=&quot;wpgallery.update();&quot; name=&quot;insert-gallery&quot; id=&quot;insert-gallery&quot; value=&quot;&lt;?php esc_attr_e( 'Insert gallery' ); ?&gt;&quot; /&gt;
+&lt;input type=&quot;button&quot; class=&quot;button&quot; style=&quot;display:none;&quot; onMouseDown=&quot;wpgallery.update();&quot; name=&quot;update-gallery&quot; id=&quot;update-gallery&quot; value=&quot;&lt;?php esc_attr_e( 'Update gallery settings' ); ?&gt;&quot; /&gt;
</ins><span class="cx"> &lt;/p&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/form&gt;
</span><span class="lines">@@ -2000,11 +2004,11 @@
</span><span class="cx">                         &lt;td class=&quot;field&quot;&gt;
</span><span class="cx">                                 &lt;input name=&quot;align&quot; id=&quot;align-none&quot; value=&quot;none&quot; onclick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'none' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</span><span class="cx">                                 &lt;label for=&quot;align-none&quot; class=&quot;align image-align-none-label&quot;&gt;' . __('None') . '&lt;/label&gt;
</span><del>-                                &lt;input name=&quot;align&quot; id=&quot;align-left&quot; value=&quot;left&quot; onclick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'left' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</del><ins>+                                &lt;input name=&quot;align&quot; id=&quot;align-left&quot; value=&quot;left&quot; onClick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'left' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</ins><span class="cx">                                 &lt;label for=&quot;align-left&quot; class=&quot;align image-align-left-label&quot;&gt;' . __('Left') . '&lt;/label&gt;
</span><del>-                                &lt;input name=&quot;align&quot; id=&quot;align-center&quot; value=&quot;center&quot; onclick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'center' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</del><ins>+                                &lt;input name=&quot;align&quot; id=&quot;align-center&quot; value=&quot;center&quot; onClick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'center' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</ins><span class="cx">                                 &lt;label for=&quot;align-center&quot; class=&quot;align image-align-center-label&quot;&gt;' . __('Center') . '&lt;/label&gt;
</span><del>-                                &lt;input name=&quot;align&quot; id=&quot;align-right&quot; value=&quot;right&quot; onclick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'right' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</del><ins>+                                &lt;input name=&quot;align&quot; id=&quot;align-right&quot; value=&quot;right&quot; onClick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'right' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</ins><span class="cx">                                 &lt;label for=&quot;align-right&quot; class=&quot;align image-align-right-label&quot;&gt;' . __('Right') . '&lt;/label&gt;
</span><span class="cx">                         &lt;/td&gt;
</span><span class="cx">                 &lt;/tr&gt;
</span><span class="lines">@@ -2015,15 +2019,15 @@
</span><span class="cx">                         &lt;/th&gt;
</span><span class="cx">                         &lt;td class=&quot;field&quot;&gt;&lt;input id=&quot;url&quot; name=&quot;url&quot; value=&quot;&quot; type=&quot;text&quot; /&gt;&lt;br /&gt;
</span><span class="cx"> 
</span><del>-                        &lt;button type=&quot;button&quot; class=&quot;button&quot; value=&quot;&quot; onclick=&quot;document.forms[0].url.value=null&quot;&gt;' . __('None') . '&lt;/button&gt;
-                        &lt;button type=&quot;button&quot; class=&quot;button&quot; value=&quot;&quot; onclick=&quot;document.forms[0].url.value=document.forms[0].src.value&quot;&gt;' . __('Link to image') . '&lt;/button&gt;
</del><ins>+                        &lt;button type=&quot;button&quot; class=&quot;button&quot; value=&quot;&quot; onClick=&quot;document.forms[0].url.value=null&quot;&gt;' . __('None') . '&lt;/button&gt;
+                        &lt;button type=&quot;button&quot; class=&quot;button&quot; value=&quot;&quot; onClick=&quot;document.forms[0].url.value=document.forms[0].src.value&quot;&gt;' . __('Link to image') . '&lt;/button&gt;
</ins><span class="cx">                         &lt;p class=&quot;help&quot;&gt;' . __('Enter a link URL or click above for presets.') . '&lt;/p&gt;&lt;/td&gt;
</span><span class="cx">                 &lt;/tr&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;tr&gt;
</span><span class="cx">                         &lt;td&gt;&lt;/td&gt;
</span><span class="cx">                         &lt;td&gt;
</span><del>-                                &lt;input type=&quot;button&quot; class=&quot;button&quot; id=&quot;go_button&quot; style=&quot;color:#bbb;&quot; onclick=&quot;addExtImage.insert()&quot; value=&quot;' . esc_attr__('Insert into Post') . '&quot; /&gt;
</del><ins>+                                &lt;input type=&quot;button&quot; class=&quot;button&quot; id=&quot;go_button&quot; style=&quot;color:#bbb;&quot; onClick=&quot;addExtImage.insert()&quot; value=&quot;' . esc_attr__('Insert into Post') . '&quot; /&gt;
</ins><span class="cx">                         &lt;/td&gt;
</span><span class="cx">                 &lt;/tr&gt;
</span><span class="cx">         &lt;/tbody&gt;&lt;/table&gt;
</span></span></pre></div>
<a id="trunkwpadminmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/media.php (12541 => 12542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/media.php        2009-12-25 03:16:25 UTC (rev 12541)
+++ trunk/wp-admin/media.php        2009-12-25 22:22:21 UTC (rev 12542)
</span><span class="lines">@@ -90,6 +90,10 @@
</span><span class="cx"> &lt;h2&gt;&lt;?php _e( 'Edit Media' ); ?&gt;&lt;/h2&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;form method=&quot;post&quot; action=&quot;&lt;?php echo esc_url( remove_query_arg( 'message' ) ); ?&gt;&quot; class=&quot;media-upload-form&quot; id=&quot;media-single-form&quot;&gt;
</span><ins>+&lt;p class=&quot;submit&quot;&gt;
+&lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; name=&quot;save&quot; value=&quot;&lt;?php esc_attr_e('Update Media'); ?&gt;&quot; /&gt;
+&lt;/p&gt;
+
</ins><span class="cx"> &lt;div class=&quot;media-single&quot;&gt;
</span><span class="cx"> &lt;div id='media-item-&lt;?php echo $att_id; ?&gt;' class='media-item'&gt;
</span><span class="cx"> &lt;?php echo get_media_item( $att_id, array( 'toggle' =&gt; false, 'send' =&gt; false, 'delete' =&gt; false, 'show_title' =&gt; false, 'errors' =&gt; $errors ) ); ?&gt;
</span></span></pre>
</div>
</div>

</body>
</html>