Ticket #35049: 35049.3.diff
| File 35049.3.diff, 11.8 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/css/dashboard.css
270 270 /* Right Now specific Icons styles */ 271 271 272 272 #dashboard_right_now li a:before, 273 #dashboard_right_now li span:before {273 #dashboard_right_now li > span:before { /* get only the first level span to exclude screen-reader-text in mu-storage */ 274 274 content: "\f159"; /* generic icon for items added by CPTs ? */ 275 275 padding: 0 5px 0 0; 276 276 } -
src/wp-admin/includes/dashboard.php
259 259 ?> 260 260 <li class="comment-count"><a href="edit-comments.php"><?php echo $text; ?></a></li> 261 261 <?php 262 $moderated_comments_count_i18n = number_format_i18n( $num_comm->moderated ); 262 263 /* translators: Number of comments in moderation */ 263 $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), number_format_i18n( $num_comm->moderated ) ); 264 $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), $moderated_comments_count_i18n ); 265 $aria_label = sprintf( _nx( '%s comment in moderation', '%s comments in moderation', $num_comm->moderated, 'comments' ), $moderated_comments_count_i18n ); 264 266 ?> 265 267 <li class="comment-mod-count<?php 266 268 if ( ! $num_comm->moderated ) { 267 269 echo ' hidden'; 268 270 } 269 ?>"><a href="edit-comments.php?comment_status=moderated" ><?php echo $text; ?></a></li>271 ?>"><a href="edit-comments.php?comment_status=moderated" aria-label="<?php esc_attr_e( $aria_label ); ?>"><?php echo $text; ?></a></li> 270 272 <?php 271 273 } 272 274 … … 302 304 * Prior to 3.8.0, the widget was named 'Right Now'. 303 305 * 304 306 * @since 3.0.0 307 * @since 4.5.0 No title attribute output by default. 305 308 * 306 309 * @param string $title Default attribute text. 307 310 */ 308 $title = apply_filters( 'privacy_on_link_title', __( 'Your site is asking search engines not to index its content' ));311 $title = apply_filters( 'privacy_on_link_title', '' ); 309 312 310 313 /** 311 314 * Filter the link label for the 'Search Engines Discouraged' message … … 318 321 * @param string $content Default text. 319 322 */ 320 323 $content = apply_filters( 'privacy_on_link_text' , __( 'Search Engines Discouraged' ) ); 324 $title_attr = '' === $title ? '' : " title='$title'"; 321 325 322 echo "<p><a href='options-reading.php' title='$title'>$content</a></p>";326 echo "<p><a href='options-reading.php'$title_attr>$content</a></p>"; 323 327 } 324 328 ?> 325 329 </div> … … 549 553 $url = get_edit_post_link( $draft->ID ); 550 554 $title = _draft_or_post_title( $draft->ID ); 551 555 echo "<li>\n"; 552 echo '<div class="draft-title"><a href="' . esc_url( $url ) . '" title="' . esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ) . '">' . esc_html( $title ) . '</a>'; 556 /* translators: %s: draft title. */ 557 echo '<div class="draft-title"><a href="' . esc_url( $url ) . '" aria-label="' . esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ) . '">' . esc_html( $title ) . '</a>'; 553 558 echo '<time datetime="' . get_the_time( 'c', $draft ) . '">' . get_the_time( __( 'F j, Y' ), $draft ) . '</time></div>'; 554 559 if ( $the_content = wp_trim_words( $draft->post_content, 10 ) ) { 555 560 echo '<p>' . $the_content . '</p>'; … … 597 602 $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 598 603 $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 599 604 600 $actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' class='vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';601 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' class='vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';602 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>';603 $actions['reply'] = '<a onclick="window.commentReply && commentReply.open(\'' .$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';604 $actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1' class='vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';605 $actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' class='vim-a' aria-label='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 606 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' class='vim-u' aria-label='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 607 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' aria-label='" . esc_attr__( 'Edit this comment' ) . "'>". __( 'Edit' ) . '</a>'; 608 $actions['reply'] = '<a onclick="window.commentReply && commentReply.open(\'' . $comment->comment_ID . '\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" aria-label="' . esc_attr__( 'Reply to this comment' ) . '" href="#">' . __( 'Reply' ) . '</a>'; 609 $actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1' class='vim-s vim-destructive' aria-label='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>'; 605 610 606 611 if ( ! EMPTY_TRASH_DAYS ) { 607 $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' >" . __('Delete Permanently') . '</a>';612 $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' aria-label='" . esc_attr__( 'Delete this comment permanently' ) . "'>" . __( 'Delete Permanently' ) . '</a>'; 608 613 } else { 609 $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';614 $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' aria-label='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>'; 610 615 } 611 616 612 617 if ( '1' === $comment->comment_approved ) { 613 $actions['view'] = '<a class="comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '" >' . __( 'View' ) . '</a>';618 $actions['view'] = '<a class="comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '" aria-label="' . _( 'View this comment' ) . '">' . __( 'View' ) . '</a>'; 614 619 } 615 620 616 621 /** … … 801 806 // Use the post edit link for those who can edit, the permalink otherwise. 802 807 $recent_post_link = current_user_can( 'edit_post', get_the_ID() ) ? get_edit_post_link() : get_permalink(); 803 808 804 /* translators: 1: relative date, 2: time, 3: post edit link or permalink, 4: post title */ 805 $format = __( '<span>%1$s, %2$s</span> <a href="%3$s">%4$s</a>' ); 806 printf( "<li>$format</li>", $relative, get_the_time(), $recent_post_link, _draft_or_post_title() ); 809 /* translators: 1: relative date, 2: time, 3: post edit link or permalink, 4: post title, 5: aria label */ 810 $format = __( '<span>%1$s, %2$s</span> <a href="%3$s" aria-label="%5$s">%4$s</a>' ); 811 $draft_or_post_title = _draft_or_post_title(); 812 printf( "<li>$format</li>", 813 $relative, 814 get_the_time(), 815 $recent_post_link, 816 $draft_or_post_title, 817 /* translators: %s: post title */ 818 sprintf( 'Edit “%s”', $draft_or_post_title ) 819 ); 807 820 } 808 821 809 822 echo '</ul>'; … … 1187 1200 if ( !isset($items[$item_key]) ) 1188 1201 continue; 1189 1202 1190 $ title = esc_html( $item->get_title());1203 $raw_title = $item->get_title(); 1191 1204 1192 1205 $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800'; 1193 echo "<li class='dashboard-news-plugin'><span>" . __( 'Popular Plugin' ) . ":</span> <a href='$link' class='dashboard-news-plugin-link'>$title</a> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span></li>"; 1206 echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) . 1207 /* translators: %s: plugin name. */ 1208 ' <a href="' . $ilink . '" class="thickbox" aria-label="' . sprintf( __( 'Install %s' ), esc_attr( $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>'; 1194 1209 1195 1210 $feed->__destruct(); 1196 1211 unset( $feed ); … … 1234 1249 number_format_i18n( $quota ) 1235 1250 ); 1236 1251 printf( 1237 '<a href="%1$s" title="%2$s">%3$s</a>', 1252 /* translators: 1: admin URL, 2: allowed space in megabytes, 3: hidden accessible text to manage uploads */ 1253 '<a href="%1$s">%2$s <span class="screen-reader-text">(%3$s)</span></a>', 1238 1254 esc_url( admin_url( 'upload.php' ) ), 1239 __( 'Manage Uploads' ),1240 $text1255 $text, 1256 __( 'Manage Uploads' ) 1241 1257 ); ?> 1242 1258 </li><li class="storage-count <?php echo $used_class; ?>"> 1243 1259 <?php $text = sprintf( … … 1247 1263 $percentused 1248 1264 ); 1249 1265 printf( 1250 '<a href="%1$s" title="%2$s" class="musublink">%3$s</a>', 1266 /* translators: 1: admin URL, 2: allowed space in megabytes, 3: manage uploads hidden accessible text */ 1267 '<a href="%1$s" class="musublink">%2$s <span class="screen-reader-text">(%3$s)</span></a>', 1251 1268 esc_url( admin_url( 'upload.php' ) ), 1252 __( 'Manage Uploads' ),1253 $text1269 $text, 1270 __( 'Manage Uploads' ) 1254 1271 ); ?> 1255 1272 </li> 1256 1273 </ul> … … 1291 1308 $browsehappy = add_query_arg( 'locale', $locale, $browsehappy ); 1292 1309 1293 1310 $notice .= '<p>' . sprintf( __( '<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>' ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ), esc_url( $browsehappy ) ) . '</p>'; 1294 $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" >' . __( 'Dismiss' ) . '</a></p>';1311 $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . __( 'Dismiss the browser warning panel' ) . '">' . __( 'Dismiss' ) . '</a></p>'; 1295 1312 $notice .= '<div class="clear"></div>'; 1296 1313 } 1297 1314 -
src/wp-admin/index.php
106 106 107 107 <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>"> 108 108 <?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?> 109 <a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>" ><?php _e( 'Dismiss' ); ?></a>109 <a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>" aria-label="<?php _e( 'Dismiss the welcome panel' ); ?>"><?php _e( 'Dismiss' ); ?></a> 110 110 <?php 111 111 /** 112 112 * Add content to the welcome panel on the admin dashboard.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)