Ticket #35313: 35313.patch
File 35313.patch, 5.6 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/class-wp-posts-list-table.php
538 538 539 539 $post_status = !empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all'; 540 540 if ( post_type_supports( $post_type, 'comments' ) && !in_array( $post_status, array( 'pending', 'draft', 'future' ) ) ) 541 $posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Comments' ) . '"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>';541 $posts_columns['comments'] = '<span class="vers comment-grey-bubble"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>'; 542 542 543 543 $posts_columns['date'] = __( 'Date' ); 544 544 … … 878 878 879 879 if ( $can_edit_post && $post->post_status != 'trash' ) { 880 880 $edit_link = get_edit_post_link( $post->ID ); 881 echo '<a class="row-title" href="' . $edit_link . '" title="' . esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ) . '">' . $pad . $title . '</a>';881 echo '<a class="row-title" href="' . $edit_link . '" aria-label="' . esc_attr( sprintf( __( '“%s” (Edit)' ), $title ) ) . '">' . $pad . $title . '</a>'; 882 882 } else { 883 883 echo $pad . $title; 884 884 } … … 1169 1169 $post_type_object = get_post_type_object( $post->post_type ); 1170 1170 $can_edit_post = current_user_can( 'edit_post', $post->ID ); 1171 1171 $actions = array(); 1172 $title = _draft_or_post_title(); 1172 1173 1173 1174 if ( $can_edit_post && 'trash' != $post->post_status ) { 1174 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '" title="' . esc_attr__( 'Edit this item' ) . '">' . __( 'Edit' ) . '</a>'; 1175 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr__( 'Edit this item inline' ) . '">' . __( 'Quick Edit' ) . '</a>'; 1175 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '" aria-label="' . 1176 /* translators: %s: post title */ 1177 esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ) . '">' . __( 'Edit' ) . '</a>'; 1178 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" aria-label="' . 1179 /* translators: %s: post title */ 1180 esc_attr( sprintf( __( 'Quick edit “%s” inline' ), $title ) ) . '">' . __( 'Quick Edit' ) . '</a>'; 1176 1181 } 1177 1182 1178 1183 if ( current_user_can( 'delete_post', $post->ID ) ) { 1179 if ( 'trash' === $post->post_status ) 1180 $actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash' ) . "' href='" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>"; 1181 elseif ( EMPTY_TRASH_DAYS ) 1182 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash' ) . "' href='" . get_delete_post_link( $post->ID ) . "'>" . _x( 'Trash', 'verb' ) . "</a>"; 1183 if ( 'trash' === $post->post_status || !EMPTY_TRASH_DAYS ) 1184 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently' ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>"; 1184 if ( 'trash' === $post->post_status ) { 1185 $actions['untrash'] = "<a href='" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . 1186 '&action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ) . "' aria-label='" . 1187 /* translators: %s: post title */ 1188 esc_attr__( sprintf( __( 'Restore “%s” from the Trash' ), $title ) ) . "'>" . __( 'Restore' ) . "</a>"; 1189 } elseif ( EMPTY_TRASH_DAYS ) { 1190 $actions['trash'] = "<a href='" . get_delete_post_link( $post->ID ) . "' class='submitdelete' aria-label='" . 1191 /* translators: %s: post title */ 1192 esc_attr__( sprintf( __( 'Move “%s” to the Trash' ), $title ) ) . "'>" . _x( 'Trash', 'verb' ) . "</a>"; 1193 } 1194 if ( 'trash' === $post->post_status || ! EMPTY_TRASH_DAYS ) { 1195 $actions['delete'] = "<a href='" . get_delete_post_link( $post->ID, '', true ) . "' class='submitdelete' aria-label='" . 1196 /* translators: %s: post title */ 1197 esc_attr__( sprintf( __( 'Delete “%s” permanently' ), $title ) ) . "'>" . __( 'Delete Permanently' ) . "</a>"; 1198 } 1185 1199 } 1186 1200 1187 1201 if ( is_post_type_viewable( $post_type_object ) ) { 1188 $title = _draft_or_post_title();1189 1202 if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) { 1190 1203 if ( $can_edit_post ) { 1191 1204 $unpublished_link = set_url_scheme( get_permalink( $post ) ); 1192 1205 $preview_link = get_preview_post_link( $post, array(), $unpublished_link ); 1193 $actions['view'] = '<a href="' . esc_url( $preview_link ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>'; 1206 $actions['view'] = '<a href="' . esc_url( $preview_link ) . '" rel="permalink" aria-label="' . 1207 /* translators: %s: post title */ 1208 esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '">' . __( 'Preview' ) . '</a>'; 1194 1209 } 1195 1210 } elseif ( 'trash' != $post->post_status ) { 1196 $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”' ), $title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>'; 1211 $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" rel="permalink" aria-label="' . 1212 /* translators: %s: post title */ 1213 esc_attr( sprintf( __( 'View “%s”' ), $title ) ) . '">' . __( 'View' ) . '</a>'; 1197 1214 } 1198 1215 } 1199 1216