<!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" />
<title>[22532] trunk: Media: Add title, caption, and alt text, and attachment info to sidebar.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/22532">22532</a></dd>
<dt>Author</dt> <dd>koopersmith</dd>
<dt>Date</dt> <dd>2012-11-10 18:25:04 +0000 (Sat, 10 Nov 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Media: Add title, caption, and alt text, and attachment info to sidebar.
* Improve sidebar styles.
* Separate the hybrid title/caption field.
* Improve the sidebar image thumbnail.
* Remove filenames from inside the non-image icon thumbnail.
* Properly sync title/caption/alt.
see <a href="http://core.trac.wordpress.org/ticket/21390">#21390</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesajaxactionsphp">trunk/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunkwpadminincludespostphp">trunk/wp-admin/includes/post.php</a></li>
<li><a href="#trunkwpincludescssmediaviewscss">trunk/wp-includes/css/media-views.css</a></li>
<li><a href="#trunkwpincludesjsmediaviewsjs">trunk/wp-includes/js/media-views.js</a></li>
<li><a href="#trunkwpincludesmediaphp">trunk/wp-includes/media.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ajax-actions.php (22531 => 22532)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ajax-actions.php        2012-11-10 18:13:09 UTC (rev 22531)
+++ trunk/wp-admin/includes/ajax-actions.php        2012-11-10 18:25:04 UTC (rev 22532)
</span><span class="lines">@@ -1858,8 +1858,11 @@
</span><span class="cx">         if ( ! empty( $changes['caption'] ) )
</span><span class="cx">                 $args['post_excerpt'] = $changes['caption'];
</span><span class="cx">
</span><ins>+        if ( ! empty( $changes['alt'] ) )
+                $args['_wp_attachment_image_alt'] = $changes['alt'];
+
</ins><span class="cx">         if ( $args )
</span><del>-                wp_update_post( array_merge( $args, array( 'ID' => $id ) ) );
</del><ins>+                edit_post( array_merge( $args, array( 'post_ID' => $id ) ) );
</ins><span class="cx">
</span><span class="cx">         wp_send_json_success();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadminincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/post.php (22531 => 22532)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/post.php        2012-11-10 18:13:09 UTC (rev 22531)
+++ trunk/wp-admin/includes/post.php        2012-11-10 18:25:04 UTC (rev 22532)
</span><span class="lines">@@ -165,8 +165,9 @@
</span><span class="cx">         $post_data = _wp_translate_postdata( true, $post_data );
</span><span class="cx">         if ( is_wp_error($post_data) )
</span><span class="cx">                 wp_die( $post_data->get_error_message() );
</span><del>-        if ( 'autosave' != $post_data['action'] && 'auto-draft' == $post_data['post_status'] )
</del><ins>+        if ( ( empty( $post_data['action'] ) || 'autosave' != $post_data['action'] ) && 'auto-draft' == $post_data['post_status'] ) {
</ins><span class="cx">                 $post_data['post_status'] = 'draft';
</span><ins>+        }
</ins><span class="cx">
</span><span class="cx">         if ( isset($post_data['visibility']) ) {
</span><span class="cx">                 switch ( $post_data['visibility'] ) {
</span></span></pre></div>
<a id="trunkwpincludescssmediaviewscss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/css/media-views.css (22531 => 22532)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/media-views.css        2012-11-10 18:13:09 UTC (rev 22531)
+++ trunk/wp-includes/css/media-views.css        2012-11-10 18:25:04 UTC (rev 22532)
</span><span class="lines">@@ -171,6 +171,70 @@
</span><span class="cx">         padding-top: 5px;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.media-sidebar h3 {
+        position: relative;
+        font-weight: bold;
+        text-transform: uppercase;
+        font-size: 12px;
+        color: #777;
+        text-shadow: 0 1px 0 #fff;
+        margin: 24px 0 8px;
+}
+
+/*.media-sidebar h3:before {
+        content: '\25B8';
+        display: block;
+        position: absolute;
+        top: -1px;
+        left: -12px;
+        font-size: 14px;
+        color: #ccc;
+}
+*/
+.media-sidebar .setting {
+        display: block;
+        float: left;
+        width: 100%;
+        margin: 1px 0;
+}
+
+.media-sidebar .setting span {
+        float: left;
+        min-width: 78px;
+        min-height: 24px;
+        margin-right: 7px;
+        padding-top: 8px;
+        line-height: 16px;
+        text-align: right;
+        color: #999;
+        text-shadow: 0 1px 0 #fff;
+}
+
+.media-sidebar .setting input,
+.media-sidebar .setting textarea,
+.media-sidebar .setting > .button-group {
+        min-width: 180px;
+        float: right;
+}
+
+.media-sidebar .setting input,
+.media-sidebar .setting textarea {
+        padding: 6px 8px;
+        line-height: 16px;
+        resize: none;
+}
+
+.media-sidebar .setting textarea {
+        height: 62px;
+}
+
+.media-sidebar .setting select {
+        height: 28px;
+        line-height: 28px;
+        margin-top: 3px;
+}
+
+
</ins><span class="cx"> /**
</span><span class="cx"> * Menu
</span><span class="cx"> */
</span><span class="lines">@@ -787,22 +851,31 @@
</span><span class="cx">         overflow: auto;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.attachment-details-preview {
-        cursor: default;
</del><ins>+.attachment-info {
+        overflow: hidden;
+        min-height: 60px;
+        margin-bottom: 16px;
+        line-height: 18px;
+        color: #999;
+        border-bottom: 1px solid #e5e5e5;
+        box-shadow: 0 1px 0 #fff;
+        padding-bottom: 16px;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-.attachment-details-preview {
-        width: auto;
-        height: auto;
-        position: relative;
</del><ins>+.attachment-info .filename {
+        font-weight: bold;
+        color: #464646;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-.attachment-details-preview .thumbnail {
-        width: 100%;
-        height: auto;
</del><ins>+.attachment-info .thumbnail {
+        position: relative;
+        float: left;
+        max-width: 120px;
+        max-height: 120px;
+        margin-right: 10px;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-.attachment-details-preview .thumbnail:after {
</del><ins>+.attachment-info .thumbnail:after {
</ins><span class="cx">         content: '';
</span><span class="cx">         display: block;
</span><span class="cx">         position: absolute;
</span><span class="lines">@@ -810,21 +883,19 @@
</span><span class="cx">         left: 0;
</span><span class="cx">         right: 0;
</span><span class="cx">         bottom: 0;
</span><del>-        box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );
</del><ins>+        box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 );
</ins><span class="cx">         overflow: hidden;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.attachment-details-preview .thumbnail img {
</del><ins>+.attachment-info .thumbnail img {
</ins><span class="cx">         display: block;
</span><del>-        max-width: 100%;
-        max-height: 132px;
</del><ins>+        max-width: 120px;
+        max-height: 120px;
</ins><span class="cx">         margin: 0 auto;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.attachment-details .describe {
</del><ins>+.attachment-info .details {
</ins><span class="cx">         float: left;
</span><del>-        margin: 10px 0 0;
-        border-radius: 3px;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -833,4 +904,8 @@
</span><span class="cx">
</span><span class="cx"> .attachment-display-settings h4 {
</span><span class="cx">         margin: 1.4em 0 0.4em;
</span><ins>+}
+
+.gallery-settings {
+        overflow: hidden;
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjsmediaviewsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/media-views.js (22531 => 22532)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/media-views.js        2012-11-10 18:13:09 UTC (rev 22531)
+++ trunk/wp-includes/js/media-views.js        2012-11-10 18:25:04 UTC (rev 22532)
</span><span class="lines">@@ -1906,8 +1906,11 @@
</span><span class="cx">                 template: media.template('attachment'),
</span><span class="cx">
</span><span class="cx">                 events: {
</span><del>-                        'mousedown .attachment-preview': 'toggleSelection',
-                        'change .describe': 'describe'
</del><ins>+                        'mousedown .attachment-preview': 'toggleSelection',
+                        'change [data-setting]': 'updateSetting',
+                        'change [data-setting] input': 'updateSetting',
+                        'change [data-setting] select': 'updateSetting',
+                        'change [data-setting] textarea': 'updateSetting'
</ins><span class="cx">                 },
</span><span class="cx">
</span><span class="cx">                 buttons: {},
</span><span class="lines">@@ -2039,11 +2042,13 @@
</span><span class="cx">                         }
</span><span class="cx">                 },
</span><span class="cx">
</span><del>-                describe: function( event ) {
-                        if ( 'image' === this.model.get('type') )
-                                this.model.save( 'caption', event.target.value );
-                        else
-                                this.model.save( 'title', event.target.value );
</del><ins>+                updateSetting: function( event ) {
+                        var $setting = $( event.target ).closest('[data-setting]');
+
+                        if ( ! $setting.length )
+                                return;
+
+                        this.model.save( $setting.data('setting'), event.target.value );
</ins><span class="cx">                 }
</span><span class="cx">         });
</span><span class="cx">
</span><span class="lines">@@ -2592,7 +2597,10 @@
</span><span class="cx">                 template: media.template('attachment-details'),
</span><span class="cx">
</span><span class="cx">                 events: {
</span><del>-                        'change .describe': 'describe'
</del><ins>+                        'change [data-setting]': 'updateSetting',
+                        'change [data-setting] input': 'updateSetting',
+                        'change [data-setting] select': 'updateSetting',
+                        'change [data-setting] textarea': 'updateSetting'
</ins><span class="cx">                 }
</span><span class="cx">         });
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/media.php (22531 => 22532)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/media.php        2012-11-10 18:13:09 UTC (rev 22531)
+++ trunk/wp-includes/media.php        2012-11-10 18:25:04 UTC (rev 22532)
</span><span class="lines">@@ -1262,6 +1262,7 @@
</span><span class="cx">                 'type' => $type,
</span><span class="cx">                 'subtype' => $subtype,
</span><span class="cx">                 'icon' => wp_mime_type_icon( $attachment->ID ),
</span><ins>+                'dateFormatted' => mysql2date( get_option('date_format'), $attachment->post_date ),
</ins><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         if ( $meta && 'image' === $type ) {
</span><span class="lines">@@ -1436,36 +1437,53 @@
</span><span class="cx">         </script>
</span><span class="cx">
</span><span class="cx">         <script type="text/html" id="tmpl-attachment-details">
</span><del>-                <h3><?php _e('Edit Attachment Details'); ?></h3>
-                <div class="attachment-preview attachment-details-preview type-{{ type }} subtype-{{ subtype }} {{ orientation }}">
-                        <# if ( uploading ) { #>
-                                <div class="media-progress-bar"><div></div></div>
-                        <# } else if ( 'image' === type ) { #>
-                                <div class="thumbnail">
</del><ins>+                <h3><?php _e('Attachment Details'); ?></h3>
+                <div class="attachment-info">
+                        <div class="thumbnail">
+                                <# if ( uploading ) { #>
+                                        <div class="media-progress-bar"><div></div></div>
+                                <# } else if ( 'image' === type ) { #>
</ins><span class="cx">                                         <img src="{{ url }}" draggable="false" />
</span><del>-                                </div>
-                        <# } else { #>
-                                <div class="icon-thumbnail">
</del><ins>+                                <# } else { #>
</ins><span class="cx">                                         <img src="{{ icon }}" class="icon" draggable="false" />
</span><del>-                                        <div class="filename">{{ filename }}</div>
-                                </div>
-                        <# } #>
</del><ins>+                                <# } #>
+                        </div>
+                        <div class="details">
+                                <div class="filename">{{ filename }}</div>
+                                <div class="uploaded">{{ dateFormatted }}</div>
+                                <# if ( 'image' === type ) { #>
+                                        <div class="dimensions">{{ width }} &times; {{ height }}</div>
+                                <# } #>
+                        </div>
</ins><span class="cx">                 </div>
</span><span class="cx">
</span><span class="cx">                 <# if ( 'image' === type ) { #>
</span><del>-                        <textarea class="describe"
-                                placeholder="<?php esc_attr_e('Describe this image&hellip;'); ?>"
-                                >{{ caption }}</textarea>
</del><ins>+                        <label class="setting" data-setting="title">
+                                <span><?php _e('Title'); ?></span>
+                                <input type="text" value="{{ title }}" />
+                        </label>
+                        <label class="setting" data-setting="caption">
+                                <span><?php _e('Caption'); ?></span>
+                                <textarea
+                                        placeholder="<?php esc_attr_e('Describe this image&hellip;'); ?>"
+                                        >{{ caption }}</textarea>
+                        </label>
+                        <label class="setting" data-setting="alt">
+                                <span><?php _e('Alt Text'); ?></span>
+                                <input type="text" value="{{ alt }}" />
+                        </label>
</ins><span class="cx">                 <# } else { #>
</span><del>-                        <textarea class="describe"
</del><ins>+                        <label class="setting" data-setting="title">
+                                <span><?php _e('Title'); ?></span>
+                                <input type="text" value="{{ title }}"
</ins><span class="cx">                                 <# if ( 'video' === type ) { #>
</span><span class="cx">                                         placeholder="<?php esc_attr_e('Describe this video&hellip;'); ?>"
</span><span class="cx">                                 <# } else if ( 'audio' === type ) { #>
</span><span class="cx">                                         placeholder="<?php esc_attr_e('Describe this audio file&hellip;'); ?>"
</span><span class="cx">                                 <# } else { #>
</span><span class="cx">                                         placeholder="<?php esc_attr_e('Describe this media file&hellip;'); ?>"
</span><del>-                                <# } #>
-                                >{{ title }}</textarea>
</del><ins>+                                <# } #>/>
+                        </label>
</ins><span class="cx">                 <# } #>
</span><span class="cx">         </script>
</span><span class="cx">
</span><span class="lines">@@ -1495,100 +1513,112 @@
</span><span class="cx">         <script type="text/html" id="tmpl-attachment-display-settings">
</span><span class="cx">                 <h3><?php _e('Attachment Display Settings'); ?></h3>
</span><span class="cx">
</span><del>-                <h4><?php _e('Alignment'); ?></h4>
-                <div class="alignment button-group button-large"
-                        data-setting="align"
-                        <# if ( userSettings ) { #>
-                                data-user-setting="align"
-                        <# } #>>
</del><ins>+                <label class="setting">
+                        <span><?php _e('Alignment'); ?></span>
+                        <select class="alignment"
+                                data-setting="align"
+                                <# if ( userSettings ) { #>
+                                        data-user-setting="align"
+                                <# } #>>
</ins><span class="cx">
</span><del>-                        <button class="button" value="left">
-                                <?php esc_attr_e('Left'); ?>
-                        </button>
-                        <button class="button" value="center">
-                                <?php esc_attr_e('Center'); ?>
-                        </button>
-                        <button class="button" value="right">
-                                <?php esc_attr_e('Right'); ?>
-                        </button>
-                        <button class="button active" value="none">
-                                <?php esc_attr_e('None'); ?>
-                        </button>
-                </div>
</del><ins>+                                <option value="left">
+                                        <?php esc_attr_e('Left'); ?>
+                                </option>
+                                <option value="center">
+                                        <?php esc_attr_e('Center'); ?>
+                                </option>
+                                <option value="right">
+                                        <?php esc_attr_e('Right'); ?>
+                                </option>
+                                <option value="none" selected>
+                                        <?php esc_attr_e('None'); ?>
+                                </option>
+                        </select>
+                </label>
</ins><span class="cx">
</span><del>-                <h4><?php _e('Link To'); ?></h4>
-                <div class="link-to button-group button-large"
-                        data-setting="link"
-                        <# if ( userSettings ) { #>
-                                data-user-setting="urlbutton"
-                        <# } #>>
-
-                        <button class="button active" value="post">
-                                <?php esc_attr_e('Attachment Page'); ?>
-                        </button>
-                        <button class="button" value="file">
-                                <?php esc_attr_e('Media File'); ?>
-                        </button>
-                        <button class="button" value="none">
-                                <?php esc_attr_e('None'); ?>
-                        </button>
-                </div>
-
-                <# if ( ! _.isUndefined( sizes ) ) { #>
-                        <h4><?php _e('Size'); ?></h4>
-                        <select class="size" name="size"
-                                data-setting="size"
</del><ins>+                <label class="setting">
+                        <span><?php _e('Link To'); ?></span>
+                        <select class="link-to"
+                                data-setting="link"
</ins><span class="cx">                                 <# if ( userSettings ) { #>
</span><del>-                                        data-user-setting="imgsize"
</del><ins>+                                        data-user-setting="urlbutton"
</ins><span class="cx">                                 <# } #>>
</span><del>-                                <?php
</del><span class="cx">
</span><del>-                                $sizes = apply_filters( 'image_size_names_choose', array(
-                                        'thumbnail' => __('Thumbnail'),
-                                        'medium' => __('Medium'),
-                                        'large' => __('Large'),
-                                ) );
</del><ins>+                                <option value="post" selected>
+                                        <?php esc_attr_e('Attachment Page'); ?>
+                                </option>
+                                <option value="file">
+                                        <?php esc_attr_e('Media File'); ?>
+                                </option>
+                                <option value="none">
+                                        <?php esc_attr_e('None'); ?>
+                                </option>
+                        </select>
+                </label>
</ins><span class="cx">
</span><del>-                                foreach ( $sizes as $value => $name ) : ?>
-                                        <# if ( ! _.isUndefined( sizes['<?php echo esc_js( $value ); ?>'] ) ) { #>
-                                                <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'medium' ); ?>>
-                                                        <?php echo esc_html( $name ); ?>
-                                                </option>
</del><ins>+                <# if ( ! _.isUndefined( sizes ) ) { #>
+                        <label class="setting">
+                                <span><?php _e('Size'); ?></span>
+                                <select class="size" name="size"
+                                        data-setting="size"
+                                        <# if ( userSettings ) { #>
+                                                data-user-setting="imgsize"
</ins><span class="cx">                                         <# } #>>
</span><del>-                                <?php endforeach; ?>
</del><ins>+                                        <?php
</ins><span class="cx">
</span><del>-                                <option value="full">
-                                        <?php echo esc_html_e( 'Full Size' ); ?>
-                                </option>
-                        </select>
</del><ins>+                                        $sizes = apply_filters( 'image_size_names_choose', array(
+                                                'thumbnail' => __('Thumbnail'),
+                                                'medium' => __('Medium'),
+                                                'large' => __('Large'),
+                                        ) );
+
+                                        foreach ( $sizes as $value => $name ) : ?>
+                                                <# if ( ! _.isUndefined( sizes['<?php echo esc_js( $value ); ?>'] ) ) { #>
+                                                        <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'medium' ); ?>>
+                                                                <?php echo esc_html( $name ); ?>
+                                                        </option>
+                                                <# } #>>
+                                        <?php endforeach; ?>
+
+                                        <option value="full">
+                                                <?php echo esc_html_e( 'Full Size' ); ?>
+                                        </option>
+                                </select>
+                        </label>
</ins><span class="cx">                 <# } #>
</span><span class="cx">         </script>
</span><span class="cx">
</span><span class="cx">         <script type="text/html" id="tmpl-gallery-settings">
</span><span class="cx">                 <h3><?php _e('Gallery Settings'); ?></h3>
</span><span class="cx">
</span><del>-                <h4><?php _e('Link To'); ?></h4>
-                <div class="link-to button-group"
-                        data-setting="link">
</del><ins>+                <label class="setting">
+                        <span><?php _e('Link To'); ?></span>
+                        <select class="link-to"
+                                data-setting="link"
+                                <# if ( userSettings ) { #>
+                                        data-user-setting="urlbutton"
+                                <# } #>>
</ins><span class="cx">
</span><del>-                        <button class="button active" value="post">
-                                <?php esc_attr_e('Attachment Page'); ?>
-                        </button>
-                        <button class="button" value="file">
-                                <?php esc_attr_e('Media File'); ?>
-                        </button>
-                </div>
</del><ins>+                                <option value="post" selected>
+                                        <?php esc_attr_e('Attachment Page'); ?>
+                                </option>
+                                <option value="file">
+                                        <?php esc_attr_e('Media File'); ?>
+                                </option>
+                        </select>
+                </label>
</ins><span class="cx">
</span><del>-                <h4><?php _e('Gallery Columns'); ?></h4>
-
-                <select class="columns" name="columns"
-                        data-setting="columns">
-                        <?php for ( $i = 1; $i <= 9; $i++ ) : ?>
-                                <option value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, 3 ); ?>>
-                                        <?php echo esc_html( $i ); ?>
-                                </option>
-                        <?php endfor; ?>
-                </select>
</del><ins>+                <label class="setting">
+                        <span><?php _e('Columns'); ?></span>
+                        <select class="columns" name="columns"
+                                data-setting="columns">
+                                <?php for ( $i = 1; $i <= 9; $i++ ) : ?>
+                                        <option value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, 3 ); ?>>
+                                                <?php echo esc_html( $i ); ?>
+                                        </option>
+                                <?php endfor; ?>
+                        </select>
+                </label>
</ins><span class="cx">         </script>
</span><span class="cx">
</span><span class="cx">         <script type="text/html" id="tmpl-editor-attachment">
</span></span></pre>
</div>
</div>
</body>
</html>