Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_edit_nav_menu_walker

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1514           if ( ! empty( $menu_obj->ID ) ) {
1515                $menu_obj        = wp_setup_nav_menu_item( $menu_obj );
1516                $menu_obj->title = empty( $menu_obj->title ) ? __( 'Menu Item' ) : $menu_obj->title;
1517                $menu_obj->label = $menu_obj->title; // Don't show "(pending)" in ajax-added items.
1518                $menu_items[]    = $menu_obj;
1519           }
1520      }
1521
1522      /** This filter is documented in wp-admin/includes/nav-menu.php */
1523      $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] );
1524
1525      if ( ! class_exists( $walker_class_name ) ) {
1526           wp_die( 0 );
1527      }
1528
1529      if ( ! empty( $menu_items ) ) {
1530           $args = array(
1531                'after'       => '',
1532                'before'      => '',