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 |
|---|---|
| 93 | $output .= ' add-to-top'; |
| 94 | } |
| 95 | |
| 96 | $output .= '" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="' . esc_attr( $menu_item->object_id ) . '" /> '; |
| 97 | |
| 98 | if ( ! empty( $menu_item->label ) ) { |
| 99 | $title = $menu_item->label; |
| 100 | } elseif ( isset( $menu_item->post_type ) ) { |
| 101 | /** This filter is documented in wp-includes/post-template.php */ |
| 102 | $title = apply_filters( 'the_title', $menu_item->post_title, $menu_item->ID ); |
| 103 | } |
| 104 | |
| 105 | $output .= isset( $title ) ? esc_html( $title ) : esc_html( $menu_item->title ); |
| 106 | |
| 107 | if ( empty( $menu_item->label ) && isset( $menu_item->post_type ) && 'page' === $menu_item->post_type ) { |
| 108 | // Append post states. |
| 109 | $output .= _post_states( $menu_item, false ); |
| 110 | } |
| 111 | |