WordPress.org

Make WordPress Core

Ticket #16798: 16798.patch

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

     
    290290        } else { 
    291291                $current_object = get_queried_object(); 
    292292 
    293                 if ( empty($current_object) ) 
     293                if ( empty($current_object) || !is_main_query() ) 
    294294                        return; 
    295295 
    296296                if ( ! empty( $current_object->post_type )