<!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>[24226] trunk: Improve the UX and flow of the Image post format.</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 { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { 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/24226">24226</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2013-05-09 22:45:14 +0000 (Thu, 09 May 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Improve the UX and flow of the Image post format.
* Drag-and-drop
* Textarea for HTML/URL hidden to start
* Bigger click target for entering Media modal
* Image preview height-contrained to 300 pixels
* Hid the alignment, size, etc options that didn't have an effect anyway
* Got wp-format-{format} into the <body> class
props DrewAPicture, aaroncampbell, markjaquith, azaozz. see <a href="http://core.trac.wordpress.org/ticket/24291">#24291</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminheaderphp">trunk/wp-admin/admin-header.php</a></li>
<li><a href="#trunkwpadmincsswpadmincss">trunk/wp-admin/css/wp-admin.css</a></li>
<li><a href="#trunkwpadminincludespostformatsphp">trunk/wp-admin/includes/post-formats.php</a></li>
<li><a href="#trunkwpadminjspostformatsjs">trunk/wp-admin/js/post-formats.js</a></li>
<li><a href="#trunkwpincludespostformatsphp">trunk/wp-includes/post-formats.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-header.php (24225 => 24226)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-header.php 2013-05-09 22:41:30 UTC (rev 24225)
+++ trunk/wp-admin/admin-header.php 2013-05-09 22:45:14 UTC (rev 24226)
</span><span class="lines">@@ -85,6 +85,17 @@
</span><span class="cx"> $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
</span><span class="cx"> $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
</span><span class="cx">
</span><ins>+if ( false !== $post_format = get_post_format() ) {
+ if ( ! $post_format ) {
+ $post_format = 'standard';
+
+ if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) )
+ $post_format = $_REQUEST['format'];
+ }
+
+ $admin_body_class .= ' wp-format-' . $post_format;
+}
+
</ins><span class="cx"> if ( wp_is_mobile() )
</span><span class="cx"> $admin_body_class .= ' mobile';
</span><span class="cx">
</span><span class="lines">@@ -98,7 +109,7 @@
</span><span class="cx"> </script>
</span><span class="cx">
</span><span class="cx"> <?php
</span><del>-// Make sure the customize body classes are correct as early as possible.
</del><ins>+// Make sure the customize body classes are correct as early as possible.
</ins><span class="cx"> if ( current_user_can( 'edit_theme_options' ) )
</span><span class="cx"> wp_customize_support_script();
</span><span class="cx"> ?>
</span></span></pre></div>
<a id="trunkwpadmincsswpadmincss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin.css (24225 => 24226)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin.css 2013-05-09 22:41:30 UTC (rev 24225)
+++ trunk/wp-admin/css/wp-admin.css 2013-05-09 22:45:14 UTC (rev 24226)
</span><span class="lines">@@ -4004,19 +4004,19 @@
</span><span class="cx"> margin-bottom: 15px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.wp-format-gallery .post-formats-fields,
-.wp-format-image .post-formats-fields,
-.wp-format-link .post-formats-fields,
-.wp-format-quote .post-formats-fields,
-.wp-format-video .post-formats-fields,
-.wp-format-audio .post-formats-fields,
-.wp-format-gallery .field.wp-format-gallery,
-.wp-format-image .field.wp-format-image,
-.wp-format-chat .field.wp-format-chat,
-.wp-format-link .field.wp-format-link,
-.wp-format-quote .field.wp-format-quote,
-.wp-format-video .field.wp-format-video,
-.wp-format-audio .field.wp-format-audio {
</del><ins>+#post-body-content.wp-format-gallery .post-formats-fields,
+#post-body-content.wp-format-image .post-formats-fields,
+#post-body-content.wp-format-link .post-formats-fields,
+#post-body-content.wp-format-quote .post-formats-fields,
+#post-body-content.wp-format-video .post-formats-fields,
+#post-body-content.wp-format-audio .post-formats-fields,
+#post-body-content.wp-format-gallery .field.wp-format-gallery,
+#post-body-content.wp-format-image .field.wp-format-image,
+#post-body-content.wp-format-chat .field.wp-format-chat,
+#post-body-content.wp-format-link .field.wp-format-link,
+#post-body-content.wp-format-quote .field.wp-format-quote,
+#post-body-content.wp-format-video .field.wp-format-video,
+#post-body-content.wp-format-audio .field.wp-format-audio {
</ins><span class="cx"> display: block;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4032,9 +4032,9 @@
</span><span class="cx"> font-size: 1.2em;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.wp-format-image label,
-.wp-format-video label,
-.wp-format-audio label {
</del><ins>+#post-body-content.wp-format-image label,
+#post-body-content.wp-format-video label,
+#post-body-content.wp-format-audio label {
</ins><span class="cx"> float: left;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4043,28 +4043,87 @@
</span><span class="cx"> overflow: hidden;
</span><span class="cx"> width: 40%;
</span><span class="cx"> height: auto;
</span><del>- padding: 55px 0 20px;
</del><span class="cx"> border: 1px dashed #dfdfdf;
</span><span class="cx"> background: #f5f5f5 url(../images/media-button-2x.png) no-repeat 50% 25%;
</span><ins>+ box-sizing: border-box;
+ position:relative;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .wp-format-media-holder:hover {
</span><span class="cx"> background-color: #eee;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.wp-format-media-holder.drag-over {
+ background: rgba( 0, 86, 132, 0.9 );
+ border-color:transparent;
+}
+
+.wp-format-media-holder div {
+ display: none;
+}
+.wp-format-media-holder.drag-over div {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ right: 10px;
+ bottom: 10px;
+ border: 1px dashed #fff;
+ display:block;
+}
+
+#poststuff .wp-format-media-holder.drag-over div h3 {
+
+ position: absolute;
+ top: 50%;
+ left: 0;
+ right: 0;
+ -webkit-transform: translateY( -50% );
+ -moz-transform: translateY( -50% );
+ -ms-transform: translateY( -50% );
+ -o-transform: translateY( -50% );
+ transform: translateY( -50% );
+
+ font-size: 20px;
+ font-weight: 200;
+ color: #fff;
+ padding: 0;
+ text-align:center;
+ font-family: sans-serif;
+}
+
+#post-body-content.wp-format-image .wp-format-media-holder {
+ margin-top: 17px;
+}
+
</ins><span class="cx"> .wp-format-media-preview {
</span><del>- margin-bottom: 20px;
</del><ins>+ margin: 20px 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-.wp-format-status #titlewrap,
-.wp-format-image .wp-media-buttons .insert-media,
-.wp-format-audio .wp-media-buttons .insert-media,
-.wp-format-video .wp-media-buttons .insert-media,
-.wp-format-aside .wp-media-buttons .insert-media,
-.wp-format-status .wp-media-buttons .insert-media {
</del><ins>+#image-preview img {
+ width: auto;
+ max-height: 300px;
+}
+
+#post-body-content .wp-format-image p.use-url-or-html {
+ padding-top: 10px;
+ clear: both;
+ width: 40%;
+ text-align: center;
+}
+
+body.wp-format-image .attachment-display-settings {
</ins><span class="cx"> display: none;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+body.wp-format-status #titlewrap,
+body.wp-format-image .wp-media-buttons .insert-media,
+body.wp-format-audio .wp-media-buttons .insert-media,
+body.wp-format-video .wp-media-buttons .insert-media,
+body.wp-format-aside .wp-media-buttons .insert-media,
+body.wp-format-status .wp-media-buttons .insert-media {
+ display: none;
+}
+
</ins><span class="cx"> .mejs-audio audio,
</span><span class="cx"> .mejs-video video {
</span><span class="cx"> display: block;
</span><span class="lines">@@ -4072,7 +4131,8 @@
</span><span class="cx">
</span><span class="cx"> .wp-format-media-select {
</span><span class="cx"> display: block;
</span><del>- height: 200px;
</del><ins>+ height: 20px;
+ padding: 55px 0 20px;
</ins><span class="cx"> text-align: center;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4081,10 +4141,6 @@
</span><span class="cx"> max-height: 100%;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.wp-format-media-select {
- height: 20px;
-}
-
</del><span class="cx"> .empty .wp-format-media-metaedit {
</span><span class="cx"> height: 20px;
</span><span class="cx"> display: block;
</span><span class="lines">@@ -4101,56 +4157,56 @@
</span><span class="cx"> #wp_format_video {
</span><span class="cx"> float: left;
</span><span class="cx"> margin-right: 23px;
</span><del>- max-width: 50%;
</del><ins>+ max-width: 40%;
</ins><span class="cx"> min-height: 97px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-standard,
</del><ins>+body.wp-format-standard #icon-edit,
</ins><span class="cx"> .post-format-options .standard {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -3px -4px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-image,
</del><ins>+body.wp-format-image #icon-edit,
</ins><span class="cx"> .post-format-options .image {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -43px -4px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-gallery,
</del><ins>+body.wp-format-gallery #icon-edit,
</ins><span class="cx"> .post-format-options .gallery {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -83px -4px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-audio,
</del><ins>+body.wp-format-audio #icon-edit,
</ins><span class="cx"> .post-format-options .audio {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -123px -4px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-video,
</del><ins>+body.wp-format-video #icon-edit,
</ins><span class="cx"> .post-format-options .video {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -163px -4px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-chat,
</del><ins>+body.wp-format-chat #icon-edit,
</ins><span class="cx"> .post-format-options .chat {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -202px -4px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-status,
</del><ins>+body.wp-format-status #icon-edit,
</ins><span class="cx"> .post-format-options .status {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -242px -4px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-aside,
</del><ins>+body.wp-format-aside #icon-edit,
</ins><span class="cx"> .post-format-options .aside {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -282px -4px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-quote,
</del><ins>+body.wp-format-quote #icon-edit,
</ins><span class="cx"> .post-format-options .quote {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -322px -4px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#icon-edit.wp-format-link,
</del><ins>+body.wp-format-link #icon-edit,
</ins><span class="cx"> .post-format-options .link {
</span><span class="cx"> background: url(../images/post-formats32.png) no-repeat -362px -4px;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadminincludespostformatsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/post-formats.php (24225 => 24226)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/post-formats.php 2013-05-09 22:41:30 UTC (rev 24225)
+++ trunk/wp-admin/includes/post-formats.php 2013-05-09 22:45:14 UTC (rev 24226)
</span><span class="lines">@@ -38,20 +38,25 @@
</span><span class="cx"> ?>
</span><span class="cx"> </div>
</span><span class="cx"> <?php endif ?>
</span><del>- <label for="wp_format_image"><?php
- if ( current_user_can( 'unfiltered_html' ) )
- _e( 'Image HTML or URL' );
- else
- _e( 'Image URL' );
- ?></label>
- <textarea id="wp_format_image" type="text" name="_format_image" class="widefat"><?php esc_html_e( $format_meta['image'] ); ?></textarea>
</del><span class="cx"> <div data-format="image" class="wp-format-media-holder hide-if-no-js">
</span><ins>+ <div><h3><?php _e( 'Drop image file to upload' ); ?></h3></div>
</ins><span class="cx"> <a href="#" class="wp-format-media-select"
</span><span class="cx"> data-choose="<?php esc_attr_e( 'Choose an Image' ); ?>"
</span><span class="cx"> data-update="<?php esc_attr_e( 'Select Image' ); ?>">
</span><span class="cx"> <?php _e( 'Select / Upload Image' ); ?>
</span><span class="cx"> </a>
</span><span class="cx"> </div>
</span><ins>+ <div class="wp-format-image-textarea hide-if-js">
+ <label for="wp_format_image"><?php
+ if ( current_user_can( 'unfiltered_html' ) )
+ _e( 'Image HTML or URL' );
+ else
+ _e( 'Image URL' );
+ ?></label>
+ <textarea id="wp_format_image" type="text" name="_format_image" class="widefat"><?php esc_html_e( $format_meta['image'] ); ?></textarea>
+ </div>
+ <p class="use-url-or-html hide-if-no-js"><span><?php printf( __( '(or %suse an image URL or HTML%s)' ), '<a href="#">', '</a>' ); ?></span>
+ <span style="display: none"><?php printf( __( '(or %sselect/upload an image%s)' ), '<a href="#">', '</a>' ); ?></span></p>
</ins><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div class="field wp-format-link">
</span></span></pre></div>
<a id="trunkwpadminjspostformatsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/post-formats.js (24225 => 24226)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/post-formats.js 2013-05-09 22:41:30 UTC (rev 24225)
+++ trunk/wp-admin/js/post-formats.js 2013-05-09 22:45:14 UTC (rev 24226)
</span><span class="lines">@@ -6,6 +6,7 @@
</span><span class="cx"> "use strict";
</span><span class="cx">
</span><span class="cx"> var mediaFrame, insertMediaButton, container, icon, formatField,
</span><ins>+ body,
</ins><span class="cx"> lastMimeType,
</span><span class="cx"> classRegex = /\s?\bwp-format-[^ ]+/g,
</span><span class="cx"> shortHeight = 120,
</span><span class="lines">@@ -17,16 +18,65 @@
</span><span class="cx"> shortContentFormats = ['status', 'aside'],
</span><span class="cx"> noUIFormats = ['standard', 'chat', 'status', 'aside', 'gallery'];
</span><span class="cx">
</span><ins>+ function imageFormatUploadProgress( uploader, file ) {
+ var $bar = $( '#' + uploader.settings.drop_element + ' .media-progress-bar div' );
+ $bar.width( file.percent + '%' );
+ }
+
+ function imageFormatUploadStart( uploader ) {
+ $( '#' + uploader.settings.drop_element + ' .wp-format-media-select' ).append('<div class="media-progress-bar"><div></div></div>');
+ }
+
+ function imageFormatUploadError() {
+ $( '.media-progress-bar', $('.wp-format-media-holder[data-format=image]') ).remove();
+ }
+
+ function imageFormatUploadSuccess( attachment ) {
+ var $holder, $field, html = wp.media.string.image({
+ size : 'full',
+ align : false,
+ link : getUserSetting( 'urlbutton' )
+ }, attachment.attributes );
+
+ $holder = $('.wp-format-media-holder[data-format=image]');
+ $( '.media-progress-bar', $holder ).remove();
+
+ if ( 'image' !== attachment.attributes.type )
+ return;
+
+ $field = $( '#wp_format_' + $holder.data( 'format' ) );
+
+ // set the hidden input's value
+ $field.val( html );
+
+ $( '#image-preview' ).remove();
+
+ $holder.parent().prepend( ['<div id="image-preview" class="wp-format-media-preview">',
+ '<img src="', attachment.get('url'), '"',
+ attachment.get('width') ? ' width="' + attachment.get('width') + '"' : '',
+ attachment.get('height') ? ' height="' + attachment.get('height') + '"' : '',
+ ' />',
+ '</div>'].join( '' ) );
+ }
+
+ var uploader = {
+ dropzone: $('.wp-format-media-holder[data-format=image]'),
+ success: imageFormatUploadSuccess,
+ error: imageFormatUploadError,
+ plupload: {},
+ params: {}
+ };
+ uploader = new wp.Uploader( uploader );
+ uploader.uploader.bind( 'BeforeUpload', imageFormatUploadStart );
+ uploader.uploader.bind( 'UploadProgress', imageFormatUploadProgress );
+
</ins><span class="cx"> function switchFormatClass( format ) {
</span><span class="cx"> formatField.val( format );
</span><span class="cx">
</span><del>- container
- .prop( 'className', container.prop( 'className' ).replace( classRegex, '' ) )
</del><ins>+ $.each( [ container, icon, body ], function(i, thing) {
+ thing.prop( 'className', thing.prop( 'className' ).replace( classRegex, '' ) )
</ins><span class="cx"> .addClass( 'wp-format-' + format );
</span><del>-
- icon
- .prop( 'className', icon.prop( 'className' ).replace( classRegex, '' ) )
- .addClass( 'wp-format-' + format );
</del><ins>+ });
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function resizeContent( format, noAnimate ) {
</span><span class="lines">@@ -137,6 +187,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> $(function () {
</span><ins>+ body = $( 'body' );
</ins><span class="cx"> container = $( '#post-body-content' );
</span><span class="cx"> icon = $( '.icon32' );
</span><span class="cx"> formatField = $( '#post_format' );
</span><span class="lines">@@ -163,6 +214,13 @@
</span><span class="cx"> switchFormat( $( e.currentTarget ) );
</span><span class="cx"> } );
</span><span class="cx">
</span><ins>+ // Toggle select/upload and URL/HTML for images
+ $( '.use-url-or-html' ).on( 'click', 'a', function(e) {
+ e.preventDefault();
+ $( '.wp-format-media-holder, .wp-format-image-textarea' ).toggle();
+ $(this).closest( 'p' ).find( 'span' ).toggle();
+ });
+
</ins><span class="cx"> // Media selection
</span><span class="cx"> $( '.wp-format-media-select' ).click( function (e) {
</span><span class="cx"> e.preventDefault();
</span><span class="lines">@@ -242,8 +300,8 @@
</span><span class="cx"> mediaPreview( attachment );
</span><span class="cx"> } else {
</span><span class="cx"> html = wp.media.string.image({
</span><del>- align : getUserSetting( 'align' ),
- size : getUserSetting( 'imgsize' ),
</del><ins>+ size: 'full',
+ align : false,
</ins><span class="cx"> link : getUserSetting( 'urlbutton' )
</span><span class="cx"> }, attachment);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludespostformatsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post-formats.php (24225 => 24226)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post-formats.php 2013-05-09 22:41:30 UTC (rev 24225)
+++ trunk/wp-includes/post-formats.php 2013-05-09 22:45:14 UTC (rev 24226)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> $_format = get_the_terms( $post->ID, 'post_format' );
</span><span class="cx">
</span><span class="cx"> if ( empty( $_format ) )
</span><del>- return false;
</del><ins>+ return '';
</ins><span class="cx">
</span><span class="cx"> $format = array_shift( $_format );
</span><span class="cx">
</span><span class="lines">@@ -1012,4 +1012,4 @@
</span><span class="cx"> $data['post_title'] = _post_formats_generate_title( $data['post_content'], $post_format );
</span><span class="cx">
</span><span class="cx"> return $data;
</span><del>-}
</del><span class="cx">\ No newline at end of file
</span><ins>+}
</ins></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (24225 => 24226)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php 2013-05-09 22:41:30 UTC (rev 24225)
+++ trunk/wp-includes/script-loader.php 2013-05-09 22:45:14 UTC (rev 24226)
</span><span class="lines">@@ -407,7 +407,7 @@
</span><span class="cx"> 'comma' => _x( ',', 'tag delimiter' ),
</span><span class="cx"> ) );
</span><span class="cx">
</span><del>- $scripts->add( 'post-formats', "/wp-admin/js/post-formats$suffix.js", array( 'media-models' ), false, 1 );
</del><ins>+ $scripts->add( 'post-formats', "/wp-admin/js/post-formats$suffix.js", array( 'media-models', 'wp-plupload' ), false, 1 );
</ins><span class="cx">
</span><span class="cx"> $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 );
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>