Skip to content

Commit 9859fcb

Browse files
Update includes/utils.php
Co-authored-by: Felipe Elia <felipe.elia@fueled.com>
1 parent 3debfc1 commit 9859fcb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

includes/utils.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,8 +945,9 @@ function is_top_level_admin_context() {
945945
* @return array Registered post type names on success, empty array otherwise.
946946
*/
947947
function get_post_types_for_tax_query( ?\WP_Query $query = null ): array {
948+
global $wp_query;
949+
948950
if ( null === $query ) {
949-
global $wp_query;
950951
$query = $wp_query;
951952
}
952953

0 commit comments

Comments
 (0)