WordPress.org

Make WordPress Core

Ticket #4529: trash-disabled.diff

File trash-disabled.diff, 24.3 KB (added by caesarsgrunt, 6 years ago)

Remove all instances of "Trash" from the interface when Trash is disabled.

  • wp-admin/edit-comments.php

     
    163163                '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>'), 
    164164                '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>') 
    165165        ); 
     166if (EMPTY_TRASH_DAYS == 0) unset($stati['trash']); 
    166167$link = 'edit-comments.php'; 
    167168if ( !empty($comment_type) && 'all' != $comment_type ) 
    168169        $link = add_query_arg( 'comment_type', $comment_type, $link ); 
     
    275276<?php if ( 'trash' == $comment_status ): ?> 
    276277<option value="untrash"><?php _e('Restore'); ?></option> 
    277278<?php endif; ?> 
    278 <?php if ( 'trash' == $comment_status || 'spam' == $comment_status ): ?> 
     279<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || EMPTY_TRASH_DAYS == 0 ): ?> 
    279280<option value="delete"><?php _e('Delete Permanently'); ?></option> 
    280281<?php else: ?> 
    281282<option value="trash"><?php _e('Move to Trash'); ?></option> 
     
    371372<?php if ( 'trash' == $comment_status ): ?> 
    372373<option value="untrash"><?php _e('Restore'); ?></option> 
    373374<?php endif; ?> 
    374 <?php if ( 'trash' == $comment_status || 'spam' == $comment_status ): ?> 
     375<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || EMPTY_TRASH_DAYS == 0 ): ?> 
    375376<option value="delete"><?php _e('Delete Permanently'); ?></option> 
    376377<?php else: ?> 
    377378<option value="trash"><?php _e('Move to Trash'); ?></option> 
  • wp-admin/includes/dashboard.php

     
    540540                $unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); 
    541541                $spam_url = esc_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 
    542542                $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 
     543                $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 
    543544 
    544545                $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>'; 
    545546                $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>'; 
    546547                $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>'; 
    547548                $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>'; 
    548549                $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>'; 
    549                 $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>'; 
     550                if (EMPTY_TRASH_DAYS == 0) 
     551                        $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>'; 
     552                else 
     553                        $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>'; 
    550554 
    551555                $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 
    552556 
  • wp-admin/includes/meta-boxes.php

     
    185185<div id="delete-action"> 
    186186<?php 
    187187if ( current_user_can("delete_${post_type}", $post->ID) ) { ?> 
    188 <?php $delete_url = add_query_arg( array('action'=>'trash', 'post'=>$post->ID) ); ?> 
    189 <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> 
     188<?php $delete_url = add_query_arg( array('action'=>( EMPTY_TRASH_DAYS == 0 ? 'delete' : 'trash' ), 'post'=>$post->ID) ); ?> 
     189<a class="submitdelete deletion<?php if ( 'edit' != $action ) { echo " hidden"; } ?>" href="<?php echo wp_nonce_url($delete_url, ( EMPTY_TRASH_DAYS == 0 ? "delete-${post_type}_" : "trash-${post_type}_" ) . $post->ID); ?>"><?php _e( EMPTY_TRASH_DAYS == 0 ? 'Delete Permanently' : 'Move to Trash' ); ?></a> 
    190190<?php } ?> 
    191191</div> 
    192192 
  • wp-admin/includes/template.php

     
    14441444                                the_excerpt(); 
    14451445 
    14461446                        $actions = array(); 
    1447                         if ('trash' == $post->post_status) { 
    1448                                 if ( current_user_can('delete_post', $post->ID) ) { 
     1447                        if ( current_user_can('edit_post', $post->ID) && 'trash' != $post->post_status ) { 
     1448                                $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this post')) . '">' . __('Edit') . '</a>'; 
     1449                                $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this post inline')) . '">' . __('Quick&nbsp;Edit') . '</a>'; 
     1450                        } 
     1451                        if ( current_user_can('delete_post', $post->ID) ) { 
     1452                                if ('trash' == $post->post_status) 
    14491453                                        $actions['untrash'] = "<a title='" . esc_attr(__('Restore this post from the Trash')) . "' href='" . wp_nonce_url("post.php?action=untrash&amp;post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>"; 
     1454                                elseif (EMPTY_TRASH_DAYS > 0) 
     1455                                        $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this post to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>"; 
     1456                                if ('trash' == $post->post_status || EMPTY_TRASH_DAYS == 0) 
    14501457                                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post permanently')) . "' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>"; 
    1451                                 } 
    1452                         } else { 
    1453                                 if ( current_user_can('edit_post', $post->ID) ) { 
    1454                                         $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this post')) . '">' . __('Edit') . '</a>'; 
    1455                                         $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this post inline')) . '">' . __('Quick&nbsp;Edit') . '</a>'; 
    1456                                 } 
    1457                                 if ( current_user_can('delete_post', $post->ID) ) { 
    1458                                         $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this post to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>"; 
    1459                                 } 
    1460                                 if ( in_array($post->post_status, array('pending', 'draft')) ) { 
    1461                                         if ( current_user_can('edit_post', $post->ID) ) 
    1462                                                 $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>'; 
    1463                                 } else { 
    1464                                         $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 
    1465                                 } 
    14661458                        } 
     1459                        if ( in_array($post->post_status, array('pending', 'draft')) ) { 
     1460                                if ( current_user_can('edit_post', $post->ID) ) 
     1461                                        $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>'; 
     1462                        } elseif ('trash' != $post->post_status) { 
     1463                                $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 
     1464                        } 
    14671465                        $actions = apply_filters('post_row_actions', $actions, $post); 
    14681466                        $action_count = count($actions); 
    14691467                        $i = 0; 
     
    16661664                <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 &#8220;%s&#8221;'), $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> 
    16671665                <?php 
    16681666                $actions = array(); 
    1669                 if ($post->post_status == 'trash' && current_user_can('delete_page', $page->ID)) { 
    1670                         $actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("page.php?action=untrash&amp;post=$page->ID", 'untrash-page_' . $page->ID) . "'>" . __('Restore') . "</a>"; 
    1671                         $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>"; 
    1672                 } else { 
    1673                         if ( current_user_can('edit_page', $page->ID) ) { 
    1674                                 $actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr(__('Edit this page')) . '">' . __('Edit') . '</a>'; 
    1675                                 $actions['inline'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>'; 
    1676                         } 
    1677                         if ( current_user_can('delete_page', $page->ID) ) { 
     1667                if ( current_user_can('edit_page', $page->ID) && $post->post_status != 'trash' ) { 
     1668                        $actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr(__('Edit this page')) . '">' . __('Edit') . '</a>'; 
     1669                        $actions['inline'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>'; 
     1670                } 
     1671                if ( current_user_can('delete_page', $page->ID) ) { 
     1672                        if ($post->post_status == 'trash') 
     1673                                $actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("page.php?action=untrash&amp;post=$page->ID", 'untrash-page_' . $page->ID) . "'>" . __('Restore') . "</a>"; 
     1674                        elseif (EMPTY_TRASH_DAYS > 0) 
    16781675                                $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . "</a>"; 
    1679                         } 
    1680                         if ( in_array($post->post_status, array('pending', 'draft')) ) { 
    1681                                 if ( current_user_can('edit_page', $page->ID) ) 
    1682                                         $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>'; 
    1683                         } else { 
    1684                                 $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 
    1685                         } 
     1676                        if ($post->post_status == 'trash' || EMPTY_TRASH_DAYS == 0) 
     1677                                $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>"; 
    16861678                } 
     1679                if ( in_array($post->post_status, array('pending', 'draft')) ) { 
     1680                        if ( current_user_can('edit_page', $page->ID) ) 
     1681                                $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>'; 
     1682                } elseif ($post->post_status != 'trash') { 
     1683                        $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 
     1684                } 
    16871685                $actions = apply_filters('page_row_actions', $actions, $page); 
    16881686                $action_count = count($actions); 
    16891687 
     
    21802178                                                } 
    21812179 
    21822180                                                if ( 'spam' == $the_comment_status ) { 
     2181                                                        $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>'; 
     2182                                                } 
     2183                                                if ( 'spam' == $the_comment_status || EMPTY_TRASH_DAYS == 0 ) { 
    21832184                                                        $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>'; 
    21842185                                                } else { 
    2185                                                         $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>'; 
    21862186                                                        $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>'; 
    21872187                                                } 
    21882188 
  • wp-admin/includes/media.php

     
    12011201                'extra_rows' => array(), 
    12021202        ); 
    12031203 
     1204        $delete_href = wp_nonce_url("post.php?action=delete&amp;post=$attachment_id", 'delete-post_' . $attachment_id); 
    12041205        $trash_href = wp_nonce_url("post.php?action=trash&amp;post=$attachment_id", 'trash-post_' . $attachment_id); 
    12051206        $untrash_href = wp_nonce_url("post.php?action=untrash&amp;post=$attachment_id", 'untrash-post_' . $attachment_id); 
    12061207        if ( $send ) 
    12071208                $send = "<input type='submit' class='button' name='send[$attachment_id]' value='" . esc_attr__( 'Insert into Post' ) . "' />"; 
    12081209        if ( $delete ) 
    1209                 $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>" : ""; 
     1210                $delete = current_user_can('delete_post', $attachment_id) ? "<a href=\"" . ( EMPTY_TRASH_DAYS == 0 ? $delete_href : $trash_href ) . "\" id=\"del[$attachment_id]\" class=\"delete\">" . __( EMPTY_TRASH_DAYS == 0 ? 'Delete Permanently' : 'Move to Trash' ) . "</a> <a href=\"$untrash_href\" id=\"undo[$attachment_id]\" class=\"undo hidden\">" . __('Undo?') . "</a>" : ""; 
    12101211        if ( 'image' == $type && current_theme_supports( 'post-thumbnails' ) && get_post_image_id($_GET['post_id']) != $attachment_id ) 
    12111212                $thumbnail = "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>"; 
    12121213 
  • wp-admin/edit-attachment-rows.php

     
    8989                <p> 
    9090                <?php 
    9191                $actions = array(); 
    92                 if ( $is_trash ) { 
    93                         if ( current_user_can('delete_post', $post->ID) ) { 
     92                if ( current_user_can('edit_post', $post->ID) && !$is_trash ) 
     93                        $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 
     94                if ( current_user_can('delete_post', $post->ID) ) { 
     95                        if ($is_trash) 
    9496                                $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&amp;post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>"; 
    95                                 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>"; 
    96                         } 
    97                 } else { 
    98                         if ( current_user_can('edit_post', $post->ID) ) 
    99                                 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 
    100                         if ( current_user_can('delete_post', $post->ID) ) 
     97                        elseif (EMPTY_TRASH_DAYS > 0) 
    10198                                $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>"; 
    102                         $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 
     99                        else 
     100                                $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>"; 
    103101                } 
     102                $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 
    104103                $action_count = count($actions); 
    105104                $i = 0; 
    106105                echo '<div class="row-actions">'; 
  • wp-admin/upload.php

     
    238238        $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>'; 
    239239} 
    240240$type_links[] = '<li><a href="upload.php?detached=1"' . ( isset($_GET['detached']) ? ' class="current"' : '' ) . '>' . __('Unattached') . '</a>'; 
    241 $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>'; 
     241if (EMPTY_TRASH_DAYS > 0) $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>'; 
    242242 
    243243echo implode( " |</li>\n", $type_links) . '</li>'; 
    244244unset($type_links); 
     
    282282<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    283283<?php if ( $is_trash ) { ?> 
    284284<option value="untrash"><?php _e('Restore'); ?></option> 
     285<?php } if ( $is_trash || EMPTY_TRASH_DAYS == 0 ) { ?> 
    285286<option value="delete"><?php _e('Delete Permanently'); ?></option> 
    286287<?php } else { ?> 
    287288<option value="trash"><?php _e('Move to Trash'); ?></option> 
     
    385386                if ( current_user_can('edit_post', $post->ID) ) 
    386387                        $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 
    387388                if ( current_user_can('delete_post', $post->ID) ) 
    388                         $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>"; 
     389                        if ( EMPTY_TRASH_DAYS > 0 ) 
     390                                $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>"; 
     391                        else 
     392                                $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>"; 
    389393                $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 
    390394                if ( current_user_can('edit_post', $post->ID) ) 
    391395                        $actions['attach'] = '<a href="#the-list" onclick="findPosts.open(\'media[]\',\''.$post->ID.'\');return false;" class="hide-if-no-js">'.__('Attach').'</a>'; 
     
    444448<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    445449<?php if ($is_trash) { ?> 
    446450<option value="untrash"><?php _e('Restore'); ?></option> 
     451<?php } if ( $is_trash || EMPTY_TRASH_DAYS == 0 ) { ?> 
    447452<option value="delete"><?php _e('Delete Permanently'); ?></option> 
    448453<?php } else { ?> 
    449454<option value="trash"><?php _e('Move to Trash'); ?></option> 
  • wp-admin/edit-form-comment.php

     
    6868 
    6969<div id="major-publishing-actions"> 
    7070<div id="delete-action"> 
    71 <?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=trashcomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . __('Move to Trash') . "</a>\n"; ?> 
     71<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( EMPTY_TRASH_DAYS == 0 ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( EMPTY_TRASH_DAYS == 0 ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?> 
    7272</div> 
    7373<div id="publishing-action"> 
    7474<input type="submit" name="save" value="<?php esc_attr_e('Update Comment'); ?>" tabindex="4" class="button-primary" /> 
  • wp-admin/edit.php

     
    254254<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    255255<?php if ( $is_trash ) { ?> 
    256256<option value="untrash"><?php _e('Restore'); ?></option> 
     257<?php } else { ?> 
     258<option value="edit"><?php _e('Edit'); ?></option> 
     259<?php } if ( $is_trash || EMPTY_TRASH_DAYS == 0 ) { ?> 
    257260<option value="delete"><?php _e('Delete Permanently'); ?></option> 
    258261<?php } else { ?> 
    259 <option value="edit"><?php _e('Edit'); ?></option> 
    260262<option value="trash"><?php _e('Move to Trash'); ?></option> 
    261263<?php } ?> 
    262264</select> 
     
    342344<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    343345<?php if ( $is_trash ) { ?> 
    344346<option value="untrash"><?php _e('Restore'); ?></option> 
     347<?php } else { ?> 
     348<option value="edit"><?php _e('Edit'); ?></option> 
     349<?php } if ( $is_trash || EMPTY_TRASH_DAYS == 0 ) { ?> 
    345350<option value="delete"><?php _e('Delete Permanently'); ?></option> 
    346351<?php } else { ?> 
    347 <option value="edit"><?php _e('Edit'); ?></option> 
    348352<option value="trash"><?php _e('Move to Trash'); ?></option> 
    349353<?php } ?> 
    350354</select> 
  • wp-admin/edit-pages.php

     
    113113                'private' => array(_x('Private', 'page'), __('Private pages'), _nx_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>', 'page')), 
    114114                'trash' => array(_x('Trash', 'page'), __('Trash pages'), _nx_noop('Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', 'page')) 
    115115        ); 
     116if (EMPTY_TRASH_DAYS == 0) unset($post_stati['trash']); 
    116117 
    117118$post_stati = apply_filters('page_stati', $post_stati); 
    118119 
     
    255256<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    256257<?php if ( $is_trash ) { ?> 
    257258<option value="untrash"><?php _e('Restore'); ?></option> 
     259<?php } else { ?> 
     260<option value="edit"><?php _e('Edit'); ?></option> 
     261<?php } if ( $is_trash || EMPTY_TRASH_DAYS == 0 ) { ?> 
    258262<option value="delete"><?php _e('Delete Permanently'); ?></option> 
    259263<?php } else { ?> 
    260 <option value="edit"><?php _e('Edit'); ?></option> 
    261264<option value="trash"><?php _e('Move to Trash'); ?></option> 
    262265<?php } ?> 
    263266</select> 
     
    302305<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    303306<?php if ( $is_trash ) { ?> 
    304307<option value="untrash"><?php _e('Restore'); ?></option> 
     308<?php } else { ?> 
     309<option value="edit"><?php _e('Edit'); ?></option> 
     310<?php } if ( $is_trash || EMPTY_TRASH_DAYS == 0 ) { ?> 
    305311<option value="delete"><?php _e('Delete Permanently'); ?></option> 
    306312<?php } else { ?> 
    307 <option value="edit"><?php _e('Edit'); ?></option> 
    308313<option value="trash"><?php _e('Move to Trash'); ?></option> 
    309314<?php } ?> 
    310315</select>