Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-includes/block-supports/block-visibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
function wp_render_block_visibility_support( $block_content, $block ) {
$block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] );

if ( ! $block_type || ! block_has_support( $block_type, 'blockVisibility', true ) ) {
if ( ! $block_type || ! block_has_support( $block_type, 'visibility', true ) ) {
return $block_content;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/block-supports/block-visibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private function register_visibility_block_with_support( $block_name, $supports
public function test_block_visibility_support_hides_block_when_visibility_false() {
$block_type = $this->register_visibility_block_with_support(
'test/visibility-block',
array( 'blockVisibility' => true )
array( 'visibility' => true )
);

$block_content = '<p>This is a test block.</p>';
Expand All @@ -90,7 +90,7 @@ public function test_block_visibility_support_hides_block_when_visibility_false(
public function test_block_visibility_support_shows_block_when_support_not_opted_in() {
$block_type = $this->register_visibility_block_with_support(
'test/visibility-block',
array( 'blockVisibility' => false )
array( 'visibility' => false )
);

$block_content = '<p>This is a test block.</p>';
Expand Down
Loading