Making WordPress.org

Ticket #2983: 2983.patch

File 2983.patch, 2.3 KB (added by SergeyBiryukov, 8 years ago)
  • wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php

     
    8181                        $actions['plugin_reject'] = __( 'Reject', 'wporg-plugins' );
    8282                }
    8383
    84                 if ( current_user_can( $post_type_obj->cap->delete_posts ) ) {
    85                         if ( $this->is_trash || ! EMPTY_TRASH_DAYS ) {
    86                                 $actions['delete'] = __( 'Delete Permanently', 'wporg-plugins' );
    87                         } else {
    88                                 $actions['trash'] = __( 'Move to Trash', 'wporg-plugins' );
    89                         }
    90                 }
    91 
    9284                return $actions;
    9385        }
    9486
     
    216208                        }
    217209                }
    218210
    219                 if ( current_user_can( 'delete_post', $post->ID ) ) {
    220                         if ( 'trash' === $post->post_status ) {
    221                                 $actions['untrash'] = sprintf(
    222                                         '<a href="%s" aria-label="%s">%s</a>',
    223                                         wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ),
    224                                         /* translators: %s: post title */
    225                                         esc_attr( sprintf( __( 'Restore &#8220;%s&#8221; from the Trash', 'wporg-plugins' ), $title ) ),
    226                                         __( 'Restore', 'wporg-plugins' )
    227                                 );
    228                         } elseif ( EMPTY_TRASH_DAYS ) {
    229                                 $actions['trash'] = sprintf(
    230                                         '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
    231                                         get_delete_post_link( $post->ID ),
    232                                         /* translators: %s: post title */
    233                                         esc_attr( sprintf( __( 'Move &#8220;%s&#8221; to the Trash', 'wporg-plugins' ), $title ) ),
    234                                         _x( 'Trash', 'verb', 'wporg-plugins' )
    235                                 );
    236                         }
    237                         if ( 'trash' === $post->post_status || ! EMPTY_TRASH_DAYS ) {
    238                                 $actions['delete'] = sprintf(
    239                                         '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
    240                                         get_delete_post_link( $post->ID, '', true ),
    241                                         /* translators: %s: post title */
    242                                         esc_attr( sprintf( __( 'Delete &#8220;%s&#8221; permanently', 'wporg-plugins' ), $title ) ),
    243                                         __( 'Delete Permanently', 'wporg-plugins' )
    244                                 );
    245                         }
    246                 }
    247 
    248211                if ( is_post_type_viewable( $post_type_object ) && 'publish' === $post->post_status ) {
    249212                        $actions['view'] = sprintf(
    250213                                '<a href="%s" rel="permalink" aria-label="%s">%s</a>',