Changeset 45141
- Timestamp:
- 04/08/2019 11:05:22 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-walker-nav-menu.php
r42877 r45141 170 170 $output .= $indent . '<li' . $id . $class_names . '>'; 171 171 172 $atts = array(); 173 $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : ''; 174 $atts['target'] = ! empty( $item->target ) ? $item->target : ''; 175 $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : ''; 172 $atts = array(); 173 $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : ''; 174 $atts['target'] = ! empty( $item->target ) ? $item->target : ''; 175 if ( '_blank' === $item->target && empty( $item->xfn ) ) { 176 $atts['rel'] = 'noopener noreferrer'; 177 } else { 178 $atts['rel'] = $item->xfn; 179 } 176 180 $atts['href'] = ! empty( $item->url ) ? $item->url : ''; 177 181 $atts['aria-current'] = $item->current ? 'page' : '';
Note: See TracChangeset
for help on using the changeset viewer.