File Manager Lite
Dir:
/home/u540325668/domains/babyswimzone.com/public_html/wp-includes/block-supports
Upload
[..]
aria-label.php (1.57 KB)
Edit
Rename
Del
background.php (4.05 KB)
Edit
Rename
Del
block-style-variations.php (9.2 KB)
Edit
Rename
Del
block-visibility.php (854 B)
Edit
Rename
Del
border.php (6.27 KB)
Edit
Rename
Del
colors.php (5.81 KB)
Edit
Rename
Del
custom-classname.php (1.64 KB)
Edit
Rename
Del
dimensions.php (5.28 KB)
Edit
Rename
Del
duotone.php (2.67 KB)
Edit
Rename
Del
elements.php (8.46 KB)
Edit
Rename
Del
generated-classname.php (1.7 KB)
Edit
Rename
Del
position.php (4.24 KB)
Edit
Rename
Del
settings.php (4.52 KB)
Edit
Rename
Del
spacing.php (2.81 KB)
Edit
Rename
Del
typography.php (29.08 KB)
Edit
Rename
Del
utils.php (1011 B)
Edit
Rename
Del
Edit: block-visibility.php
<?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 );
Simpan