Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: the_title

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
303           if ( ! empty( $item->front_or_home ) )
304                $output .= ' add-to-top';
305
306           $output .= '" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="'. esc_attr( $item->object_id ) .'" /> ';
307
308           if ( ! empty( $item->label ) ) {
309                $title = $item->label;
310           } elseif ( isset( $item->post_type ) ) {
311                /** This filter is documented in wp-includes/post-template.php */
312                $title = apply_filters( 'the_title', $item->post_title, $item->ID );
313                if ( ! empty( $item->front_or_home ) && _x( 'Home', 'nav menu home label' ) !== $title )
314                     $title = sprintf( _x( 'Home: %s', 'nav menu front page title' ), $title );
315           }
316
317           $output .= isset( $title ) ? esc_html( $title ) : esc_html( $item->title );
318            $output .= '</label>';
319
320           // Menu item hidden fields
321           $output .= '<input type="hidden" class="menu-item-db-id" name="menu-item[' . $possible_object_id . '][menu-item-db-id]" value="' . $possible_db_id . '" />';