diff --git a/src/wp-includes/class-walker-category.php b/src/wp-includes/class-walker-category.php
index e5fff0e6da..997993710a 100644
--- a/src/wp-includes/class-walker-category.php
+++ b/src/wp-includes/class-walker-category.php
@@ -206,6 +206,7 @@ class Walker_Category extends Walker {
foreach ( $_current_terms as $_current_term ) {
if ( $category->term_id == $_current_term->term_id ) {
$css_classes[] = 'current-cat';
+ $link = str_replace( 'term_id == $_current_term->parent ) {
$css_classes[] = 'current-cat-parent';
}
diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
index eab85c6b7a..28d0e399e9 100644
--- a/src/wp-includes/general-template.php
+++ b/src/wp-includes/general-template.php
@@ -1735,18 +1735,19 @@ function get_the_post_type_description() {
* @return string HTML link content for archive.
*/
function get_archives_link( $url, $text, $format = 'html', $before = '', $after = '', $selected = false ) {
- $text = wptexturize( $text );
- $url = esc_url( $url );
+ $text = wptexturize( $text );
+ $url = esc_url( $url );
+ $aria_current = $selected ? ' aria-current="page"' : '';
- if ( 'link' == $format ) {
+ if ( 'link' === $format ) {
$link_html = "\t\n";
- } elseif ( 'option' == $format ) {
+ } elseif ( 'option' === $format ) {
$selected_attr = $selected ? " selected='selected'" : '';
$link_html = "\t\n";
- } elseif ( 'html' == $format ) {
- $link_html = "\t