pre_render_block
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 | 542 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$enabled
|
Whether the directives processing is enabled. |
Usage Examples
Basic Usage
<?php
// Hook into pre_render_block
add_filter('pre_render_block', '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:542
- How this hook is used in WordPress core
<?php
537 } else {
538 $inner_block = $this->inner_blocks[ $index ];
539 $parent_block = $this;
540
541 /** This filter is documented in wp-includes/blocks.php */
542 $pre_render = apply_filters( 'pre_render_block', null, $inner_block->parsed_block, $parent_block );
543
544 if ( ! is_null( $pre_render ) ) {
545 $block_content .= $pre_render;
546 } else {
547 $source_block = $inner_block->parsed_block;
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.