<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre, #msg p { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[11952] trunk/wp-admin: Add "View trash"
link to the notice after moving to the trash</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/11952">11952</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2009-09-19 01:06:17 +0000 (Sat, 19 Sep 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add "View trash" link to the notice after moving to the trash</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmineditcommentsphp">trunk/wp-admin/edit-comments.php</a></li>
<li><a href="#trunkwpadmineditpagesphp">trunk/wp-admin/edit-pages.php</a></li>
<li><a href="#trunkwpadmineditphp">trunk/wp-admin/edit.php</a></li>
<li><a href="#trunkwpadminuploadphp">trunk/wp-admin/upload.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmineditcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-comments.php (11951 => 11952)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-comments.php        2009-09-18 21:06:23 UTC (rev 11951)
+++ trunk/wp-admin/edit-comments.php        2009-09-19 01:06:17 UTC (rev 11952)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 if ( $trashed > 0 ) {
</span><span class="cx">                         printf( _n( '%s comment moved to the trash', '%s comments moved to the trash', $trashed ), $trashed );
</span><del>-                        echo '<br />';
</del><ins>+                        echo ' <a href="' . admin_url('edit-comments.php?comment_status=trash') . '">' . __('View trash') . '</a><br />';
</ins><span class="cx">                 }
</span><span class="cx">                 if ( $untrashed > 0 ) {
</span><span class="cx">                         printf( _n( '%s comment restored from the trash', '%s comments restored from the trash', $untrashed ), $untrashed );
</span></span></pre></div>
<a id="trunkwpadmineditpagesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-pages.php (11951 => 11952)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-pages.php        2009-09-18 21:06:23 UTC (rev 11951)
+++ trunk/wp-admin/edit-pages.php        2009-09-19 01:06:17 UTC (rev 11952)
</span><span class="lines">@@ -163,6 +163,7 @@
</span><span class="cx"> }
</span><span class="cx"> if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) {
</span><span class="cx">         printf( _n( 'Page moved to the trash.', '%s pages moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) );
</span><ins>+        echo ' <a href="' . admin_url('edit-pages.php?post_status=trash') . '">' . __('View trash') . '</a> ';
</ins><span class="cx">         unset($_GET['trashed']);
</span><span class="cx"> }
</span><span class="cx"> if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) {
</span></span></pre></div>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (11951 => 11952)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2009-09-18 21:06:23 UTC (rev 11951)
+++ trunk/wp-admin/edit.php        2009-09-19 01:06:17 UTC (rev 11952)
</span><span class="lines">@@ -167,6 +167,7 @@
</span><span class="cx">
</span><span class="cx"> if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) {
</span><span class="cx">         printf( _n( 'Post moved to the trash.', '%s posts moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) );
</span><ins>+        echo ' <a href="' . admin_url('edit.php?post_status=trash') . '">' . __('View trash') . '</a> ';
</ins><span class="cx">         unset($_GET['trashed']);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upload.php (11951 => 11952)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upload.php        2009-09-18 21:06:23 UTC (rev 11951)
+++ trunk/wp-admin/upload.php        2009-09-19 01:06:17 UTC (rev 11952)
</span><span class="lines">@@ -165,9 +165,20 @@
</span><span class="cx"> $is_trash = ( isset($_GET['status']) && $_GET['status'] == 'trash' );
</span><span class="cx">
</span><span class="cx"> wp_enqueue_script('media');
</span><del>-require_once('admin-header.php'); ?>
</del><ins>+require_once('admin-header.php');
</ins><span class="cx">
</span><del>-<?php
</del><ins>+do_action('restrict_manage_posts');
+?>
+
+<div class="wrap">
+<?php screen_icon(); ?>
+<h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
+if ( isset($_GET['s']) && $_GET['s'] )
+        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
+</h2>
+
+<?php
+$message = '';
</ins><span class="cx"> if ( isset($_GET['posted']) && (int) $_GET['posted'] ) {
</span><span class="cx">         $_GET['message'] = '1';
</span><span class="cx">         $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
</span><span class="lines">@@ -179,33 +190,35 @@
</span><span class="cx">         $_SERVER['REQUEST_URI'] = remove_query_arg(array('attached'), $_SERVER['REQUEST_URI']);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+if ( isset($_GET['deleted']) && (int) $_GET['deleted'] ) {
+        $_GET['message'] = '2';
+        $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);
+}
+
+if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) {
+        $_GET['message'] = '4';
+        $_SERVER['REQUEST_URI'] = remove_query_arg(array('trashed'), $_SERVER['REQUEST_URI']);
+}
+
+if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) {
+        $_GET['message'] = '5';
+        $_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']);
+}
+
</ins><span class="cx"> $messages[1] = __('Media attachment updated.');
</span><del>-$messages[2] = __('Media deleted.');
</del><ins>+$messages[2] = __('Media permanently deleted.');
</ins><span class="cx"> $messages[3] = __('Error saving media attachment.');
</span><del>-$messages[4] = __('Media moved to Trash.');
-$messages[5] = __('Media removed from Trash.');
</del><ins>+$messages[4] = __('Media moved to the trash.') . ' <a href="' . admin_url('upload.php?status=trash') . '">' . __('View trash') . '</a> ';
+$messages[5] = __('Media restored from the trash.');
</ins><span class="cx">
</span><span class="cx"> if ( isset($_GET['message']) && (int) $_GET['message'] ) {
</span><span class="cx">         $message = $messages[$_GET['message']];
</span><span class="cx">         $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
</span><span class="cx"> }
</span><del>-?>
</del><span class="cx">
</span><del>-<?php do_action('restrict_manage_posts'); ?>
-
-<div class="wrap">
-<?php screen_icon(); ?>
-<h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="button add-new-h2"><?php esc_html_e('Add New'); ?></a> <?php
-if ( isset($_GET['s']) && $_GET['s'] )
-        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( get_search_query() ) ); ?>
-</h2>
-
-<?php
-if ( isset($message) ) { ?>
</del><ins>+if ( !empty($message) ) { ?>
</ins><span class="cx"> <div id="message" class="updated fade"><p><?php echo $message; ?></p></div>
</span><del>-<?php
-}
-?>
</del><ins>+<?php } ?>
</ins><span class="cx">
</span><span class="cx"> <ul class="subsubsub">
</span><span class="cx"> <?php
</span></span></pre>
</div>
</div>
</body>
</html>