Changeset 44924 for trunk/src/wp-admin/menu.php
- Timestamp:
- 03/18/2019 03:21:17 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/menu.php
r43223 r44924 43 43 $cap = 'update_languages'; 44 44 } 45 /* translators: %s: number of pending updates */ 45 46 $submenu['index.php'][10] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}'><span class='update-count'>" . number_format_i18n( $update_data['counts']['total'] ) . '</span></span>' ), $cap, 'update-core.php' ); 46 47 unset( $cap ); … … 75 76 // Avoid the comment count query for users who cannot edit_posts. 76 77 if ( current_user_can( 'edit_posts' ) ) { 77 $awaiting_mod = wp_count_comments(); 78 $awaiting_mod = $awaiting_mod->moderated; 79 $menu[25] = array( 80 sprintf( __( 'Comments %s' ), '<span class="awaiting-mod count-' . absint( $awaiting_mod ) . '"><span class="pending-count">' . number_format_i18n( $awaiting_mod ) . '</span></span>' ), 78 $awaiting_mod = wp_count_comments(); 79 $awaiting_mod = $awaiting_mod->moderated; 80 $awaiting_mod_i18n = number_format_i18n( $awaiting_mod ); 81 /* translators: %s: number of comments in moderation */ 82 $awaiting_mod_text = sprintf( _n( '%s Comment in moderation', '%s Comments in moderation', $awaiting_mod ), $awaiting_mod_i18n ); 83 84 $menu[25] = array( 85 /* translators: %s: number of comments in moderation */ 86 sprintf( __( 'Comments %s' ), '<span class="awaiting-mod count-' . absint( $awaiting_mod ) . '"><span class="pending-count" aria-hidden="true">' . $awaiting_mod_i18n . '</span><span class="comments-in-moderation-text screen-reader-text">' . $awaiting_mod_text . '</span></span>' ), 81 87 'edit_posts', 82 88 'edit-comments.php', … … 215 221 } 216 222 223 /* translators: %s: number of pending plugin updates */ 217 224 $menu[65] = array( sprintf( __( 'Plugins %s' ), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' ); 218 225 … … 265 272 266 273 $change_notice = ''; 267 if ( current_user_can( 'manage_privacy_options' ) && WP_Privacy_Policy_Content::text_change_check() ) { 268 $change_notice = ' <span class="update-plugins 1"><span class="plugin-count">' . number_format_i18n( 1 ) . '</span></span>'; 269 } 270 271 // translators: %s is the update notification bubble, if updates are available. 274 if ( current_user_can( 'manage_privacy_options' ) && ! WP_Privacy_Policy_Content::text_change_check() ) { 275 $change_notice_number = number_format_i18n( 1 ); 276 /* translators: %s: number of Privacy Policy update is always 1 */ 277 $change_notice_text = sprintf( __( '%s Privacy Policy update' ), $change_notice_number ); 278 $change_notice = '<span class="update-plugins 1"><span class="plugin-count" aria-hidden="true">' . $change_notice_number . '</span><span class="screen-reader-text">' . $change_notice_text . '</span></span>'; 279 } 280 281 /* translators: %s: update notification bubble, if updates are available */ 272 282 $menu[80] = array( sprintf( __( 'Settings %s' ), $change_notice ), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' ); 273 283 $submenu['options-general.php'][10] = array( _x( 'General', 'settings screen' ), 'manage_options', 'options-general.php' ); … … 277 287 $submenu['options-general.php'][30] = array( __( 'Media' ), 'manage_options', 'options-media.php' ); 278 288 $submenu['options-general.php'][40] = array( __( 'Permalinks' ), 'manage_options', 'options-permalink.php' ); 279 / / translators: %s is the update notification bubble, if updates are available.289 /* translators: %s: update notification bubble, if updates are available */ 280 290 $submenu['options-general.php'][45] = array( sprintf( __( 'Privacy %s' ), $change_notice ), 'manage_privacy_options', 'privacy.php' ); 281 291
Note: See TracChangeset
for help on using the changeset viewer.