Changeset 42808
- Timestamp:
- 03/08/2018 09:30:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-walker-nav-menu.php
r42343 r42808 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 : ''; 176 $atts['href'] = ! empty( $item->url ) ? $item->url : ''; 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 : ''; 176 $atts['href'] = ! empty( $item->url ) ? $item->url : ''; 177 $atts['aria-current'] = $item->current ? 'page' : ''; 177 178 178 179 /** … … 185 186 * The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored. 186 187 * 187 * @type string $title Title attribute. 188 * @type string $target Target attribute. 189 * @type string $rel The rel attribute. 190 * @type string $href The href attribute. 188 * @type string $title Title attribute. 189 * @type string $target Target attribute. 190 * @type string $rel The rel attribute. 191 * @type string $href The href attribute. 192 * @type string $aria_current The aria-current attribute. 191 193 * } 192 194 * @param WP_Post $item The current menu item.
Note: See TracChangeset
for help on using the changeset viewer.