Changeset 25741
- Timestamp:
- 10/09/2013 06:46:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/nav-menu.php
r25643 r25741 300 300 $output .= '<label class="menu-item-title">'; 301 301 $output .= '<input type="checkbox" class="menu-item-checkbox'; 302 if ( property_exists( $item, 'front_or_home' ) && $item->front_or_home ) { 303 $title = sprintf( _x( 'Home: %s', 'nav menu front page title' ), get_the_title( $item->ID ) );302 303 if ( ! empty( $item->front_or_home ) ) 304 304 $output .= ' add-to-top'; 305 } elseif ( property_exists( $item, 'label' ) ) { 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 ) ) { 306 309 $title = $item->label; 307 } 308 $output .= '" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="'. esc_attr( $item->object_id ) .'" /> '; 309 if ( isset( $item->post_type ) ) 310 $output .= empty( $item->label ) ? esc_html( get_the_title( $item->ID ) ) : esc_html( $item->label ); 311 else 312 $output .= isset( $title ) ? esc_html( $title ) : esc_html( $item->title ); 310 } elseif ( isset( $item->post_type ) ) { 311 //duplicate_hook 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 ); 313 318 $output .= '</label>'; 314 319
Note: See TracChangeset
for help on using the changeset viewer.