Is it possible to add a filter for the output of nav-menu items in admin?

These fields are created in Walker_Nav_Menu_Edit::start_el(). To change or to remove them, create a custom walker (example for another walker) that extends Walker_Nav_Menu_Edit and uses other or less fields.

Then filter wp_edit_nav_menu_walker and return the class name of your walker.

Pseudo-code:

class Walker_Nav_Menu_Edit_Simple extends Walker_Nav_Menu_Edit {
    public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) 
    { /* Magic here. */}
}

add_filter( 'wp_edit_nav_menu_walker', function() {
    return 'Walker_Nav_Menu_Edit_Simple';
});

Leave a Comment