mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Remove all instances of "Trash" from the UI when Trash is disabled, replace trash actions with "Delete permanently", props caesarsgrunt, see #4529
git-svn-id: http://svn.automattic.com/wordpress/trunk@12162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1c24715413
commit
fb1bb44d60
File diff suppressed because one or more lines are too long
@ -398,8 +398,7 @@ div.dashboard-widget-submit input:hover,
|
||||
.plugins a.delete:hover,
|
||||
#all-plugins-table .plugins a.delete:hover,
|
||||
#search-plugins-table .plugins a.delete:hover,
|
||||
.submitbox .submitdelete,
|
||||
a.delete {
|
||||
.submitbox .submitdelete {
|
||||
color: #f00;
|
||||
border-bottom-color: #f00;
|
||||
}
|
||||
@ -634,7 +633,10 @@ tr.inactive + tr.plugin-update-tr .plugin-update {
|
||||
color: #d98500;
|
||||
}
|
||||
|
||||
#the-comment-list .delete a {
|
||||
table.widefat .delete a,
|
||||
table.widefat .trash a,
|
||||
#dashboard_recent_comments .delete a,
|
||||
#dashboard_recent_comments .trash a {
|
||||
color: #bc0b0b;
|
||||
}
|
||||
|
||||
@ -732,7 +734,10 @@ div#media-upload-error,
|
||||
.file-error,
|
||||
abbr.required,
|
||||
.widget-control-remove:hover,
|
||||
.delete a:hover {
|
||||
table.widefat .delete a:hover,
|
||||
table.widefat .trash a:hover,
|
||||
#dashboard_recent_comments .delete a:hover,
|
||||
#dashboard_recent_comments .trash a:hover {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -394,8 +394,7 @@ div.dashboard-widget-submit input:hover,
|
||||
.plugins a.delete:hover,
|
||||
#all-plugins-table .plugins a.delete:hover,
|
||||
#search-plugins-table .plugins a.delete:hover,
|
||||
.submitbox .submitdelete,
|
||||
a.delete {
|
||||
.submitbox .submitdelete {
|
||||
color: #f00;
|
||||
border-bottom-color: #f00;
|
||||
}
|
||||
@ -629,7 +628,10 @@ tr.inactive + tr.plugin-update-tr .plugin-update {
|
||||
color: #d98500;
|
||||
}
|
||||
|
||||
#the-comment-list .delete a {
|
||||
table.widefat .delete a,
|
||||
table.widefat .trash a,
|
||||
#dashboard_recent_comments .delete a,
|
||||
#dashboard_recent_comments .trash a {
|
||||
color: #bc0b0b;
|
||||
}
|
||||
|
||||
@ -731,7 +733,10 @@ div#media-upload-error,
|
||||
.file-error,
|
||||
abbr.required,
|
||||
.widget-control-remove:hover,
|
||||
.delete a:hover {
|
||||
table.widefat .delete a:hover,
|
||||
table.widefat .trash a:hover,
|
||||
#dashboard_recent_comments .delete a:hover,
|
||||
#dashboard_recent_comments .trash a:hover {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
|
@ -89,18 +89,18 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
|
||||
<p>
|
||||
<?php
|
||||
$actions = array();
|
||||
if ( $is_trash ) {
|
||||
if ( current_user_can('delete_post', $post->ID) ) {
|
||||
if ( current_user_can('edit_post', $post->ID) && !$is_trash )
|
||||
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
|
||||
if ( current_user_can('delete_post', $post->ID) ) {
|
||||
if ( $is_trash )
|
||||
$actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
|
||||
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
}
|
||||
} else {
|
||||
if ( current_user_can('edit_post', $post->ID) )
|
||||
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
|
||||
if ( current_user_can('delete_post', $post->ID) )
|
||||
elseif ( EMPTY_TRASH_DAYS )
|
||||
$actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
|
||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||
if ( $is_trash || !EMPTY_TRASH_DAYS )
|
||||
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
}
|
||||
if ( !$is_trash )
|
||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||
$action_count = count($actions);
|
||||
$i = 0;
|
||||
echo '<div class="row-actions">';
|
||||
|
@ -163,9 +163,14 @@ $stati = array(
|
||||
'spam' => _n_noop('Spam <span class="count">(<span class="spam-count">%s</span>)</span>', 'Spam <span class="count">(<span class="spam-count">%s</span>)</span>'),
|
||||
'trash' => _n_noop('Trash <span class="count">(<span class="trash-count">%s</span>)</span>', 'Trash <span class="count">(<span class="trash-count">%s</span>)</span>')
|
||||
);
|
||||
|
||||
if ( !EMPTY_TRASH_DAYS )
|
||||
unset($stati['trash']);
|
||||
|
||||
$link = 'edit-comments.php';
|
||||
if ( !empty($comment_type) && 'all' != $comment_type )
|
||||
$link = add_query_arg( 'comment_type', $comment_type, $link );
|
||||
|
||||
foreach ( $stati as $status => $label ) {
|
||||
$class = '';
|
||||
|
||||
@ -275,7 +280,7 @@ $page_links = paginate_links( array(
|
||||
<?php if ( 'trash' == $comment_status ): ?>
|
||||
<option value="untrash"><?php _e('Restore'); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php if ( 'trash' == $comment_status || 'spam' == $comment_status ): ?>
|
||||
<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php else: ?>
|
||||
<option value="trash"><?php _e('Move to Trash'); ?></option>
|
||||
@ -371,7 +376,7 @@ if ( $page_links )
|
||||
<?php if ( 'trash' == $comment_status ): ?>
|
||||
<option value="untrash"><?php _e('Restore'); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php if ( 'trash' == $comment_status || 'spam' == $comment_status ): ?>
|
||||
<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php else: ?>
|
||||
<option value="trash"><?php _e('Move to Trash'); ?></option>
|
||||
|
@ -68,7 +68,7 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
|
||||
|
||||
<div id="major-publishing-actions">
|
||||
<div id="delete-action">
|
||||
<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=trashcomment&c=$comment->comment_ID&_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . __('Move to Trash') . "</a>\n"; ?>
|
||||
<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&c=$comment->comment_ID&_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?>
|
||||
</div>
|
||||
<div id="publishing-action">
|
||||
<input type="submit" name="save" value="<?php esc_attr_e('Update Comment'); ?>" tabindex="4" class="button-primary" />
|
||||
|
@ -114,6 +114,9 @@ $post_stati = array( // array( adj, noun )
|
||||
'trash' => array(_x('Trash', 'page'), __('Trash pages'), _nx_noop('Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', 'page'))
|
||||
);
|
||||
|
||||
if ( !EMPTY_TRASH_DAYS )
|
||||
unset($post_stati['trash']);
|
||||
|
||||
$post_stati = apply_filters('page_stati', $post_stati);
|
||||
|
||||
$query = array('post_type' => 'page', 'orderby' => 'menu_order title',
|
||||
@ -255,9 +258,11 @@ if ( $page_links ) : ?>
|
||||
<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
|
||||
<?php if ( $is_trash ) { ?>
|
||||
<option value="untrash"><?php _e('Restore'); ?></option>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="edit"><?php _e('Edit'); ?></option>
|
||||
<?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="trash"><?php _e('Move to Trash'); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
@ -302,9 +307,11 @@ if ( $page_links )
|
||||
<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
|
||||
<?php if ( $is_trash ) { ?>
|
||||
<option value="untrash"><?php _e('Restore'); ?></option>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="edit"><?php _e('Edit'); ?></option>
|
||||
<?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="trash"><?php _e('Move to Trash'); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
@ -254,9 +254,11 @@ $is_trash = isset($_GET['post_status']) && $_GET['post_status'] == 'trash';
|
||||
<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
|
||||
<?php if ( $is_trash ) { ?>
|
||||
<option value="untrash"><?php _e('Restore'); ?></option>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="edit"><?php _e('Edit'); ?></option>
|
||||
<?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="trash"><?php _e('Move to Trash'); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
@ -342,9 +344,11 @@ if ( $page_links )
|
||||
<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
|
||||
<?php if ( $is_trash ) { ?>
|
||||
<option value="untrash"><?php _e('Restore'); ?></option>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="edit"><?php _e('Edit'); ?></option>
|
||||
<?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="trash"><?php _e('Move to Trash'); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
@ -540,13 +540,17 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
||||
$unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" );
|
||||
$spam_url = esc_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" );
|
||||
$trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" );
|
||||
$delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" );
|
||||
|
||||
$actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
|
||||
$actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
|
||||
$actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
|
||||
$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
|
||||
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
|
||||
$actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-t vim-destructive' title='" . __( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
|
||||
if ( !EMPTY_TRASH_DAYS )
|
||||
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
|
||||
else
|
||||
$actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . __( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
|
||||
|
||||
$actions = apply_filters( 'comment_row_actions', $actions, $comment );
|
||||
|
||||
|
@ -1201,12 +1201,17 @@ function get_media_item( $attachment_id, $args = null ) {
|
||||
'extra_rows' => array(),
|
||||
);
|
||||
|
||||
$trash_href = wp_nonce_url("post.php?action=trash&post=$attachment_id", 'trash-post_' . $attachment_id);
|
||||
$untrash_href = wp_nonce_url("post.php?action=untrash&post=$attachment_id", 'untrash-post_' . $attachment_id);
|
||||
if ( $send )
|
||||
$send = "<input type='submit' class='button' name='send[$attachment_id]' value='" . esc_attr__( 'Insert into Post' ) . "' />";
|
||||
if ( $delete )
|
||||
$delete = current_user_can('delete_post', $attachment_id) ? "<a href=\"$trash_href\" id=\"del[$attachment_id]\" class=\"delete\">" . __('Move to Trash') . "</a> <a href=\"$untrash_href\" id=\"undo[$attachment_id]\" class=\"undo hidden\">" . __('Undo?') . "</a>" : "";
|
||||
if ( $delete && current_user_can('delete_post', $attachment_id) ) {
|
||||
if ( !EMPTY_TRASH_DAYS )
|
||||
$delete = "<a href=\"" . wp_nonce_url("post.php?action=delete&post=$attachment_id", 'delete-post_' . $attachment_id) . "\" id=\"del[$attachment_id]\" class=\"delete\">" . __('Delete Permanently') . "</a>";
|
||||
else
|
||||
$delete = "<a href=\"" . wp_nonce_url("post.php?action=trash&post=$attachment_id", 'trash-post_' . $attachment_id) . "\" id=\"del[$attachment_id]\" class=\"delete\">" . __('Move to Trash') . "</a> <a href=\"" . wp_nonce_url("post.php?action=untrash&post=$attachment_id", 'untrash-post_' . $attachment_id) . "\" id=\"undo[$attachment_id]\" class=\"undo hidden\">" . __('Undo?') . "</a>";
|
||||
} else {
|
||||
$delete = '';
|
||||
}
|
||||
|
||||
if ( 'image' == $type && current_theme_supports( 'post-thumbnails' ) && get_post_image_id($_GET['post_id']) != $attachment_id )
|
||||
$thumbnail = "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>";
|
||||
|
||||
|
@ -184,10 +184,16 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
|
||||
<?php do_action('post_submitbox_start'); ?>
|
||||
<div id="delete-action">
|
||||
<?php
|
||||
if ( current_user_can("delete_${post_type}", $post->ID) ) { ?>
|
||||
<?php $delete_url = add_query_arg( array('action'=>'trash', 'post'=>$post->ID) ); ?>
|
||||
<a class="submitdelete deletion<?php if ( 'edit' != $action ) { echo " hidden"; } ?>" href="<?php echo wp_nonce_url($delete_url, "trash-${post_type}_" . $post->ID); ?>"><?php _e('Move to Trash'); ?></a>
|
||||
<?php } ?>
|
||||
if ( current_user_can("delete_${post_type}", $post->ID) ) {
|
||||
if ( !EMPTY_TRASH_DAYS ) {
|
||||
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" );
|
||||
$delete_text = __('Delete Permanently');
|
||||
} else {
|
||||
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'trash', 'post' => $post->ID) ), "trash-${post_type}_{$post->ID}" );
|
||||
$delete_text = __('Move to Trash');
|
||||
} ?>
|
||||
<a class="submitdelete deletion<?php if ( 'edit' != $action ) { echo " hidden"; } ?>" href="<?php echo $delete_url; ?>"><?php echo $delete_text; ?></a><?php
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="publishing-action">
|
||||
|
@ -1444,25 +1444,23 @@ function _post_row($a_post, $pending_comments, $mode) {
|
||||
the_excerpt();
|
||||
|
||||
$actions = array();
|
||||
if ('trash' == $post->post_status) {
|
||||
if ( current_user_can('delete_post', $post->ID) ) {
|
||||
if ( current_user_can('edit_post', $post->ID) && 'trash' != $post->post_status ) {
|
||||
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this post')) . '">' . __('Edit') . '</a>';
|
||||
$actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this post inline')) . '">' . __('Quick Edit') . '</a>';
|
||||
}
|
||||
if ( current_user_can('delete_post', $post->ID) ) {
|
||||
if ( 'trash' == $post->post_status )
|
||||
$actions['untrash'] = "<a title='" . esc_attr(__('Restore this post from the Trash')) . "' href='" . wp_nonce_url("post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
|
||||
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post permanently')) . "' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
}
|
||||
} else {
|
||||
if ( current_user_can('edit_post', $post->ID) ) {
|
||||
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this post')) . '">' . __('Edit') . '</a>';
|
||||
$actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this post inline')) . '">' . __('Quick Edit') . '</a>';
|
||||
}
|
||||
if ( current_user_can('delete_post', $post->ID) ) {
|
||||
elseif ( EMPTY_TRASH_DAYS )
|
||||
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this post to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
|
||||
}
|
||||
if ( in_array($post->post_status, array('pending', 'draft')) ) {
|
||||
if ( current_user_can('edit_post', $post->ID) )
|
||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('Preview “%s”'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
|
||||
} else {
|
||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||
}
|
||||
if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS )
|
||||
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post permanently')) . "' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
}
|
||||
if ( in_array($post->post_status, array('pending', 'draft')) ) {
|
||||
if ( current_user_can('edit_post', $post->ID) )
|
||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('Preview “%s”'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
|
||||
} elseif ( 'trash' != $post->post_status ) {
|
||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||
}
|
||||
$actions = apply_filters('post_row_actions', $actions, $post);
|
||||
$action_count = count($actions);
|
||||
@ -1666,23 +1664,23 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
|
||||
<td <?php echo $attributes ?>><strong><?php if ( current_user_can('edit_page', $page->ID) && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit “%s”'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states($page); echo isset($parent_name) ? ' | ' . __('Parent Page: ') . esc_html($parent_name) : ''; ?></strong>
|
||||
<?php
|
||||
$actions = array();
|
||||
if ($post->post_status == 'trash' && current_user_can('delete_page', $page->ID)) {
|
||||
$actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("page.php?action=untrash&post=$page->ID", 'untrash-page_' . $page->ID) . "'>" . __('Restore') . "</a>";
|
||||
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("page.php?action=delete&post=$page->ID", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
} else {
|
||||
if ( current_user_can('edit_page', $page->ID) ) {
|
||||
$actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr(__('Edit this page')) . '">' . __('Edit') . '</a>';
|
||||
$actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';
|
||||
}
|
||||
if ( current_user_can('delete_page', $page->ID) ) {
|
||||
if ( current_user_can('edit_page', $page->ID) && $post->post_status != 'trash' ) {
|
||||
$actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr(__('Edit this page')) . '">' . __('Edit') . '</a>';
|
||||
$actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';
|
||||
}
|
||||
if ( current_user_can('delete_page', $page->ID) ) {
|
||||
if ( $post->post_status == 'trash' )
|
||||
$actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("page.php?action=untrash&post=$page->ID", 'untrash-page_' . $page->ID) . "'>" . __('Restore') . "</a>";
|
||||
elseif ( EMPTY_TRASH_DAYS )
|
||||
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . "</a>";
|
||||
}
|
||||
if ( in_array($post->post_status, array('pending', 'draft')) ) {
|
||||
if ( current_user_can('edit_page', $page->ID) )
|
||||
$actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('Preview “%s”'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
|
||||
} else {
|
||||
$actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||
}
|
||||
if ( $post->post_status == 'trash' || !EMPTY_TRASH_DAYS )
|
||||
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("page.php?action=delete&post=$page->ID", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
}
|
||||
if ( in_array($post->post_status, array('pending', 'draft')) ) {
|
||||
if ( current_user_can('edit_page', $page->ID) )
|
||||
$actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('Preview “%s”'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
|
||||
} elseif ( $post->post_status != 'trash' ) {
|
||||
$actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||
}
|
||||
$actions = apply_filters('page_row_actions', $actions, $page);
|
||||
$action_count = count($actions);
|
||||
@ -2179,10 +2177,12 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'spam' == $the_comment_status ) {
|
||||
if ( 'spam' != $the_comment_status ) {
|
||||
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
|
||||
}
|
||||
if ( 'spam' == $the_comment_status || !EMPTY_TRASH_DAYS ) {
|
||||
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::delete=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
|
||||
} else {
|
||||
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
|
||||
$actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . __( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,8 @@ foreach ( $post_mime_types as $mime_type => $label ) {
|
||||
$type_links[] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( _n( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
|
||||
}
|
||||
$type_links[] = '<li><a href="upload.php?detached=1"' . ( isset($_GET['detached']) ? ' class="current"' : '' ) . '>' . __('Unattached') . '</a>';
|
||||
$type_links[] = '<li><a href="upload.php?status=trash"' . ( (isset($_GET['status']) && $_GET['status'] == 'trash' ) ? ' class="current"' : '') . '>' . sprintf( _nx( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '</a>';
|
||||
if ( EMPTY_TRASH_DAYS )
|
||||
$type_links[] = '<li><a href="upload.php?status=trash"' . ( (isset($_GET['status']) && $_GET['status'] == 'trash' ) ? ' class="current"' : '') . '>' . sprintf( _nx( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '</a>';
|
||||
|
||||
echo implode( " |</li>\n", $type_links) . '</li>';
|
||||
unset($type_links);
|
||||
@ -282,6 +283,7 @@ if ( $page_links ) : ?>
|
||||
<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
|
||||
<?php if ( $is_trash ) { ?>
|
||||
<option value="untrash"><?php _e('Restore'); ?></option>
|
||||
<?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="trash"><?php _e('Move to Trash'); ?></option>
|
||||
@ -385,7 +387,10 @@ foreach ($arc_result as $arc_row) {
|
||||
if ( current_user_can('edit_post', $post->ID) )
|
||||
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
|
||||
if ( current_user_can('delete_post', $post->ID) )
|
||||
$actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
|
||||
if ( EMPTY_TRASH_DAYS )
|
||||
$actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
|
||||
else
|
||||
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||
if ( current_user_can('edit_post', $post->ID) )
|
||||
$actions['attach'] = '<a href="#the-list" onclick="findPosts.open(\'media[]\',\''.$post->ID.'\');return false;" class="hide-if-no-js">'.__('Attach').'</a>';
|
||||
@ -444,6 +449,7 @@ if ( $page_links )
|
||||
<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option>
|
||||
<?php if ($is_trash) { ?>
|
||||
<option value="untrash"><?php _e('Restore'); ?></option>
|
||||
<?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
|
||||
<option value="delete"><?php _e('Delete Permanently'); ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="trash"><?php _e('Move to Trash'); ?></option>
|
||||
|
@ -415,7 +415,7 @@ function wp_default_styles( &$styles ) {
|
||||
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' );
|
||||
|
||||
// all colors stylesheets need to have the same query strings (cache manifest compat)
|
||||
$colors_version = '20091007';
|
||||
$colors_version = '20091109';
|
||||
|
||||
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091026' );
|
||||
$styles->add_data( 'wp-admin', 'rtl', "/wp-admin/rtl$suffix.css" );
|
||||
|
Loading…
Reference in New Issue
Block a user