Changeset 45926 for trunk/src/wp-admin/includes/dashboard.php
- Timestamp:
- 09/01/2019 05:12:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/dashboard.php
r45883 r45926 270 270 if ( $num_posts && $num_posts->publish ) { 271 271 if ( 'post' == $post_type ) { 272 /* translators: %s: number of posts */ 272 273 $text = _n( '%s Post', '%s Posts', $num_posts->publish ); 273 274 } else { 275 /* translators: %s: number of pages */ 274 276 $text = _n( '%s Page', '%s Pages', $num_posts->publish ); 275 277 } … … 286 288 $num_comm = wp_count_comments(); 287 289 if ( $num_comm && ( $num_comm->approved || $num_comm->moderated ) ) { 290 /* translators: %s: number of comments */ 288 291 $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) ); 289 292 ?> … … 291 294 <?php 292 295 $moderated_comments_count_i18n = number_format_i18n( $num_comm->moderated ); 293 /* translators: %s: number of comments in moderation*/296 /* translators: %s: number of comments */ 294 297 $text = sprintf( _n( '%s Comment in moderation', '%s Comments in moderation', $num_comm->moderated ), $moderated_comments_count_i18n ); 295 298 ?> … … 581 584 echo '<div class="drafts">'; 582 585 if ( count( $drafts ) > 3 ) { 583 echo '<p class="view-all"><a href="' . esc_url( admin_url( 'edit.php?post_status=draft' ) ) . '">' . __( 'View all drafts' ) . "</a></p>\n"; 586 printf( 587 '<p class="view-all"><a href="%s">%s</a></p>' . "\n", 588 esc_url( admin_url( 'edit.php?post_status=draft' ) ), 589 __( 'View all drafts' ) 590 ); 584 591 } 585 592 echo '<h2 class="hide-if-no-js">' . __( 'Your Recent Drafts' ) . "</h2>\n<ul>"; … … 593 600 $title = _draft_or_post_title( $draft->ID ); 594 601 echo "<li>\n"; 595 /* translators: %s: post title */ 596 echo '<div class="draft-title"><a href="' . esc_url( $url ) . '" aria-label="' . esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ) . '">' . esc_html( $title ) . '</a>'; 597 echo '<time datetime="' . get_the_time( 'c', $draft ) . '">' . get_the_time( __( 'F j, Y' ), $draft ) . '</time></div>'; 602 printf( 603 '<div class="draft-title"><a href="%s" aria-label="%s">%s</a><time datetime="%s">%s</time></div>', 604 esc_url( $url ), 605 /* translators: %s: post title */ 606 esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ), 607 esc_html( $title ), 608 get_the_time( 'c', $draft ), 609 get_the_time( __( 'F j, Y' ), $draft ) 610 ); 598 611 $the_content = wp_trim_words( $draft->post_content, $draft_length ); 599 612 if ( $the_content ) { … … 1496 1509 if ( $response ) { 1497 1510 if ( $response['insecure'] ) { 1498 /* translators: %s: browser name and link */1499 1511 $msg = sprintf( 1512 /* translators: %s: browser name and link */ 1500 1513 __( "It looks like you're using an insecure version of %s. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser." ), 1501 1514 sprintf( '<a href="%s">%s</a>', esc_url( $response['update_url'] ), esc_html( $response['name'] ) ) 1502 1515 ); 1503 1516 } else { 1504 /* translators: %s: browser name and link */1505 1517 $msg = sprintf( 1518 /* translators: %s: browser name and link */ 1506 1519 __( "It looks like you're using an old version of %s. For the best WordPress experience, please update your browser." ), 1507 1520 sprintf( '<a href="%s">%s</a>', esc_url( $response['update_url'] ), esc_html( $response['name'] ) ) … … 1524 1537 } 1525 1538 1526 $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>'; 1539 $notice .= '<p>' . sprintf( 1540 /* translators: 1: browser update URL, 2: browser name, 3: Browse Happy URL */ 1541 __( '<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>' ), 1542 esc_attr( $response['update_url'] ), 1543 esc_html( $response['name'] ), 1544 esc_url( $browsehappy ) 1545 ) . '</p>'; 1527 1546 $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__( 'Dismiss the browser warning panel' ) . '">' . __( 'Dismiss' ) . '</a></p>'; 1528 1547 $notice .= '<div class="clear"></div>'; … … 1698 1717 <?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?> 1699 1718 <?php $themes_link = current_user_can( 'customize' ) ? add_query_arg( 'autofocus[panel]', 'themes', admin_url( 'customize.php' ) ) : admin_url( 'themes.php' ); ?> 1700 <p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), $themes_link ); ?></p> 1719 <p class="hide-if-no-customize"> 1720 <?php 1721 /* translators: %s: URL to Themes panel in Customizer or Themes screen */ 1722 printf( __( 'or, <a href="%s">change your theme completely</a>' ), $themes_link ); 1723 ?> 1724 </p> 1701 1725 <?php endif; ?> 1702 1726 </div> … … 1726 1750 if ( current_theme_supports( 'widgets' ) && current_theme_supports( 'menus' ) ) { 1727 1751 $widgets_menus_link = sprintf( 1752 /* translators: 1: URL to Widgets screen, 2: URL to Menus screen */ 1728 1753 __( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ), 1729 1754 admin_url( 'widgets.php' ),
Note: See TracChangeset
for help on using the changeset viewer.