Changeset 47213 for trunk/src/wp-includes/nav-menu.php
- Timestamp:
- 02/08/2020 12:47:33 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu.php
r47211 r47213 818 818 if ( $object ) { 819 819 $menu_item->type_label = $object->labels->singular_name; 820 // Use post states for special pages. 821 $menu_post = get_post( $menu_item->object_id ); 822 $post_states = get_post_states( $menu_post ); 823 if ( $post_states ) { 824 $menu_item->type_label = implode( ',', $post_states ); 820 // Use post states for special pages (only in the admin). 821 if ( function_exists( 'get_post_states' ) ) { 822 $menu_post = get_post( $menu_item->object_id ); 823 $post_states = get_post_states( $menu_post ); 824 if ( $post_states ) { 825 $menu_item->type_label = implode( ',', $post_states ); 826 } 825 827 } 826 828 } else {
Note: See TracChangeset
for help on using the changeset viewer.