WordPress.org

Make WordPress Core

Ticket #14053: menu-item-object-class.14053.diff

File menu-item-object-class.14053.diff, 664 bytes (added by filosofo, 5 years ago)
  • wp-includes/nav-menu-template.php

     
    311311                $classes = (array) $menu_item->classes; 
    312312                $classes[] = 'menu-item'; 
    313313                $classes[] = 'menu-item-type-' . $menu_item->type; 
     314                $classes[] = 'menu-item-object-' . $menu_item->object; 
    314315 
    315316                // if the menu item corresponds to a taxonomy term for the currently-queried non-hierarchical post object 
    316317                if ( $wp_query->is_singular && 'taxonomy' == $menu_item->type && in_array( $menu_item->object_id, $possible_object_parents ) ) {