if ( ! empty( $_REQUEST['mode'] ) ) {
$mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list';
- set_user_setting ( 'posts_list_mode', $mode );
+ set_user_setting( 'posts_list_mode', $mode );
} else {
- $mode = get_user_setting ( 'posts_list_mode', 'list' );
+ $mode = get_user_setting( 'posts_list_mode', 'list' );
}
$this->is_trash = isset( $_REQUEST['post_status'] ) && $_REQUEST['post_status'] === 'trash';
if ( is_object_in_taxonomy( $this->screen->post_type, 'category' ) ) {
$dropdown_options = array(
- 'show_option_all' => __( 'All categories' ),
+ 'show_option_all' => get_taxonomy( 'category' )->labels->all_items,
'hide_empty' => 0,
'hierarchical' => 1,
'show_count' => 0,
$title = _draft_or_post_title();
if ( $can_edit_post && $post->post_status != 'trash' ) {
- $edit_link = get_edit_post_link( $post->ID );
- echo '<a class="row-title" href="' . $edit_link . '" title="' . esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ) . '">' . $pad . $title . '</a>';
+ printf(
+ '<a class="row-title" href="%s" aria-label="%s">%s%s</a>',
+ get_edit_post_link( $post->ID ),
+ /* translators: %s: post title */
+ esc_attr( sprintf( __( '“%s” (Edit)' ), $title ) ),
+ $pad,
+ $title
+ );
} else {
echo $pad . $title;
}
$post_type_object = get_post_type_object( $post->post_type );
$can_edit_post = current_user_can( 'edit_post', $post->ID );
$actions = array();
+ $title = _draft_or_post_title();
if ( $can_edit_post && 'trash' != $post->post_status ) {
- $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '" title="' . esc_attr__( 'Edit this item' ) . '">' . __( 'Edit' ) . '</a>';
- $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr__( 'Edit this item inline' ) . '">' . __( 'Quick Edit' ) . '</a>';
+ $actions['edit'] = sprintf(
+ '<a href="%s" aria-label="%s">%s</a>',
+ get_edit_post_link( $post->ID ),
+ /* translators: %s: post title */
+ esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ),
+ __( 'Edit' )
+ );
+ $actions['inline hide-if-no-js'] = sprintf(
+ '<a href="#" class="editinline" aria-label="%s">%s</a>',
+ /* translators: %s: post title */
+ esc_attr( sprintf( __( 'Quick edit “%s” inline' ), $title ) ),
+ __( 'Quick Edit' )
+ );
}
if ( current_user_can( 'delete_post', $post->ID ) ) {
- if ( 'trash' === $post->post_status )
- $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>";
- elseif ( EMPTY_TRASH_DAYS )
- $actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash' ) . "' href='" . get_delete_post_link( $post->ID ) . "'>" . __( 'Trash' ) . "</a>";
- if ( 'trash' === $post->post_status || !EMPTY_TRASH_DAYS )
- $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently' ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>";
+ if ( 'trash' === $post->post_status ) {
+ $actions['untrash'] = sprintf(
+ '<a href="%s" aria-label="%s">%s</a>',
+ wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ),
+ /* translators: %s: post title */
+ esc_attr( sprintf( __( 'Restore “%s” from the Trash' ), $title ) ),
+ __( 'Restore' )
+ );
+ } elseif ( EMPTY_TRASH_DAYS ) {
+ $actions['trash'] = sprintf(
+ '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
+ get_delete_post_link( $post->ID ),
+ /* translators: %s: post title */
+ esc_attr( sprintf( __( 'Move “%s” to the Trash' ), $title ) ),
+ _x( 'Trash', 'verb' )
+ );
+ }
+ if ( 'trash' === $post->post_status || ! EMPTY_TRASH_DAYS ) {
+ $actions['delete'] = sprintf(
+ '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
+ get_delete_post_link( $post->ID, '', true ),
+ /* translators: %s: post title */
+ esc_attr( sprintf( __( 'Delete “%s” permanently' ), $title ) ),
+ __( 'Delete Permanently' )
+ );
+ }
}
if ( is_post_type_viewable( $post_type_object ) ) {
- $title = _draft_or_post_title();
if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {
if ( $can_edit_post ) {
- $unpublished_link = set_url_scheme( get_permalink( $post ) );
- $preview_link = get_preview_post_link( $post, array(), $unpublished_link );
- $actions['view'] = '<a href="' . esc_url( $preview_link ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';
+ $preview_link = get_preview_post_link( $post );
+ $actions['view'] = sprintf(
+ '<a href="%s" rel="permalink" aria-label="%s">%s</a>',
+ esc_url( $preview_link ),
+ /* translators: %s: post title */
+ esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ),
+ __( 'Preview' )
+ );
}
} 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['view'] = sprintf(
+ '<a href="%s" rel="permalink" aria-label="%s">%s</a>',
+ get_permalink( $post->ID ),
+ /* translators: %s: post title */
+ esc_attr( sprintf( __( 'View “%s”' ), $title ) ),
+ __( 'View' )
+ );
}
}
'name' => 'post_author',
'class'=> 'authors',
'multi' => 1,
- 'echo' => 0
+ 'echo' => 0,
+ 'show' => 'display_name_with_login',
);
if ( $bulk )
$users_opt['show_option_none'] = __( '— No Change —' );
if ( !$bulk && $can_publish ) :
?>
- <div class="inline-edit-group">
+ <div class="inline-edit-group wp-clearfix">
<label class="alignleft">
<span class="title"><?php _e( 'Password' ); ?></span>
<span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
<?php if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) :
if ( $bulk ) : ?>
- <div class="inline-edit-group">
+ <div class="inline-edit-group wp-clearfix">
<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
<label class="alignleft">
<span class="title"><?php _e( 'Comments' ); ?></span>
<?php else : // $bulk ?>
- <div class="inline-edit-group">
+ <div class="inline-edit-group wp-clearfix">
<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
<label class="alignleft">
<input type="checkbox" name="comment_status" value="open" />
<?php endif; // $bulk
endif; // post_type_supports comments or pings ?>
- <div class="inline-edit-group">
+ <div class="inline-edit-group wp-clearfix">
<label class="inline-edit-status alignleft">
<span class="title"><?php _e( 'Status' ); ?></span>
<select name="_status">