diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 92d8b2057c..def7c4516f 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -270,7 +270,7 @@ /* Right Now specific Icons styles */ #dashboard_right_now li a:before, -#dashboard_right_now li span:before { +#dashboard_right_now li > span:before { /* get only the first level span to exclude screen-reader-text in mu-storage */ content: "\f159"; /* generic icon for items added by CPTs ? */ padding: 0 5px 0 0; } diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 505862bfd6..b7b1f9ad2c 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -259,14 +259,17 @@ function wp_dashboard_right_now() { ?>
  • moderated ); /* translators: Number of comments in moderation */ - $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), number_format_i18n( $num_comm->moderated ) ); + $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), $moderated_comments_count_i18n ); + /* translators: Number of comments in moderation */ + $aria_label = sprintf( _nx( '%s comment in moderation', '%s comments in moderation', $num_comm->moderated, 'comments' ), $moderated_comments_count_i18n ); ?>
  • + ?>"> $content

    "; + echo "

    $content

    "; } ?> @@ -549,7 +554,8 @@ function wp_dashboard_recent_drafts( $drafts = false ) { $url = get_edit_post_link( $draft->ID ); $title = _draft_or_post_title( $draft->ID ); echo "
  • \n"; - echo '
    ' . esc_html( $title ) . ''; + /* translators: %s: post title */ + echo '
    ' . esc_html( $title ) . ''; echo '
    '; if ( $the_content = wp_trim_words( $draft->post_content, 10 ) ) { echo '

    ' . $the_content . '

    '; @@ -597,20 +603,20 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); - $actions['approve'] = "" . __( 'Approve' ) . ''; - $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; - $actions['edit'] = "". __('Edit') . ''; - $actions['reply'] = '' . __('Reply') . ''; - $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + $actions['edit'] = "". __( 'Edit' ) . ''; + $actions['reply'] = '' . __( 'Reply' ) . ''; + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; if ( ! EMPTY_TRASH_DAYS ) { - $actions['delete'] = "" . __('Delete Permanently') . ''; + $actions['delete'] = "" . __( 'Delete Permanently' ) . ''; } else { - $actions['trash'] = "" . _x('Trash', 'verb') . ''; + $actions['trash'] = "" . _x( 'Trash', 'verb' ) . ''; } if ( '1' === $comment->comment_approved ) { - $actions['view'] = '' . __( 'View' ) . ''; + $actions['view'] = '' . __( 'View' ) . ''; } /** @@ -801,9 +807,17 @@ function wp_dashboard_recent_posts( $args ) { // Use the post edit link for those who can edit, the permalink otherwise. $recent_post_link = current_user_can( 'edit_post', get_the_ID() ) ? get_edit_post_link() : get_permalink(); - /* translators: 1: relative date, 2: time, 3: post edit link or permalink, 4: post title */ - $format = __( '%1$s, %2$s %4$s' ); - printf( "
  • $format
  • ", $relative, get_the_time(), $recent_post_link, _draft_or_post_title() ); + /* translators: 1: relative date, 2: time, 3: post edit link or permalink, 4: post title, 5: aria label */ + $format = __( '%1$s, %2$s %4$s' ); + $draft_or_post_title = _draft_or_post_title(); + printf( "
  • $format
  • ", + $relative, + get_the_time(), + $recent_post_link, + $draft_or_post_title, + /* translators: %s: post title */ + esc_attr( sprintf( __( 'Edit “%s”' ), $draft_or_post_title ) ) + ); } echo ''; @@ -1187,10 +1201,13 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) { if ( !isset($items[$item_key]) ) continue; - $title = esc_html( $item->get_title() ); + $raw_title = $item->get_title(); $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800'; - echo "
  • " . __( 'Popular Plugin' ) . ": $title (" . __( 'Install' ) . ")
  • "; + echo '
  • ' . __( 'Popular Plugin' ) . ': ' . esc_html( $raw_title ) . + ' (' . __( 'Install' ) . ')
  • '; $feed->__destruct(); unset( $feed ); @@ -1234,10 +1251,10 @@ function wp_dashboard_quota() { number_format_i18n( $quota ) ); printf( - '%3$s', + '%2$s (%3$s)', esc_url( admin_url( 'upload.php' ) ), - __( 'Manage Uploads' ), - $text + $text, + __( 'Manage Uploads' ) ); ?>
  • %3$s', + '%2$s (%3$s)', esc_url( admin_url( 'upload.php' ) ), - __( 'Manage Uploads' ), - $text + $text, + __( 'Manage Uploads' ) ); ?>
  • @@ -1291,7 +1308,7 @@ function wp_dashboard_browser_nag() { $browsehappy = add_query_arg( 'locale', $locale, $browsehappy ); $notice .= '

    ' . sprintf( __( 'Update %2$s or learn how to browse happy' ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ), esc_url( $browsehappy ) ) . '

    '; - $notice .= '

    ' . __( 'Dismiss' ) . '

    '; + $notice .= '

    ' . __( 'Dismiss' ) . '

    '; $notice .= '
    '; } diff --git a/src/wp-admin/index.php b/src/wp-admin/index.php index abf1ac51ad..6a33d5417a 100644 --- a/src/wp-admin/index.php +++ b/src/wp-admin/index.php @@ -106,7 +106,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
    - +