Changeset 14182
- Timestamp:
- 04/21/2010 09:32:08 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu-template.php
r14031 r14182 18 18 * format - Whether to format the ul. Defaults to 'div'. 19 19 * fallback_cb - If the menu doesn't exists, a callback function will fire. Defaults to 'wp_page_menu'. 20 * container - Type of container tag. Avalible options div, p, or nav. Defaults to 'div'. 21 * container_class - Chooses a class for the container. 22 * container_id - Chooses an id for the container. 20 23 * before - Text before the link text. 21 24 * after - Text after the link text. … … 31 34 */ 32 35 function wp_nav_menu( $args = array() ) { 33 $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', ' menu_class' => 'menu', 'echo' => true,36 $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'echo' => true, 34 37 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 35 38 'depth' => 0, 'walker' => '', 'context' => 'frontend' ); … … 71 74 if ( in_array( $args->container, $container_allowedtags ) ) { 72 75 $class = $args->container_class ? ' class="' . esc_attr($args->container_class) . '"' : ' class="menu-'. $menu->slug .'-container"'; 73 $nav_menu .= '<'. $args->container . $class .'>'; 76 $container_id = $args->container_id ? ' id="' . esc_attr($args->container_id) . '"' : '' ; 77 $nav_menu .= '<'. $args->container . $class . $container_id .'>'; 74 78 } 75 79
Note: See TracChangeset
for help on using the changeset viewer.