WordPress.org

Make WordPress Core

Ticket #46382: 46382.diff

File 46382.diff, 687 bytes (added by mukesh27, 9 months ago)

Working patch.

  • wp-includes/class-walker-nav-menu.php

    diff --git a/wp-includes/class-walker-nav-menu.php b/wp-includes/class-walker-nav-menu.php
    index f46f14c..787b433 100644
    a b class Walker_Nav_Menu extends Walker { 
    174174                $atts['target']       = ! empty( $item->target ) ? $item->target : '';
    175175                $atts['rel']          = ! empty( $item->xfn ) ? $item->xfn : '';
    176176                $atts['href']         = ! empty( $item->url ) ? $item->url : '';
    177                 $atts['aria-current'] = $item->current ? 'page' : '';
     177                $atts['aria-current'] = ! empty( $item->current ) ? 'page' : '';
    178178
    179179                /**
    180180                 * Filters the HTML attributes applied to a menu item's anchor element.