Skip to content
Prev Previous commit
Remove unnecessary show_in_rest conditional
Co-authored-by: Pascal Birchler <pascalb@google.com>
  • Loading branch information
SantosGuillamot and swissspidy authored Feb 28, 2024
commit 471745df93299c16abd4eecb9f88f545d6e6c30c
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.5/block-bindings/post-meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function gutenberg_block_bindings_post_meta_callback( $source_attrs, $block_inst
$meta_keys = get_registered_meta_keys( 'post', $block_instance->context['postType'] );
// Add fields registered for all subtypes.
$meta_keys = array_merge( $meta_keys, get_registered_meta_keys( 'post', '' ) );
if ( empty( $meta_keys[ $source_attrs['key'] ]['show_in_rest'] ) || false === $meta_keys[ $source_attrs['key'] ]['show_in_rest'] ) {
if ( empty( $meta_keys[ $source_attrs['key'] ]['show_in_rest'] ) ) {
return null;
}

Expand Down