Changeset 21868 for trunk/wp-includes/nav-menu-template.php
- Timestamp:
- 09/16/2012 05:07:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu-template.php
r21664 r21868 167 167 $menu_items = wp_get_nav_menu_items( $menu->term_id ); 168 168 169 // If no menu was found or if the menu has no items and no location was requested, call the fallback_cb if it exists 169 /* 170 * If no menu was found: 171 * - Fallback (if one was specified), or bail. 172 * 173 * If no menu items were found: 174 * - Fallback, but only if no theme location was specified. 175 * - Otherwise, bail. 176 */ 170 177 if ( ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) && !$args->theme_location ) ) 171 178 && $args->fallback_cb && is_callable( $args->fallback_cb ) ) 172 179 return call_user_func( $args->fallback_cb, (array) $args ); 173 180 174 // If no fallback function was specified and the menu doesn't exists, bail. 175 if ( !$menu || is_wp_error($menu) ) 181 if ( !$menu || is_wp_error( $menu ) || empty( $menu_items ) ) 176 182 return false; 177 183
Note: See TracChangeset
for help on using the changeset viewer.