WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
1191 | $callback = 'wp_nav_menu_item_post_type_meta_box'; |
1192 | $items = (array) get_post_types( array( 'show_in_nav_menus' => true ), 'object' ); |
1193 | } elseif ( isset( $_POST['item-type'] ) && 'taxonomy' == $_POST['item-type'] ) { |
1194 | $type = 'taxonomy'; |
1195 | $callback = 'wp_nav_menu_item_taxonomy_meta_box'; |
1196 | $items = (array) get_taxonomies( array( 'show_ui' => true ), 'object' ); |
1197 | } |
1198 |
|
1199 | if ( ! empty( $_POST['item-object'] ) && isset( $items[$_POST['item-object']] ) ) { |
1200 | $item = apply_filters( 'nav_menu_meta_box_object', $items[ $_POST['item-object'] ] ); |
1201 | ob_start(); |
1202 | call_user_func_array($callback, array( |
1203 | null, |
1204 | array( |
1205 | 'id' => 'add-' . $item->name, |
1206 | 'title' => $item->labels->name, |
1207 | 'callback' => $callback, |
1208 | 'args' => $item, |
1209 | ) |