render_block_data
Filter HookDescription
Filters whether Interactivity API should process directives.Hook Information
File Location |
wp-includes/class-wp-block.php
View on GitHub
|
Hook Type | Filter |
Line Number | 551 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$enabled
|
Whether the directives processing is enabled. |
Usage Examples
Basic Usage
<?php
// Hook into render_block_data
add_filter('render_block_data', 'my_custom_filter', 10, 1);
function my_custom_filter($enabled) {
// Your custom filtering logic here
return $enabled;
}
Source Code Context
wp-includes/class-wp-block.php:551
- How this hook is used in WordPress core
<?php
546 } else {
547 $source_block = $inner_block->parsed_block;
548 $inner_block_context = $inner_block->context;
549
550 /** This filter is documented in wp-includes/blocks.php */
551 $inner_block->parsed_block = apply_filters( 'render_block_data', $inner_block->parsed_block, $source_block, $parent_block );
552
553 /** This filter is documented in wp-includes/blocks.php */
554 $inner_block->context = apply_filters( 'render_block_context', $inner_block->context, $inner_block->parsed_block, $parent_block );
555
556 /*
PHP Documentation
<?php
/**
* Filters whether Interactivity API should process directives.
*
* @since 6.6.0
*
* @param bool $enabled Whether the directives processing is enabled.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-block.php
Related Hooks
Related hooks will be displayed here in future updates.