interactivity_process_directives
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 | 504 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$enabled
|
Whether the directives processing is enabled. |
Usage Examples
Basic Usage
<?php
// Hook into interactivity_process_directives
add_filter('interactivity_process_directives', '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:504
- How this hook is used in WordPress core
<?php
499 *
500 * @since 6.6.0
501 *
502 * @param bool $enabled Whether the directives processing is enabled.
503 */
504 $interactivity_process_directives_enabled = apply_filters( 'interactivity_process_directives', true );
505 if (
506 $interactivity_process_directives_enabled && null === $root_interactive_block && (
507 ( isset( $this->block_type->supports['interactivity'] ) && true === $this->block_type->supports['interactivity'] ) ||
508 ! empty( $this->block_type->supports['interactivity']['interactive'] )
509 )
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.