Changeset 38940 for trunk/src/wp-includes/nav-menu-template.php
- Timestamp:
- 10/26/2016 01:57:57 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu-template.php
r38882 r38940 335 335 336 336 $front_page_url = home_url(); 337 $front_page_id = (int) get_option( 'page_on_front' ); 337 338 338 339 foreach ( (array) $menu_items as $key => $menu_item ) { … … 344 345 $classes[] = 'menu-item-type-' . $menu_item->type; 345 346 $classes[] = 'menu-item-object-' . $menu_item->object; 347 348 // This menu item is set as the 'Front Page'. 349 if ( 'post_type' === $menu_item->type && $front_page_id === (int) $menu_item->object_id ) { 350 $classes[] = 'menu-item-home'; 351 } 346 352 347 353 // if the menu item corresponds to a taxonomy term for the currently-queried non-hierarchical post object … … 376 382 $classes[] = 'page-item-' . $menu_item->object_id; 377 383 $classes[] = 'current_page_item'; 378 }379 380 if ( 'page_on_front' ) {381 $classes[] = 'menu-item-home';382 384 } 383 385
Note: See TracChangeset
for help on using the changeset viewer.