💥 TRENDING: Changeset/ - Full Archive

Changeset 61285


Ignore:
Timestamp:
11/24/2025 08:05:57 AM (5 weeks ago)
Author:
wildworks
Message:

Editor: Rename block visibility support key to visibility.

Renames the support key to visibility to avoid conflicting with the Block Visibility plugin's existing blockVisibility key.

Follow-up to [61014].

Props andrewserong, annezazu, cbravobernal, dlh, jorbin, joen, johnjamesjacoby, palak678, ramonopoly, talldanwp, tyxla, wildworks.
Fixes #64272.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-supports/block-visibility.php

    r61014 r61285  
    2020    $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] );
    2121
    22     if ( ! $block_type || ! block_has_support( $block_type, 'blockVisibility', true ) ) {
     22    if ( ! $block_type || ! block_has_support( $block_type, 'visibility', true ) ) {
    2323        return $block_content;
    2424    }
  • trunk/tests/phpunit/tests/block-supports/block-visibility.php

    r61014 r61285  
    6464        $block_type = $this->register_visibility_block_with_support(
    6565            'test/visibility-block',
    66             array( 'blockVisibility' => true )
     66            array( 'visibility' => true )
    6767        );
    6868
     
    9191        $block_type = $this->register_visibility_block_with_support(
    9292            'test/visibility-block',
    93             array( 'blockVisibility' => false )
     93            array( 'visibility' => false )
    9494        );
    9595
Note: See TracChangeset for help on using the changeset viewer.