<!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>[21504] trunk: Remove post type from post nonces.</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/21504">21504</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2012-08-14 18:39:15 +0000 (Tue, 14 Aug 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove post type from post nonces. Fixes attachment deletion when EMPTY_TRASH_DAYS is 0. Props c3mdigital, kurtpayne, SergeyBiryukov. fixes <a href="http://core.trac.wordpress.org/ticket/21194">#21194</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincsscolorsclassicdevcss">trunk/wp-admin/css/colors-classic.dev.css</a></li>
<li><a href="#trunkwpadmincsscolorsfreshdevcss">trunk/wp-admin/css/colors-fresh.dev.css</a></li>
<li><a href="#trunkwpadmineditformadvancedphp">trunk/wp-admin/edit-form-advanced.php</a></li>
<li><a href="#trunkwpadminincludesajaxactionsphp">trunk/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunkwpadminincludesclasswpmedialisttablephp">trunk/wp-admin/includes/class-wp-media-list-table.php</a></li>
<li><a href="#trunkwpadminincludesclasswppostslisttablephp">trunk/wp-admin/includes/class-wp-posts-list-table.php</a></li>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminpostphp">trunk/wp-admin/post.php</a></li>
<li><a href="#trunkwpincludeslinktemplatephp">trunk/wp-includes/link-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincsscolorsclassicdevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/colors-classic.dev.css (21503 => 21504)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/colors-classic.dev.css        2012-08-14 18:38:26 UTC (rev 21503)
+++ trunk/wp-admin/css/colors-classic.dev.css        2012-08-14 18:39:15 UTC (rev 21504)
</span><span class="lines">@@ -516,7 +516,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .submitbox .submitdelete:hover,
</span><del>-#media-items a.delete:hover {
</del><ins>+#media-items a.delete:hover,
+#media-items a.delete-permanently:hover {
</ins><span class="cx">         color: #fff;
</span><span class="cx">         background-color: #f00;
</span><span class="cx">         border-bottom-color: #f00;
</span><span class="lines">@@ -607,6 +608,7 @@
</span><span class="cx"> #the-comment-list p.comment-author strong a,
</span><span class="cx"> #media-upload a.del-link,
</span><span class="cx"> #media-items a.delete,
</span><ins>+#media-items a.delete-permanently,
</ins><span class="cx"> .plugins a.delete,
</span><span class="cx"> .ui-tabs-nav a {
</span><span class="cx">         color: #21759b;
</span></span></pre></div>
<a id="trunkwpadmincsscolorsfreshdevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/colors-fresh.dev.css (21503 => 21504)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/colors-fresh.dev.css        2012-08-14 18:38:26 UTC (rev 21503)
+++ trunk/wp-admin/css/colors-fresh.dev.css        2012-08-14 18:39:15 UTC (rev 21504)
</span><span class="lines">@@ -507,7 +507,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .submitbox .submitdelete:hover,
</span><del>-#media-items a.delete:hover {
</del><ins>+#media-items a.delete:hover,
+#media-items a.delete-permanently:hover {
</ins><span class="cx">         color: #fff;
</span><span class="cx">         background-color: #f00;
</span><span class="cx">         border-bottom-color: #f00;
</span><span class="lines">@@ -598,6 +599,7 @@
</span><span class="cx"> #the-comment-list p.comment-author strong a,
</span><span class="cx"> #media-upload a.del-link,
</span><span class="cx"> #media-items a.delete,
</span><ins>+#media-items a.delete-permanently,
</ins><span class="cx"> .plugins a.delete,
</span><span class="cx"> .ui-tabs-nav a {
</span><span class="cx">         color: #21759b;
</span></span></pre></div>
<a id="trunkwpadmineditformadvancedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-form-advanced.php (21503 => 21504)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-form-advanced.php        2012-08-14 18:38:26 UTC (rev 21503)
+++ trunk/wp-admin/edit-form-advanced.php        2012-08-14 18:39:15 UTC (rev 21504)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> $form_action = 'editpost';
</span><del>-$nonce_action = 'update-' . $post_type . '_' . $post_ID;
</del><ins>+$nonce_action = 'update-post_' . $post_ID;
</ins><span class="cx"> $form_extra .= &quot;&lt;input type='hidden' id='post_ID' name='post_ID' value='&quot; . esc_attr($post_ID) . &quot;' /&gt;&quot;;
</span><span class="cx"> 
</span><span class="cx"> // Detect if there exists an autosave newer than the post and if that autosave is different than the post
</span></span></pre></div>
<a id="trunkwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ajax-actions.php (21503 => 21504)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ajax-actions.php        2012-08-14 18:38:26 UTC (rev 21503)
+++ trunk/wp-admin/includes/ajax-actions.php        2012-08-14 18:39:15 UTC (rev 21504)
</span><span class="lines">@@ -1727,7 +1727,7 @@
</span><span class="cx">         elseif ( isset( $_POST['post_type'] ) &amp;&amp; post_type_exists( $_POST['post_type'] ) )
</span><span class="cx">                 $post_type = $_POST['post_type'];
</span><span class="cx"> 
</span><del>-        check_ajax_referer('update-' . $post_type . '_' . $post_id, '_wpnonce');
</del><ins>+        check_ajax_referer('update-post_' . $post_id, '_wpnonce');
</ins><span class="cx"> 
</span><span class="cx">         $post_id = edit_post();
</span><span class="cx"> 
</span><span class="lines">@@ -1769,7 +1769,7 @@
</span><span class="cx">         if ( ! $post = get_post( $post_id ) )
</span><span class="cx">                 wp_die( 0 );
</span><span class="cx"> 
</span><del>-        check_ajax_referer( 'update-' . $post-&gt;post_type . '_' . $post_id );
</del><ins>+        check_ajax_referer( 'update-post_' . $post_id );
</ins><span class="cx"> 
</span><span class="cx">         if ( ! current_user_can( 'edit_post', $post_id ) )
</span><span class="cx">                 wp_die( -1 );
</span></span></pre></div>
<a id="trunkwpadminincludesclasswpmedialisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-media-list-table.php (21503 => 21504)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-media-list-table.php        2012-08-14 18:38:26 UTC (rev 21503)
+++ trunk/wp-admin/includes/class-wp-media-list-table.php        2012-08-14 18:39:15 UTC (rev 21504)
</span><span class="lines">@@ -360,10 +360,10 @@
</span><span class="cx">                                 $actions['edit'] = '&lt;a href=&quot;' . get_edit_post_link( $post-&gt;ID, true ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
</span><span class="cx">                         if ( current_user_can( 'delete_post', $post-&gt;ID ) )
</span><span class="cx">                                 if ( EMPTY_TRASH_DAYS &amp;&amp; MEDIA_TRASH ) {
</span><del>-                                        $actions['trash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$post-&gt;ID&quot;, 'trash-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Trash' ) . &quot;&lt;/a&gt;&quot;;
</del><ins>+                                        $actions['trash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$post-&gt;ID&quot;, 'trash-post_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Trash' ) . &quot;&lt;/a&gt;&quot;;
</ins><span class="cx">                                 } else {
</span><span class="cx">                                         $delete_ays = !MEDIA_TRASH ? &quot; onclick='return showNotice.warn();'&quot; : '';
</span><del>-                                        $actions['delete'] = &quot;&lt;a class='submitdelete'$delete_ays href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$post-&gt;ID&quot;, 'delete-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Delete Permanently' ) . &quot;&lt;/a&gt;&quot;;
</del><ins>+                                        $actions['delete'] = &quot;&lt;a class='submitdelete'$delete_ays href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$post-&gt;ID&quot;, 'delete-post_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Delete Permanently' ) . &quot;&lt;/a&gt;&quot;;
</ins><span class="cx">                                 }
</span><span class="cx">                         $actions['view'] = '&lt;a href=&quot;' . get_permalink( $post-&gt;ID ) . '&quot; title=&quot;' . esc_attr( sprintf( __( 'View &amp;#8220;%s&amp;#8221;' ), $att_title ) ) . '&quot; rel=&quot;permalink&quot;&gt;' . __( 'View' ) . '&lt;/a&gt;';
</span><span class="cx">                         if ( current_user_can( 'edit_post', $post-&gt;ID ) )
</span><span class="lines">@@ -374,12 +374,12 @@
</span><span class="cx">                                 $actions['edit'] = '&lt;a href=&quot;' . get_edit_post_link( $post-&gt;ID, true ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
</span><span class="cx">                         if ( current_user_can( 'delete_post', $post-&gt;ID ) ) {
</span><span class="cx">                                 if ( $this-&gt;is_trash )
</span><del>-                                        $actions['untrash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=untrash&amp;amp;post=$post-&gt;ID&quot;, 'untrash-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Restore' ) . &quot;&lt;/a&gt;&quot;;
</del><ins>+                                        $actions['untrash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=untrash&amp;amp;post=$post-&gt;ID&quot;, 'untrash-post_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Restore' ) . &quot;&lt;/a&gt;&quot;;
</ins><span class="cx">                                 elseif ( EMPTY_TRASH_DAYS &amp;&amp; MEDIA_TRASH )
</span><del>-                                        $actions['trash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$post-&gt;ID&quot;, 'trash-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Trash' ) . &quot;&lt;/a&gt;&quot;;
</del><ins>+                                        $actions['trash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$post-&gt;ID&quot;, 'trash-post_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Trash' ) . &quot;&lt;/a&gt;&quot;;
</ins><span class="cx">                                 if ( $this-&gt;is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) {
</span><span class="cx">                                         $delete_ays = ( !$this-&gt;is_trash &amp;&amp; !MEDIA_TRASH ) ? &quot; onclick='return showNotice.warn();'&quot; : '';
</span><del>-                                        $actions['delete'] = &quot;&lt;a class='submitdelete'$delete_ays href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$post-&gt;ID&quot;, 'delete-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Delete Permanently' ) . &quot;&lt;/a&gt;&quot;;
</del><ins>+                                        $actions['delete'] = &quot;&lt;a class='submitdelete'$delete_ays href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$post-&gt;ID&quot;, 'delete-post_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Delete Permanently' ) . &quot;&lt;/a&gt;&quot;;
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         if ( !$this-&gt;is_trash ) {
</span></span></pre></div>
<a id="trunkwpadminincludesclasswppostslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-posts-list-table.php (21503 => 21504)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-posts-list-table.php        2012-08-14 18:38:26 UTC (rev 21503)
+++ trunk/wp-admin/includes/class-wp-posts-list-table.php        2012-08-14 18:39:15 UTC (rev 21504)
</span><span class="lines">@@ -545,7 +545,7 @@
</span><span class="cx">                                 }
</span><span class="cx">                                 if ( current_user_can( $post_type_object-&gt;cap-&gt;delete_post, $post-&gt;ID ) ) {
</span><span class="cx">                                         if ( 'trash' == $post-&gt;post_status )
</span><del>-                                                $actions['untrash'] = &quot;&lt;a title='&quot; . esc_attr( __( 'Restore this item from the Trash' ) ) . &quot;' href='&quot; . wp_nonce_url( admin_url( sprintf( $post_type_object-&gt;_edit_link . '&amp;amp;action=untrash', $post-&gt;ID ) ), 'untrash-' . $post-&gt;post_type . '_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Restore' ) . &quot;&lt;/a&gt;&quot;;
</del><ins>+                                                $actions['untrash'] = &quot;&lt;a title='&quot; . esc_attr( __( 'Restore this item from the Trash' ) ) . &quot;' href='&quot; . wp_nonce_url( admin_url( sprintf( $post_type_object-&gt;_edit_link . '&amp;amp;action=untrash', $post-&gt;ID ) ), 'untrash-post_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Restore' ) . &quot;&lt;/a&gt;&quot;;
</ins><span class="cx">                                         elseif ( EMPTY_TRASH_DAYS )
</span><span class="cx">                                                 $actions['trash'] = &quot;&lt;a class='submitdelete' title='&quot; . esc_attr( __( 'Move this item to the Trash' ) ) . &quot;' href='&quot; . get_delete_post_link( $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Trash' ) . &quot;&lt;/a&gt;&quot;;
</span><span class="cx">                                         if ( 'trash' == $post-&gt;post_status || !EMPTY_TRASH_DAYS )
</span></span></pre></div>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (21503 => 21504)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2012-08-14 18:38:26 UTC (rev 21503)
+++ trunk/wp-admin/includes/media.php        2012-08-14 18:39:15 UTC (rev 21504)
</span><span class="lines">@@ -1156,16 +1156,16 @@
</span><span class="cx">                 $send = get_submit_button( __( 'Insert into Post' ), 'button', &quot;send[$attachment_id]&quot;, false );
</span><span class="cx">         if ( $delete &amp;&amp; current_user_can( 'delete_post', $attachment_id ) ) {
</span><span class="cx">                 if ( !EMPTY_TRASH_DAYS ) {
</span><del>-                        $delete = &quot;&lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$attachment_id&quot;, 'delete-attachment_' . $attachment_id ) . &quot;' id='del[$attachment_id]' class='delete'&gt;&quot; . __( 'Delete Permanently' ) . '&lt;/a&gt;';
</del><ins>+                        $delete = &quot;&lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$attachment_id&quot;, 'delete-post_' . $attachment_id ) . &quot;' id='del[$attachment_id]' class='delete-permanently'&gt;&quot; . __( 'Delete Permanently' ) . '&lt;/a&gt;';
</ins><span class="cx">                 } elseif ( !MEDIA_TRASH ) {
</span><span class="cx">                         $delete = &quot;&lt;a href='#' class='del-link' onclick=\&quot;document.getElementById('del_attachment_$attachment_id').style.display='block';return false;\&quot;&gt;&quot; . __( 'Delete' ) . &quot;&lt;/a&gt;
</span><span class="cx">                          &lt;div id='del_attachment_$attachment_id' class='del-attachment' style='display:none;'&gt;&lt;p&gt;&quot; . sprintf( __( 'You are about to delete &lt;strong&gt;%s&lt;/strong&gt;.' ), $filename ) . &quot;&lt;/p&gt;
</span><del>-                         &lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$attachment_id&quot;, 'delete-attachment_' . $attachment_id ) . &quot;' id='del[$attachment_id]' class='button'&gt;&quot; . __( 'Continue' ) . &quot;&lt;/a&gt;
</del><ins>+                         &lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$attachment_id&quot;, 'delete-post_' . $attachment_id ) . &quot;' id='del[$attachment_id]' class='button'&gt;&quot; . __( 'Continue' ) . &quot;&lt;/a&gt;
</ins><span class="cx">                          &lt;a href='#' class='button' onclick=\&quot;this.parentNode.style.display='none';return false;\&quot;&gt;&quot; . __( 'Cancel' ) . &quot;&lt;/a&gt;
</span><span class="cx">                          &lt;/div&gt;&quot;;
</span><span class="cx">                 } else {
</span><del>-                        $delete = &quot;&lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$attachment_id&quot;, 'trash-attachment_' . $attachment_id ) . &quot;' id='del[$attachment_id]' class='delete'&gt;&quot; . __( 'Move to Trash' ) . &quot;&lt;/a&gt;
-                        &lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=untrash&amp;amp;post=$attachment_id&quot;, 'untrash-attachment_' . $attachment_id ) . &quot;' id='undo[$attachment_id]' class='undo hidden'&gt;&quot; . __( 'Undo' ) . &quot;&lt;/a&gt;&quot;;
</del><ins>+                        $delete = &quot;&lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$attachment_id&quot;, 'trash-post_' . $attachment_id ) . &quot;' id='del[$attachment_id]' class='delete'&gt;&quot; . __( 'Move to Trash' ) . &quot;&lt;/a&gt;
+                        &lt;a href='&quot; . wp_nonce_url( &quot;post.php?action=untrash&amp;amp;post=$attachment_id&quot;, 'untrash-post_' . $attachment_id ) . &quot;' id='undo[$attachment_id]' class='undo hidden'&gt;&quot; . __( 'Undo' ) . &quot;&lt;/a&gt;&quot;;
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><span class="cx">                 $delete = '';
</span></span></pre></div>
<a id="trunkwpadminpostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/post.php (21503 => 21504)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/post.php        2012-08-14 18:38:26 UTC (rev 21503)
+++ trunk/wp-admin/post.php        2012-08-14 18:39:15 UTC (rev 21504)
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx"> case 'editattachment':
</span><del>-        check_admin_referer('update-attachment_' . $post_id);
</del><ins>+        check_admin_referer('update-post_' . $post_id);
</ins><span class="cx"> 
</span><span class="cx">         // Don't let these be changed
</span><span class="cx">         unset($_POST['guid']);
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx">         wp_update_attachment_metadata( $post_id, $newmeta );
</span><span class="cx"> 
</span><span class="cx"> case 'editpost':
</span><del>-        check_admin_referer('update-' . $post_type . '_' . $post_id);
</del><ins>+        check_admin_referer('update-post_' . $post_id);
</ins><span class="cx"> 
</span><span class="cx">         $post_id = edit_post();
</span><span class="cx"> 
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx"> case 'trash':
</span><del>-        check_admin_referer('trash-' . $post_type . '_' . $post_id);
</del><ins>+        check_admin_referer('trash-post_' . $post_id);
</ins><span class="cx"> 
</span><span class="cx">         $post = &amp; get_post($post_id);
</span><span class="cx"> 
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx"> case 'untrash':
</span><del>-        check_admin_referer('untrash-' . $post_type . '_' . $post_id);
</del><ins>+        check_admin_referer('untrash-post_' . $post_id);
</ins><span class="cx"> 
</span><span class="cx">         if ( !current_user_can($post_type_object-&gt;cap-&gt;delete_post, $post_id) )
</span><span class="cx">                 wp_die( __('You are not allowed to move this item out of the Trash.') );
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx"> case 'delete':
</span><del>-        check_admin_referer('delete-' . $post_type . '_' . $post_id);
</del><ins>+        check_admin_referer('delete-post_' . $post_id);
</ins><span class="cx"> 
</span><span class="cx">         if ( !current_user_can($post_type_object-&gt;cap-&gt;delete_post, $post_id) )
</span><span class="cx">                 wp_die( __('You are not allowed to delete this item.') );
</span></span></pre></div>
<a id="trunkwpincludeslinktemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/link-template.php (21503 => 21504)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/link-template.php        2012-08-14 18:38:26 UTC (rev 21503)
+++ trunk/wp-includes/link-template.php        2012-08-14 18:39:15 UTC (rev 21504)
</span><span class="lines">@@ -971,7 +971,7 @@
</span><span class="cx"> 
</span><span class="cx">         $delete_link = add_query_arg( 'action', $action, admin_url( sprintf( $post_type_object-&gt;_edit_link, $post-&gt;ID ) ) );
</span><span class="cx"> 
</span><del>-        return apply_filters( 'get_delete_post_link', wp_nonce_url( $delete_link, &quot;$action-{$post-&gt;post_type}_{$post-&gt;ID}&quot; ), $post-&gt;ID, $force_delete );
</del><ins>+        return apply_filters( 'get_delete_post_link', wp_nonce_url( $delete_link, &quot;$action-post_{$post-&gt;ID}&quot; ), $post-&gt;ID, $force_delete );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre>
</div>
</div>

</body>
</html>