Skip to content

Commit

Permalink
Add back check for post_type
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Dec 3, 2024
1 parent f0908fb commit 9266a18
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/compat/wordpress-6.8/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@ function gutenberg_update_ignored_hooked_blocks_postmeta( $post ) {
return $post;
}

/*
* Skip meta generation if post type is not set.
*/
if ( ! isset( $post->post_type ) ) {
return $post;
}

$attributes = array();

$ignored_hooked_blocks = get_post_meta( $post->ID, '_wp_ignored_hooked_blocks', true );
Expand Down

0 comments on commit 9266a18

Please sign in to comment.