Changeset 45300
- Timestamp:
- 05/09/2019 08:57:06 PM (6 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/about.php
r45287 r45300 35 35 36 36 <nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> 37 <a href="about.php" class="nav-tab nav-tab-active" ><?php _e( 'What’s New' ); ?></a>37 <a href="about.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'What’s New' ); ?></a> 38 38 <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a> 39 39 <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a> -
trunk/src/wp-admin/credits.php
r45292 r45300 19 19 <div class="wrap about-wrap full-width-layout"> 20 20 21 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1> 21 <h1> 22 <?php 23 /* translators: %s: The current WordPress version number */ 24 printf( __( 'Welcome to WordPress %s' ), $display_version ); 25 ?> 26 </h1> 22 27 23 28 <p class="about-text"><?php printf( __( 'Congratulations on updating to WordPress 5.2! This update makes it easier than ever to fix your site if something goes wrong.' ), $display_version ); ?></p> 24 29 25 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div> 30 <div class="wp-badge"> 31 <?php 32 /* translators: %s: The current WordPress version number */ 33 printf( __( 'Version %s' ), $display_version ); 34 ?> 35 </div> 26 36 27 37 <nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> 28 38 <a href="about.php" class="nav-tab"><?php _e( 'What’s New' ); ?></a> 29 <a href="credits.php" class="nav-tab nav-tab-active" ><?php _e( 'Credits' ); ?></a>39 <a href="credits.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Credits' ); ?></a> 30 40 <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a> 31 41 <a href="freedoms.php?privacy-notice" class="nav-tab"><?php _e( 'Privacy' ); ?></a> … … 39 49 if ( ! $credits ) { 40 50 echo '<p class="about-description">'; 41 /* translators: 1: https://wordpress.org/about/, 2: https://make.wordpress.org/ */42 51 printf( 52 /* translators: 1: https://wordpress.org/about/, 2: https://make.wordpress.org/ */ 43 53 __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ), 44 54 'https://wordpress.org/about/', … … 124 134 // These are strings returned by the API that we want to be translatable 125 135 __( 'Project Leaders' ); 136 /* translators: %s: The current WordPress version number */ 126 137 __( 'Core Contributors to WordPress %s' ); 127 138 __( 'Noteworthy Contributors' ); -
trunk/src/wp-admin/freedoms.php
r45292 r45300 19 19 20 20 if ( $is_privacy_notice ) { 21 $freedoms_class = ''; 22 $privacy_class = ' nav-tab-active'; 21 $freedoms_class = ''; 22 $privacy_class = ' nav-tab-active'; 23 $freedoms_aria_current = ''; 24 $privacy_aria_current = ' aria-current="page"'; 23 25 } else { 24 $freedoms_class = ' nav-tab-active'; 25 $privacy_class = ''; 26 $freedoms_class = ' nav-tab-active'; 27 $privacy_class = ''; 28 $freedoms_aria_current = ' aria-current="page"'; 29 $privacy_aria_current = ''; 26 30 } 27 31 … … 29 33 <div class="wrap about-wrap full-width-layout"> 30 34 31 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1> 35 <h1> 36 <?php 37 /* translators: %s: The current WordPress version number */ 38 printf( __( 'Welcome to WordPress %s' ), $display_version ); 39 ?> 40 </h1> 32 41 33 42 <p class="about-text"><?php printf( __( 'Congratulations on updating to WordPress 5.2! This update makes it easier than ever to fix your site if something goes wrong.' ), $display_version ); ?></p> 34 43 35 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div> 44 <div class="wp-badge"> 45 <?php 46 /* translators: %s: The current WordPress version number */ 47 printf( __( 'Version %s' ), $display_version ); 48 ?> 49 </div> 36 50 37 51 <nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> 38 52 <a href="about.php" class="nav-tab"><?php _e( 'What’s New' ); ?></a> 39 53 <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a> 40 <a href="freedoms.php" class="nav-tab<?php echo $freedoms_class; ?>" ><?php _e( 'Freedoms' ); ?></a>41 <a href="freedoms.php?privacy-notice" class="nav-tab<?php echo $privacy_class; ?>" ><?php _e( 'Privacy' ); ?></a>54 <a href="freedoms.php" class="nav-tab<?php echo $freedoms_class; ?>"<?php echo $freedoms_aria_current; ?>><?php _e( 'Freedoms' ); ?></a> 55 <a href="freedoms.php?privacy-notice" class="nav-tab<?php echo $privacy_class; ?>"<?php echo $privacy_aria_current; ?>><?php _e( 'Privacy' ); ?></a> 42 56 </nav> 43 57 … … 47 61 <p class="about-description"><?php _e( 'From time to time, your WordPress site may send data to WordPress.org — including, but not limited to — the version of WordPress you are using, and a list of installed plugins and themes.' ); ?></p> 48 62 49 <p><?php printf( __( 'This data is used to provide general enhancements to WordPress, which includes helping to protect your site by finding and automatically installing new updates. It is also used to calculate statistics, such as those shown on the <a href="%s">WordPress.org stats page</a>.' ), 'https://wordpress.org/about/stats/' ); ?></p> 63 <p> 64 <?php 65 /* translators: %s: https://wordpress.org/about/stats/ */ 66 printf( __( 'This data is used to provide general enhancements to WordPress, which includes helping to protect your site by finding and automatically installing new updates. It is also used to calculate statistics, such as those shown on the <a href="%s">WordPress.org stats page</a>.' ), 'https://wordpress.org/about/stats/' ); 67 ?> 68 </p> 50 69 51 <p><?php printf( __( 'We take privacy and transparency very seriously. To learn more about what data we collect, and how we use it, please visit <a href="%s">WordPress.org/about/privacy</a>.' ), 'https://wordpress.org/about/privacy/' ); ?></p> 70 <p> 71 <?php 72 /* translators: %s: https://wordpress.org/about/privacy/ */ 73 printf( __( 'We take privacy and transparency very seriously. To learn more about what data we collect, and how we use it, please visit <a href="%s">WordPress.org/about/privacy</a>.' ), 'https://wordpress.org/about/privacy/' ); 74 ?> 75 </p> 52 76 </div> 53 77 … … 56 80 <div class="feature-section has-1-columns"> 57 81 <h2><?php _e( 'Freedoms' ); ?></h2> 58 <p class="about-description"><?php printf( __( 'WordPress is Free and open source software, built by a distributed community of mostly volunteer developers from around the world. WordPress comes with some awesome, worldview-changing rights courtesy of its <a href="%s">license</a>, the GPL.' ), 'https://wordpress.org/about/license/' ); ?></p> 82 <p class="about-description"> 83 <?php 84 /* translators: %s: https://wordpress.org/about/license/ */ 85 printf( __( 'WordPress is Free and open source software, built by a distributed community of mostly volunteer developers from around the world. WordPress comes with some awesome, worldview-changing rights courtesy of its <a href="%s">license</a>, the GPL.' ), 'https://wordpress.org/about/license/' ); 86 ?> 87 </p> 59 88 </div> 60 89 … … 83 112 84 113 <div class="feature-section has-1-columns"> 85 <p><?php printf( __( 'WordPress grows when people like you tell their friends about it, and the thousands of businesses and services that are built on and around WordPress share that fact with their users. We’re flattered every time someone spreads the good word, just make sure to <a href="%s">check out our trademark guidelines</a> first.' ), 'https://wordpressfoundation.org/trademark-policy/' ); ?></p> 114 <p> 115 <?php 116 /* translators: %s: https://wordpressfoundation.org/trademark-policy/ */ 117 printf( __( 'WordPress grows when people like you tell their friends about it, and the thousands of businesses and services that are built on and around WordPress share that fact with their users. We’re flattered every time someone spreads the good word, just make sure to <a href="%s">check out our trademark guidelines</a> first.' ), 'https://wordpressfoundation.org/trademark-policy/' ); 118 ?> 119 </p> 86 120 87 121 <p> … … 89 123 $plugins_url = current_user_can( 'activate_plugins' ) ? admin_url( 'plugins.php' ) : __( 'https://wordpress.org/plugins/' ); 90 124 $themes_url = current_user_can( 'switch_themes' ) ? admin_url( 'themes.php' ) : __( 'https://wordpress.org/themes/' ); 91 125 /* translators: %s: https://wordpress.org/about/license/ */ 92 126 printf( __( 'Every plugin and theme in WordPress.org’s directory is 100%% GPL or a similarly free and compatible license, so you can feel safe finding <a href="%1$s">plugins</a> and <a href="%2$s">themes</a> there. If you get a plugin or theme from another source, make sure to <a href="%3$s">ask them if it’s GPL</a> first. If they don’t respect the WordPress license, we don’t recommend them.' ), $plugins_url, $themes_url, 'https://wordpress.org/about/license/' ); 93 127 ?> -
trunk/src/wp-admin/includes/ms.php
r45084 r45300 1119 1119 $classes = array( 'nav-tab' ); 1120 1120 1121 // Aria-current attribute. 1122 $aria_current = ''; 1123 1121 1124 // Selected is set by the parent OR assumed by the $pagenow global 1122 1125 if ( $r['selected'] === $link_id || $link['url'] === $GLOBALS['pagenow'] ) { 1123 $classes[] = 'nav-tab-active'; 1126 $classes[] = 'nav-tab-active'; 1127 $aria_current = ' aria-current="page"'; 1124 1128 } 1125 1129 … … 1131 1135 1132 1136 // Add link to nav links 1133 $screen_links[ $link_id ] = '<a href="' . esc_url( $url ) . '" id="' . esc_attr( $link_id ) . '" class="' . $esc_classes . '" >' . esc_html( $link['label'] ) . '</a>';1137 $screen_links[ $link_id ] = '<a href="' . esc_url( $url ) . '" id="' . esc_attr( $link_id ) . '" class="' . $esc_classes . '"' . $aria_current . '>' . esc_html( $link['label'] ) . '</a>'; 1134 1138 } 1135 1139 -
trunk/src/wp-admin/nav-menus.php
r45140 r45300 621 621 622 622 $nav_tab_active_class = ''; 623 $nav_aria_current = ''; 623 624 if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'locations' != $_GET['action'] ) { 624 625 $nav_tab_active_class = ' nav-tab-active'; 626 $nav_aria_current = ' aria-current="page"'; 625 627 } 626 628 ?> … … 629 631 630 632 <nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> 631 <a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php echo $nav_tab_active_class; ?>" ><?php esc_html_e( 'Edit Menus' ); ?></a>633 <a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php echo $nav_tab_active_class; ?>"<?php echo $nav_aria_current; ?>><?php esc_html_e( 'Edit Menus' ); ?></a> 632 634 <?php 633 635 if ( $num_locations && $menu_count ) { 634 636 $active_tab_class = ''; 637 $aria_current = ''; 635 638 if ( $locations_screen ) { 636 639 $active_tab_class = ' nav-tab-active'; 640 $aria_current = ' aria-current="page"'; 637 641 } 638 642 ?> 639 <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>" class="nav-tab<?php echo $active_tab_class; ?>" ><?php esc_html_e( 'Manage Locations' ); ?></a>643 <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>" class="nav-tab<?php echo $active_tab_class; ?>"<?php echo $aria_current; ?>><?php esc_html_e( 'Manage Locations' ); ?></a> 640 644 <?php 641 645 } … … 879 883 } 880 884 ?> 881 885 <input type="hidden" name="action" value="update" /> 882 886 <input type="hidden" name="menu" id="menu" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" /> 883 887 <div id="nav-menu-header"> … … 957 961 <span class="theme-location-set"> 958 962 <?php 959 /* translators: %s: menu name */960 963 printf( 964 /* translators: %s: menu name */ 961 965 _x( '(Currently set to: %s)', 'menu location' ), 962 966 wp_get_nav_menu_object( $menu_locations[ $location ] )->name
Note: See TracChangeset
for help on using the changeset viewer.