Ticket #29890: 29890.diff
File 29890.diff, 1.7 KB (added by , 10 years ago) |
---|
-
src/wp-includes/nav-menu-template.php
153 153 /** This filter is documented in wp-includes/post-template.php */ 154 154 $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; 155 155 $item_output .= '</a>'; 156 if ( $args->description ) { 157 $item_output .= '<span class="menu-item-description">' . $item->description . '</span>'; 158 } 156 159 $item_output .= $args->after; 157 160 158 161 /** … … 220 223 * in order to be selectable by the user. 221 224 * @type string $items_wrap How the list items should be wrapped. Default is a ul with an id and class. 222 225 * Uses printf() format with numbered placeholders. 226 * @type bool $description Whether to show menu item descriptions. Default false. 223 227 * } 224 228 * @return mixed Menu output if $echo is false, false if there are no items or no menu was found. 225 229 */ … … 228 232 229 233 $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 230 234 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 231 'depth' => 0, 'walker' => '', 'theme_location' => '' );235 'depth' => 0, 'walker' => '', 'theme_location' => '', 'description' => false ); 232 236 233 237 $args = wp_parse_args( $args, $defaults ); 234 238 /**