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