WordPress.org

Make WordPress Core

Ticket #16798: 16798.2.patch

File 16798.2.patch, 612 bytes (added by SergeyBiryukov, 3 years ago)
  • wp-includes/admin-bar.php

     
    260260 * @since 3.1.0 
    261261 */ 
    262262function wp_admin_bar_edit_menu( $wp_admin_bar ) { 
    263         global $post, $tag; 
     263        global $post, $tag, $wp_the_query; 
    264264 
    265265        if ( is_admin() ) { 
    266266                $current_screen = get_current_screen(); 
     
    288288                        ) ); 
    289289                } 
    290290        } else { 
    291                 $current_object = get_queried_object(); 
     291                $current_object = $wp_the_query->get_queried_object(); 
    292292 
    293293                if ( empty($current_object) ) 
    294294                        return;