|
Server IP : 10.123.20.5 / Your IP : 216.73.216.53 Web Server : Apache System : Linux webm005.cluster123.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : wqgepnx ( 163969) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/wqgepnx/www/wp-includes/sodium_compat/../block-supports/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
* Block visibility block support flag.
*
* @package WordPress
* @since 6.9.0
*/
/**
* Render nothing if the block is hidden.
*
* @since 6.9.0
* @access private
*
* @param string $block_content Rendered block content.
* @param array $block Block object.
* @return string Filtered block content.
*/
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, 'visibility', true ) ) {
return $block_content;
}
if ( isset( $block['attrs']['metadata']['blockVisibility'] ) && false === $block['attrs']['metadata']['blockVisibility'] ) {
return '';
}
return $block_content;
}
add_filter( 'render_block', 'wp_render_block_visibility_support', 10, 2 );