Changeset 5709
- Timestamp:
- 07/20/2017 08:04:54 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php
r5573 r5709 80 80 if ( current_user_can( 'plugin_reject' ) && ( empty( $_REQUEST['post_status'] ) || in_array( $_REQUEST['post_status'], array( 'new', 'pending' ) ) ) ) { 81 81 $actions['plugin_reject'] = __( 'Reject', 'wporg-plugins' ); 82 }83 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 82 } 91 83 … … 214 206 } else { 215 207 wp_dequeue_script( 'inline-edit-post' ); 216 }217 }218 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 . '&action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ),224 /* translators: %s: post title */225 esc_attr( sprintf( __( 'Restore “%s” 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 “%s” 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 “%s” permanently', 'wporg-plugins' ), $title ) ),243 __( 'Delete Permanently', 'wporg-plugins' )244 );245 208 } 246 209 }
Note: See TracChangeset
for help on using the changeset viewer.