Changeset 47903 for trunk/src/wp-includes/admin-bar.php
- Timestamp:
- 06/03/2020 07:55:54 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/admin-bar.php
r47808 r47903 697 697 */ 698 698 function wp_admin_bar_edit_menu( $wp_admin_bar ) { 699 global $tag, $wp_the_query, $user_id ;699 global $tag, $wp_the_query, $user_id, $post_id; 700 700 701 701 if ( is_admin() ) { 702 $current_screen = get_current_screen(); 703 $post = get_post(); 702 $current_screen = get_current_screen(); 703 $post = get_post(); 704 $post_type_object = null; 704 705 705 706 if ( 'post' === $current_screen->base ) { … … 707 708 } elseif ( 'edit' === $current_screen->base ) { 708 709 $post_type_object = get_post_type_object( $current_screen->post_type ); 709 } 710 711 if ( 'post' === $current_screen->base 710 } elseif ( 'edit-comments' === $current_screen->base && $post_id ) { 711 $post = get_post( $post_id ); 712 if ( $post ) { 713 $post_type_object = get_post_type_object( $post->post_type ); 714 } 715 } 716 717 if ( ( 'post' === $current_screen->base || 'edit-comments' === $current_screen->base ) 712 718 && 'add' !== $current_screen->action 713 719 && ( $post_type_object )
Note: See TracChangeset
for help on using the changeset viewer.