WordPress.org

Make WordPress Core

Ticket #12881: new_hooks_for_nav-menu.php.diff

File new_hooks_for_nav-menu.php.diff, 471 bytes (added by mikeschinkel, 5 years ago)

Hooks on return values of wp_get_nav_menu_items() and wp_setup_nav_menu_item() in /wp-includes/nav-menu.php

  • wp-includes/nav-menu.php

     
    164164                        return $output; 
    165165                } 
    166166        } 
    167         return $items; 
     167return apply_filters('wp_get_nav_menu_items',$items); 
    168168} 
    169169 
    170170/** 
     
    278278                        $menu_item->xfn = ''; 
    279279                        break; 
    280280        } 
    281         return $menu_item; 
     281        return apply_filters('wp_setup_nav_menu_item',$menu_item); 
    282282} 
    283283?>