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 |
---|---|
1505 | if ( ! empty( $menu_obj->ID ) ) { |
1506 | $menu_obj = wp_setup_nav_menu_item( $menu_obj ); |
1507 | $menu_obj->title = empty( $menu_obj->title ) ? __( 'Menu Item' ) : $menu_obj->title; |
1508 | $menu_obj->label = $menu_obj->title; // Don't show "(pending)" in ajax-added items. |
1509 | $menu_items[] = $menu_obj; |
1510 | } |
1511 | } |
1512 |
|
1513 | /** This filter is documented in wp-admin/includes/nav-menu.php */ |
1514 | $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] ); |
1515 |
|
1516 | if ( ! class_exists( $walker_class_name ) ) { |
1517 | wp_die( 0 ); |
1518 | } |
1519 |
|
1520 | if ( ! empty( $menu_items ) ) { |
1521 | $args = array( |
1522 | 'after' => '', |
1523 | 'before' => '', |