Changeset 23565 for trunk/wp-includes/nav-menu-template.php
- Timestamp:
- 03/01/2013 05:06:35 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu-template.php
r23309 r23565 81 81 $output .= $indent . '<li' . $id . $value . $class_names .'>'; 82 82 83 $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; 84 $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; 85 $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; 86 $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; 83 $atts = array(); 84 $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : ''; 85 $atts['target'] = ! empty( $item->target ) ? $item->target : ''; 86 $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : ''; 87 $atts['href'] = ! empty( $item->url ) ? $item->url : ''; 88 89 $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args ); 90 91 $attributes = ''; 92 foreach ( $atts as $attr => $value ) { 93 if ( ! empty( $value ) ) { 94 $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); 95 $attributes .= ' ' . $attr . '="' . $value . '"'; 96 } 97 } 87 98 88 99 $item_output = $args->before;
Note: See TracChangeset
for help on using the changeset viewer.