Ticket #51299: 51299.2.diff
File 51299.2.diff, 1.3 KB (added by , 22 months ago) |
---|
-
src/wp-includes/class-walker-nav-menu.php
106 106 * 107 107 * @since 3.0.0 108 108 * @since 4.4.0 The {@see 'nav_menu_item_args'} filter was added. 109 * @since x.x.x Removed redundant title attributes. 109 110 * 110 111 * @see Walker::start_el() 111 112 * … … 169 170 170 171 $output .= $indent . '<li' . $id . $class_names . '>'; 171 172 173 /** This filter is documented in wp-includes/post-template.php */ 174 $title = apply_filters( 'the_title', $item->title, $item->ID ); 175 172 176 $atts = array(); 173 $atts['title'] = ! empty( $item->attr_title) ? $item->attr_title : '';177 $atts['title'] = ( ! empty( $item->attr_title ) && trim( strtolower( $item->attr_title ) ) != trim( strtolower( $title ) ) ) ? $item->attr_title : ''; 174 178 $atts['target'] = ! empty( $item->target ) ? $item->target : ''; 175 179 if ( '_blank' === $item->target && empty( $item->xfn ) ) { 176 180 $atts['rel'] = 'noopener'; … … 209 213 } 210 214 } 211 215 212 /** This filter is documented in wp-includes/post-template.php */213 $title = apply_filters( 'the_title', $item->title, $item->ID );214 215 216 /** 216 217 * Filters a menu item's title. 217 218 *