Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: nav_menu_meta_box_object

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
1503           $type = 'taxonomy';
1504           $callback = 'wp_nav_menu_item_taxonomy_meta_box';
1505           $items = (array) get_taxonomies( array( 'show_ui' => true ), 'object' );
1506      }
1507
1508      if ( ! empty( $_POST['item-object'] ) && isset( $items[$_POST['item-object']] ) ) {
1509           $menus_meta_box_object = $items[ $_POST['item-object'] ];
1510
1511           /** This filter is documented in wp-admin/includes/nav-menu.php */
1512           $item = apply_filters( 'nav_menu_meta_box_object', $menus_meta_box_object );
1513           ob_start();
1514           call_user_func_array($callback, array(
1515                null,
1516                array(
1517                     'id' => 'add-' . $item->name,
1518                     'title' => $item->labels->name,
1519                     'callback' => $callback,
1520                     'args' => $item,
1521                )