Skip to content

Commit c006161

Browse files
Update src/wp-includes/class-wp-theme-json-resolver.php
Co-authored-by: Weston Ruter <[email protected]>
1 parent 12aa4de commit c006161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/class-wp-theme-json-resolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ public static function get_user_data_from_wp_global_styles( $theme, $create_post
515515

516516
$global_style_query = new WP_Query();
517517
$recent_posts = $global_style_query->query( $args );
518-
if ( count( $recent_posts ) === 1 && is_object( $recent_posts[0] ) ) {
518+
if ( count( $recent_posts ) === 1 && $recent_posts[0] instanceof WP_Post ) {
519519
$user_cpt = get_object_vars( $recent_posts[0] );
520520
} elseif ( $create_post ) {
521521
$cpt_post_id = wp_insert_post(

0 commit comments

Comments
 (0)