Ticket #16738: 16738.3.diff
File 16738.3.diff, 1.5 KB (added by , 12 years ago) |
---|
-
wp-includes/nav-menu-template.php
80 80 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 ) ? esc_url( $item->url ) : ''; 87 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 $attributes .= ' ' . $attr . '="' . esc_attr( $value ) . '"'; 95 } 96 88 97 $item_output = $args->before; 89 98 $item_output .= '<a'. $attributes .'>'; 90 99 $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;