--- a/wp/wp-includes/admin-bar.php Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/admin-bar.php Wed Sep 21 18:19:35 2022 +0200
@@ -131,7 +131,7 @@
$wp_logo_menu_args = array(
'id' => 'wp-logo',
- 'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'About WordPress' ) . '</span>',
+ 'title' => '<span class="ab-icon" aria-hidden="true"></span><span class="screen-reader-text">' . __( 'About WordPress' ) . '</span>',
'href' => $about_url,
);
@@ -166,13 +166,13 @@
)
);
- // Add Codex link.
+ // Add documentation link.
$wp_admin_bar->add_node(
array(
'parent' => 'wp-logo-external',
'id' => 'documentation',
'title' => __( 'Documentation' ),
- 'href' => __( 'https://codex.wordpress.org/' ),
+ 'href' => __( 'https://wordpress.org/support/' ),
)
);
@@ -182,7 +182,7 @@
'parent' => 'wp-logo-external',
'id' => 'support-forums',
'title' => __( 'Support' ),
- 'href' => __( 'https://wordpress.org/support/' ),
+ 'href' => __( 'https://wordpress.org/support/forums/' ),
)
);
@@ -209,7 +209,7 @@
$wp_admin_bar->add_node(
array(
'id' => 'menu-toggle',
- 'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'Menu' ) . '</span>',
+ 'title' => '<span class="ab-icon" aria-hidden="true"></span><span class="screen-reader-text">' . __( 'Menu' ) . '</span>',
'href' => '#',
)
);
@@ -582,7 +582,15 @@
foreach ( (array) $wp_admin_bar->user->blogs as $blog ) {
switch_to_blog( $blog->userblog_id );
- $blavatar = '<div class="blavatar"></div>';
+ if ( has_site_icon() ) {
+ $blavatar = sprintf(
+ '<img class="blavatar" src="%s" srcset="%s 2x" alt="" width="16" height="16" />',
+ esc_url( get_site_icon_url( 16 ) ),
+ esc_url( get_site_icon_url( 32 ) )
+ );
+ } else {
+ $blavatar = '<div class="blavatar"></div>';
+ }
$blogname = $blog->blogname;
@@ -687,6 +695,7 @@
* Provide an edit link for posts and terms.
*
* @since 3.1.0
+ * @since 5.5.0 Added a "View Post" link on Comments screen for a single post.
*
* @global WP_Term $tag
* @global WP_Query $wp_the_query WordPress Query object.
@@ -878,7 +887,7 @@
return;
}
- $title = '<span class="ab-icon"></span><span class="ab-label">' . _x( 'New', 'admin bar menu group label' ) . '</span>';
+ $title = '<span class="ab-icon" aria-hidden="true"></span><span class="ab-label">' . _x( 'New', 'admin bar menu group label' ) . '</span>';
$wp_admin_bar->add_node(
array(
@@ -922,7 +931,7 @@
number_format_i18n( $awaiting_mod )
);
- $icon = '<span class="ab-icon"></span>';
+ $icon = '<span class="ab-icon" aria-hidden="true"></span>';
$title = '<span class="ab-label awaiting-mod pending-count count-' . $awaiting_mod . '" aria-hidden="true">' . number_format_i18n( $awaiting_mod ) . '</span>';
$title .= '<span class="screen-reader-text comments-in-moderation-text">' . $awaiting_text . '</span>';
@@ -1032,17 +1041,21 @@
return;
}
- $title = '<span class="ab-icon"></span><span class="ab-label">' . number_format_i18n( $update_data['counts']['total'] ) . '</span>';
- $title .= '<span class="screen-reader-text">' . $update_data['title'] . '</span>';
+ $updates_text = sprintf(
+ /* translators: %s: Total number of updates available. */
+ _n( '%s update available', '%s updates available', $update_data['counts']['total'] ),
+ number_format_i18n( $update_data['counts']['total'] )
+ );
+
+ $icon = '<span class="ab-icon" aria-hidden="true"></span>';
+ $title = '<span class="ab-label" aria-hidden="true">' . number_format_i18n( $update_data['counts']['total'] ) . '</span>';
+ $title .= '<span class="screen-reader-text updates-available-text">' . $updates_text . '</span>';
$wp_admin_bar->add_node(
array(
'id' => 'updates',
- 'title' => $title,
+ 'title' => $icon . $title,
'href' => network_admin_url( 'update-core.php' ),
- 'meta' => array(
- 'title' => $update_data['title'],
- ),
)
);
}
@@ -1062,7 +1075,7 @@
$form = '<form action="' . esc_url( home_url( '/' ) ) . '" method="get" id="adminbarsearch">';
$form .= '<input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" />';
$form .= '<label for="adminbar-search" class="screen-reader-text">' . __( 'Search' ) . '</label>';
- $form .= '<input type="submit" class="adminbar-button" value="' . __( 'Search' ) . '"/>';
+ $form .= '<input type="submit" class="adminbar-button" value="' . __( 'Search' ) . '" />';
$form .= '</form>';
$wp_admin_bar->add_node(