<!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>[22994] trunk: In the QuickPress media modal, use the new post id when a post is published.</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/22994">22994</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2012-12-03 07:17:10 +0000 (Mon, 03 Dec 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>In the QuickPress media modal, use the new post id when a post is published.

Props nacin, koopersmith
fixes <a href="http://core.trac.wordpress.org/ticket/22673">#22673</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesajaxactionsphp">trunk/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunkwpadminincludesdashboardphp">trunk/wp-admin/includes/dashboard.php</a></li>
<li><a href="#trunkwpincludesjsmediaeditorjs">trunk/wp-includes/js/media-editor.js</a></li>
<li><a href="#trunkwpincludesjsmediamodelsjs">trunk/wp-includes/js/media-models.js</a></li>
<li><a href="#trunkwpincludesjsmediaviewsjs">trunk/wp-includes/js/media-views.js</a></li>
<li><a href="#trunkwpincludesjspluploadwppluploadjs">trunk/wp-includes/js/plupload/wp-plupload.js</a></li>
<li><a href="#trunkwpincludesmediaphp">trunk/wp-includes/media.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="trunkwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ajax-actions.php (22993 => 22994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ajax-actions.php        2012-12-03 07:04:34 UTC (rev 22993)
+++ trunk/wp-admin/includes/ajax-actions.php        2012-12-03 07:17:10 UTC (rev 22994)
</span><span class="lines">@@ -1674,7 +1674,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function wp_ajax_set_post_thumbnail() {
</span><del>-        $json = ! empty( $_REQUEST['json'] );
</del><ins>+        $json = ! empty( $_REQUEST['json'] ); // New-style request
</ins><span class="cx"> 
</span><span class="cx">         $post_ID = intval( $_POST['post_id'] );
</span><span class="cx">         if ( !current_user_can( 'edit_post', $post_ID ) ) {
</span><span class="lines">@@ -1682,7 +1682,10 @@
</span><span class="cx">         }
</span><span class="cx">         $thumbnail_id = intval( $_POST['thumbnail_id'] );
</span><span class="cx"> 
</span><del>-        check_ajax_referer( &quot;set_post_thumbnail-$post_ID&quot; );
</del><ins>+        if ( $json )
+                check_ajax_referer( &quot;update-post_$post_ID&quot; );
+        else
+                check_ajax_referer( &quot;set_post_thumbnail-$post_ID&quot; );
</ins><span class="cx"> 
</span><span class="cx">         if ( $thumbnail_id == '-1' ) {
</span><span class="cx">                 if ( delete_post_thumbnail( $post_ID ) ) {
</span></span></pre></div>
<a id="trunkwpadminincludesdashboardphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/dashboard.php (22993 => 22994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/dashboard.php        2012-12-03 07:04:34 UTC (rev 22993)
+++ trunk/wp-admin/includes/dashboard.php        2012-12-03 07:17:10 UTC (rev 22994)
</span><span class="lines">@@ -505,6 +505,16 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         $post_ID = (int) $post-&gt;ID;
</span><ins>+
+        $media_settings = array(
+                'id' =&gt; $post-&gt;ID,
+                'nonce' =&gt; wp_create_nonce( 'update-post_' . $post-&gt;ID ),
+        );
+
+        if ( current_theme_supports( 'post-thumbnails', $post-&gt;post_type ) &amp;&amp; post_type_supports( $post-&gt;post_type, 'thumbnail' ) ) {
+                $featured_image_id = get_post_meta( $post-&gt;ID, '_thumbnail_id', true );
+                $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
+        }
</ins><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;form name=&quot;post&quot; action=&quot;&lt;?php echo esc_url( admin_url( 'post.php' ) ); ?&gt;&quot; method=&quot;post&quot; id=&quot;quick-press&quot;&gt;
</span><span class="lines">@@ -524,7 +534,15 @@
</span><span class="cx">                         &lt;textarea name=&quot;content&quot; id=&quot;content&quot; class=&quot;mceEditor&quot; rows=&quot;3&quot; cols=&quot;15&quot;&gt;&lt;?php echo esc_textarea( $post-&gt;post_content ); ?&gt;&lt;/textarea&gt;
</span><span class="cx">                 &lt;/div&gt;
</span><span class="cx"> 
</span><del>-                &lt;script type=&quot;text/javascript&quot;&gt;edCanvas = document.getElementById('content');edInsertContent = null;&lt;/script&gt;
</del><ins>+                &lt;script type=&quot;text/javascript&quot;&gt;
+                edCanvas = document.getElementById('content');
+                edInsertContent = null;
+                &lt;?php if ( $_POST ) : ?&gt;
+                wp.media.editor.remove('content');
+                wp.media.view.settings.post = &lt;?php echo json_encode( $media_settings ); // big juicy hack. ?&gt;;
+                wp.media.editor.add('content');
+                &lt;?php endif; ?&gt;
+                &lt;/script&gt;
</ins><span class="cx"> 
</span><span class="cx">                 &lt;div class=&quot;input-text-wrap&quot; id=&quot;tags-input-wrap&quot;&gt;
</span><span class="cx">                         &lt;label class=&quot;screen-reader-text prompt&quot; for=&quot;tags-input&quot; id=&quot;tags-input-prompt-text&quot;&gt;&lt;?php _e( 'Tags (separate with commas)' ); ?&gt;&lt;/label&gt;
</span></span></pre></div>
<a id="trunkwpincludesjsmediaeditorjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/media-editor.js (22993 => 22994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/media-editor.js        2012-12-03 07:04:34 UTC (rev 22993)
+++ trunk/wp-includes/js/media-editor.js        2012-12-03 07:17:10 UTC (rev 22994)
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx">                 return {
</span><span class="cx">                         defaults: {
</span><span class="cx">                                 order:      'ASC',
</span><del>-                                id:         wp.media.view.settings.postId,
</del><ins>+                                id:         wp.media.view.settings.post.id,
</ins><span class="cx">                                 itemtag:    'dl',
</span><span class="cx">                                 icontag:    'dt',
</span><span class="cx">                                 captiontag: 'dd',
</span><span class="lines">@@ -439,18 +439,17 @@
</span><span class="cx"> 
</span><span class="cx">                         workflow.state('featured-image').on( 'select', function() {
</span><span class="cx">                                 var settings = wp.media.view.settings,
</span><del>-                                        featuredImage = settings.featuredImage,
</del><span class="cx">                                         selection = this.get('selection').single();
</span><span class="cx"> 
</span><del>-                                if ( ! featuredImage )
</del><ins>+                                if ( ! settings.post.featuredImageId )
</ins><span class="cx">                                         return;
</span><span class="cx"> 
</span><del>-                                featuredImage.id = selection ? selection.id : -1;
</del><ins>+                                settings.post.featuredImageId = selection ? selection.id : -1;
</ins><span class="cx">                                 wp.media.post( 'set-post-thumbnail', {
</span><span class="cx">                                         json:         true,
</span><del>-                                        post_id:      settings.postId,
-                                        thumbnail_id: featuredImage.id,
-                                        _wpnonce:     featuredImage.nonce
</del><ins>+                                        post_id:      settings.post.id,
+                                        thumbnail_id: settings.post.featuredImageId,
+                                        _wpnonce:     settings.post.nonce
</ins><span class="cx">                                 }).done( function( html ) {
</span><span class="cx">                                         $( '.inside', '#postimagediv' ).html( html );
</span><span class="cx">                                 });
</span><span class="lines">@@ -526,7 +525,7 @@
</span><span class="cx">                                         nonce:      wp.media.view.settings.nonce.sendToEditor,
</span><span class="cx">                                         attachment: options,
</span><span class="cx">                                         html:       html,
</span><del>-                                        post_id:    wp.media.view.settings.postId
</del><ins>+                                        post_id:    wp.media.view.settings.post.id
</ins><span class="cx">                                 }).done( function( resp ) {
</span><span class="cx">                                         wp.media.editor.insert( resp );
</span><span class="cx">                                 });
</span><span class="lines">@@ -538,7 +537,7 @@
</span><span class="cx">                                         src:     embed.linkUrl,
</span><span class="cx">                                         title:   embed.title,
</span><span class="cx">                                         html:    wp.media.string.link( embed ),
</span><del>-                                        post_id: wp.media.view.settings.postId
</del><ins>+                                        post_id: wp.media.view.settings.post.id
</ins><span class="cx">                                 }).done( function( resp ) {
</span><span class="cx">                                         wp.media.editor.insert( resp );
</span><span class="cx">                                 });
</span><span class="lines">@@ -614,7 +613,7 @@
</span><span class="cx"> 
</span><span class="cx">                         // Update the featured image id when the 'remove' link is clicked.
</span><span class="cx">                         }).on( 'click', '#remove-post-thumbnail', function() {
</span><del>-                                wp.media.view.settings.featuredImage.id = -1;
</del><ins>+                                wp.media.view.settings.post.featuredImageId = -1;
</ins><span class="cx">                         });
</span><span class="cx">                 }
</span><span class="cx">         };
</span></span></pre></div>
<a id="trunkwpincludesjsmediamodelsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/media-models.js (22993 => 22994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/media-models.js        2012-12-03 07:04:34 UTC (rev 22993)
+++ trunk/wp-includes/js/media-models.js        2012-12-03 07:17:10 UTC (rev 22994)
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx">                                         action:  'save-attachment',
</span><span class="cx">                                         id:      this.id,
</span><span class="cx">                                         nonce:   this.get('nonces').update,
</span><del>-                                        post_id: media.model.settings.postId
</del><ins>+                                        post_id: media.model.settings.post.id
</ins><span class="cx">                                 });
</span><span class="cx"> 
</span><span class="cx">                                 // Record the values of the changed attributes.
</span><span class="lines">@@ -289,7 +289,7 @@
</span><span class="cx">                         return media.post( 'save-attachment-compat', _.defaults({
</span><span class="cx">                                 id:      this.id,
</span><span class="cx">                                 nonce:   this.get('nonces').update,
</span><del>-                                post_id: media.model.settings.postId
</del><ins>+                                post_id: media.model.settings.post.id
</ins><span class="cx">                         }, data ) ).done( function( resp, status, xhr ) {
</span><span class="cx">                                 model.set( model.parse( resp, xhr ), options );
</span><span class="cx">                         });
</span><span class="lines">@@ -548,8 +548,8 @@
</span><span class="cx">                                 return;
</span><span class="cx"> 
</span><span class="cx">                         return media.post( 'save-attachment-order', {
</span><del>-                                nonce:       media.model.settings.updatePostNonce,
-                                post_id:     media.model.settings.postId,
</del><ins>+                                nonce:       media.model.settings.post.nonce,
+                                post_id:     media.model.settings.post.id,
</ins><span class="cx">                                 attachments: attachments
</span><span class="cx">                         });
</span><span class="cx">                 }
</span><span class="lines">@@ -705,7 +705,7 @@
</span><span class="cx">                                 options.context = this;
</span><span class="cx">                                 options.data = _.extend( options.data || {}, {
</span><span class="cx">                                         action:  'query-attachments',
</span><del>-                                        post_id: media.model.settings.postId
</del><ins>+                                        post_id: media.model.settings.post.id
</ins><span class="cx">                                 });
</span><span class="cx"> 
</span><span class="cx">                                 // Clone the args so manipulation is non-destructive.
</span></span></pre></div>
<a id="trunkwpincludesjsmediaviewsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/media-views.js (22993 => 22994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/media-views.js        2012-12-03 07:04:34 UTC (rev 22993)
+++ trunk/wp-includes/js/media-views.js        2012-12-03 07:17:10 UTC (rev 22994)
</span><span class="lines">@@ -12,9 +12,8 @@
</span><span class="cx">         media.view.settings = l10n.settings || {};
</span><span class="cx">         delete l10n.settings;
</span><span class="cx"> 
</span><del>-        // Copy the `postId` setting over to the model settings.
-        media.model.settings.postId = media.view.settings.postId;
-        media.model.settings.updatePostNonce = media.view.settings.nonce.updatePost;
</del><ins>+        // Copy the `post` setting over to the model settings.
+        media.model.settings.post = media.view.settings.post;
</ins><span class="cx"> 
</span><span class="cx">         // Check if the browser supports CSS 3.0 transitions
</span><span class="cx">         $.support.transition = (function(){
</span><span class="lines">@@ -607,7 +606,7 @@
</span><span class="cx"> 
</span><span class="cx">                 activate: function() {
</span><span class="cx">                         var selection = this.get('selection'),
</span><del>-                                id = media.view.settings.featuredImage.id,
</del><ins>+                                id = media.view.settings.post.featuredImageId,
</ins><span class="cx">                                 attachment;
</span><span class="cx"> 
</span><span class="cx">                         if ( '' !== id &amp;&amp; -1 !== id ) {
</span><span class="lines">@@ -1483,7 +1482,7 @@
</span><span class="cx">                         ]);
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-                        if ( media.view.settings.featuredImage ) {
</del><ins>+                        if ( media.view.settings.post.featuredImageId ) {
</ins><span class="cx">                                 this.states.add( new media.controller.FeaturedImage({
</span><span class="cx">                                         controller: this,
</span><span class="cx">                                         menu:       'main'
</span><span class="lines">@@ -1535,7 +1534,7 @@
</span><span class="cx">                                 }
</span><span class="cx">                         });
</span><span class="cx"> 
</span><del>-                        if ( media.view.settings.featuredImage ) {
</del><ins>+                        if ( media.view.settings.post.featuredImageId ) {
</ins><span class="cx">                                 this.menu.view().set( 'featured-image', {
</span><span class="cx">                                         text: l10n.featuredImageTitle,
</span><span class="cx">                                         priority: 100
</span><span class="lines">@@ -1862,7 +1861,7 @@
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 ready: function() {
</span><del>-                        var postId = media.view.settings.postId,
</del><ins>+                        var postId = media.view.settings.post.id,
</ins><span class="cx">                                 dropzone;
</span><span class="cx"> 
</span><span class="cx">                         // If the uploader already exists, bail.
</span><span class="lines">@@ -1913,7 +1912,7 @@
</span><span class="cx">                                 this.options.$browser = this.controller.uploader.$browser;
</span><span class="cx"> 
</span><span class="cx">                         if ( _.isUndefined( this.options.postId ) )
</span><del>-                                this.options.postId = media.view.settings.postId;
</del><ins>+                                this.options.postId = media.view.settings.post.id;
</ins><span class="cx"> 
</span><span class="cx">                         this.views.set( '.upload-inline-status', new media.view.UploaderStatus({
</span><span class="cx">                                 controller: this.controller
</span><span class="lines">@@ -3077,10 +3076,11 @@
</span><span class="cx">                         change: 'change'
</span><span class="cx">                 },
</span><span class="cx"> 
</span><del>-                filters: {},
</del><span class="cx">                 keys: [],
</span><span class="cx"> 
</span><span class="cx">                 initialize: function() {
</span><ins>+                        this.createFilters();
+
</ins><span class="cx">                         // Build `&lt;option&gt;` elements.
</span><span class="cx">                         this.$el.html( _.chain( this.filters ).map( function( filter, value ) {
</span><span class="cx">                                 return {
</span><span class="lines">@@ -3093,6 +3093,10 @@
</span><span class="cx">                         this.select();
</span><span class="cx">                 },
</span><span class="cx"> 
</span><ins>+                createFilters: function() {
+                        this.filters = {};
+                },
+
</ins><span class="cx">                 change: function( event ) {
</span><span class="cx">                         var filter = this.filters[ this.el.value ];
</span><span class="cx"> 
</span><span class="lines">@@ -3119,31 +3123,33 @@
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         media.view.AttachmentFilters.Uploaded = media.view.AttachmentFilters.extend({
</span><del>-                filters: {
-                        all: {
-                                text:  l10n.allMediaItems,
-                                props: {
-                                        uploadedTo: null,
-                                        orderby: 'date',
-                                        order:   'DESC'
</del><ins>+                createFilters: function() {
+                        this.filters = {
+                                all: {
+                                        text:  l10n.allMediaItems,
+                                        props: {
+                                                uploadedTo: null,
+                                                orderby: 'date',
+                                                order:   'DESC'
+                                        },
+                                        priority: 10
</ins><span class="cx">                                 },
</span><del>-                                priority: 10
-                        },
</del><span class="cx"> 
</span><del>-                        uploaded: {
-                                text:  l10n.uploadedToThisPost,
-                                props: {
-                                        uploadedTo: media.view.settings.postId,
-                                        orderby: 'menuOrder',
-                                        order:   'ASC'
-                                },
-                                priority: 20
-                        }
</del><ins>+                                uploaded: {
+                                        text:  l10n.uploadedToThisPost,
+                                        props: {
+                                                uploadedTo: media.view.settings.post.id,
+                                                orderby: 'menuOrder',
+                                                order:   'ASC'
+                                        },
+                                        priority: 20
+                                }
+                        };
</ins><span class="cx">                 }
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         media.view.AttachmentFilters.All = media.view.AttachmentFilters.extend({
</span><del>-                filters: (function() {
</del><ins>+                createFilters: function() {
</ins><span class="cx">                         var filters = {};
</span><span class="cx"> 
</span><span class="cx">                         _.each( media.view.settings.mimeTypes || {}, function( text, key ) {
</span><span class="lines">@@ -3173,15 +3179,15 @@
</span><span class="cx">                                 text:  l10n.uploadedToThisPost,
</span><span class="cx">                                 props: {
</span><span class="cx">                                         type:    null,
</span><del>-                                        uploadedTo: media.view.settings.postId,
</del><ins>+                                        uploadedTo: media.view.settings.post.id,
</ins><span class="cx">                                         orderby: 'menuOrder',
</span><span class="cx">                                         order:   'ASC'
</span><span class="cx">                                 },
</span><span class="cx">                                 priority: 20
</span><span class="cx">                         };
</span><span class="cx"> 
</span><del>-                        return filters;
-                }())
</del><ins>+                        this.filters = filters;
+                }
</ins><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesjspluploadwppluploadjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/plupload/wp-plupload.js (22993 => 22994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/plupload/wp-plupload.js        2012-12-03 07:04:34 UTC (rev 22993)
+++ trunk/wp-includes/js/plupload/wp-plupload.js        2012-12-03 07:17:10 UTC (rev 22994)
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx">                                         date:      new Date(),
</span><span class="cx">                                         filename:  file.name,
</span><span class="cx">                                         menuOrder: 0,
</span><del>-                                        uploadedTo: wp.media.model.settings.postId
</del><ins>+                                        uploadedTo: wp.media.model.settings.post.id
</ins><span class="cx">                                 }, _.pick( file, 'loaded', 'size', 'percent' ) );
</span><span class="cx"> 
</span><span class="cx">                                 // Handle early mime type scanning for images.
</span></span></pre></div>
<a id="trunkwpincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/media.php (22993 => 22994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/media.php        2012-12-03 07:04:34 UTC (rev 22993)
+++ trunk/wp-includes/media.php        2012-12-03 07:17:10 UTC (rev 22994)
</span><span class="lines">@@ -1427,23 +1427,22 @@
</span><span class="cx">                 'nonce'     =&gt; array(
</span><span class="cx">                         'sendToEditor' =&gt; wp_create_nonce( 'media-send-to-editor' ),
</span><span class="cx">                 ),
</span><del>-                'postId'    =&gt; 0,
</del><ins>+                'post'    =&gt; array(
+                        'id' =&gt; 0,
+                ),
</ins><span class="cx">         );
</span><span class="cx"> 
</span><span class="cx">         $post = null;
</span><span class="cx">         if ( isset( $args['post'] ) ) {
</span><span class="cx">                 $post = get_post( $args['post'] );
</span><del>-                $settings['postId'] = $post-&gt;ID;
-                $settings['nonce']['updatePost'] = wp_create_nonce( 'update-post_' . $post-&gt;ID );
</del><ins>+                $settings['post'] = array(
+                        'id' =&gt; $post-&gt;ID,
+                        'nonce' =&gt; wp_create_nonce( 'update-post_' . $post-&gt;ID ),
+                );
</ins><span class="cx"> 
</span><span class="cx">                 if ( current_theme_supports( 'post-thumbnails', $post-&gt;post_type ) &amp;&amp; post_type_supports( $post-&gt;post_type, 'thumbnail' ) ) {
</span><del>-
-                        $featuredImageId = get_post_meta( $post-&gt;ID, '_thumbnail_id', true );
-
-                        $settings['featuredImage'] = array(
-                                'id'    =&gt; $featuredImageId ? $featuredImageId : -1,
-                                'nonce' =&gt; wp_create_nonce( 'set_post_thumbnail-' . $post-&gt;ID ),
-                        );
</del><ins>+                        $featured_image_id = get_post_meta( $post-&gt;ID, '_thumbnail_id', true );
+                        $settings['post']['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (22993 => 22994)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2012-12-03 07:04:34 UTC (rev 22993)
+++ trunk/wp-includes/script-loader.php        2012-12-03 07:17:10 UTC (rev 22994)
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx">         did_action( 'init' ) &amp;&amp; $scripts-&gt;localize( 'media-models', '_wpMediaModelsL10n', array(
</span><span class="cx">                 'settings' =&gt; array(
</span><span class="cx">                         'ajaxurl' =&gt; admin_url( 'admin-ajax.php', 'relative' ),
</span><del>-                        'postId'  =&gt; 0,
</del><ins>+                        'post' =&gt; array( 'id' =&gt; 0 ),
</ins><span class="cx">                 ),
</span><span class="cx">         ) );
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>