Add "View trash" link to the notice after moving to the trash
git-svn-id: http://svn.automattic.com/wordpress/trunk@11952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6784dc62c6
commit
fecbb60966
|
@ -129,7 +129,7 @@ if ( isset($_GET['approved']) || isset($_GET['deleted']) || isset($_GET['trashed
|
|||
}
|
||||
if ( $trashed > 0 ) {
|
||||
printf( _n( '%s comment moved to the trash', '%s comments moved to the trash', $trashed ), $trashed );
|
||||
echo '<br />';
|
||||
echo ' <a href="' . admin_url('edit-comments.php?comment_status=trash') . '">' . __('View trash') . '</a><br />';
|
||||
}
|
||||
if ( $untrashed > 0 ) {
|
||||
printf( _n( '%s comment restored from the trash', '%s comments restored from the trash', $untrashed ), $untrashed );
|
||||
|
|
|
@ -163,6 +163,7 @@ if ( isset($_GET['deleted']) && (int) $_GET['deleted'] ) {
|
|||
}
|
||||
if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) {
|
||||
printf( _n( 'Page moved to the trash.', '%s pages moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) );
|
||||
echo ' <a href="' . admin_url('edit-pages.php?post_status=trash') . '">' . __('View trash') . '</a> ';
|
||||
unset($_GET['trashed']);
|
||||
}
|
||||
if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) {
|
||||
|
|
|
@ -167,6 +167,7 @@ if ( isset($_GET['deleted']) && (int) $_GET['deleted'] ) {
|
|||
|
||||
if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) {
|
||||
printf( _n( 'Post moved to the trash.', '%s posts moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) );
|
||||
echo ' <a href="' . admin_url('edit.php?post_status=trash') . '">' . __('View trash') . '</a> ';
|
||||
unset($_GET['trashed']);
|
||||
}
|
||||
|
||||
|
|
|
@ -165,9 +165,20 @@ if ( isset($_GET['detached']) ) {
|
|||
$is_trash = ( isset($_GET['status']) && $_GET['status'] == 'trash' );
|
||||
|
||||
wp_enqueue_script('media');
|
||||
require_once('admin-header.php'); ?>
|
||||
require_once('admin-header.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 “%s”') . '</span>', esc_html( get_search_query() ) ); ?>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
$message = '';
|
||||
if ( isset($_GET['posted']) && (int) $_GET['posted'] ) {
|
||||
$_GET['message'] = '1';
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
|
||||
|
@ -179,33 +190,35 @@ if ( isset($_GET['attached']) && (int) $_GET['attached'] ) {
|
|||
$_SERVER['REQUEST_URI'] = remove_query_arg(array('attached'), $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
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']);
|
||||
}
|
||||
|
||||
$messages[1] = __('Media attachment updated.');
|
||||
$messages[2] = __('Media deleted.');
|
||||
$messages[2] = __('Media permanently deleted.');
|
||||
$messages[3] = __('Error saving media attachment.');
|
||||
$messages[4] = __('Media moved to Trash.');
|
||||
$messages[5] = __('Media removed from Trash.');
|
||||
$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.');
|
||||
|
||||
if ( isset($_GET['message']) && (int) $_GET['message'] ) {
|
||||
$message = $messages[$_GET['message']];
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
?>
|
||||
|
||||
<?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 “%s”') . '</span>', esc_html( get_search_query() ) ); ?>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
if ( isset($message) ) { ?>
|
||||
if ( !empty($message) ) { ?>
|
||||
<div id="message" class="updated fade"><p><?php echo $message; ?></p></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
<ul class="subsubsub">
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue