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
1173
1174           /**
1175            * Filter the Walker class used to render a menu formatted for editing.
1176            *
1177            * @since 3.0.0
1178            *
1179            * @param string $walker_class_name The Walker class used to render a menu formatted for editing.
1180            * @param int    $menu_id           The ID of the menu being rendered.
1181            */
1182           $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $menu_id );
1183
1184           if ( class_exists( $walker_class_name ) )
1185                $walker = new $walker_class_name;
1186           else
1187                return new WP_Error( 'menu_walker_not_exist', sprintf( __('The Walker class named <strong>%s</strong> does not exist.'), $walker_class_name ) );
1188
1189           $some_pending_menu_items = $some_invalid_menu_items = false;
1190           foreach( (array) $menu_items as $menu_item ) {
1191                if ( isset( $menu_item->post_status ) && 'draft' == $menu_item->post_status )