Interactivity API: Increase hook priority for processing directives.
Use a priority of 100 to ensure that other filters can add additional directives before the processing starts. This way, directives will be processed even if the `$parsed_block` variable is edited by a filter. Props cbravobernal, swissspidy, flixos90, joemcgill, gziolo. Fixes #60743. Built from https://develop.svn.wordpress.org/trunk@57826 git-svn-id: http://core.svn.wordpress.org/trunk@57327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9958729416
commit
858da6cbc5
|
@ -57,16 +57,20 @@ function wp_interactivity_process_directives_of_interactive_blocks( array $parse
|
|||
};
|
||||
|
||||
/*
|
||||
* Uses a priority of 20 to ensure that other filters can add additional
|
||||
* Uses a priority of 100 to ensure that other filters can add additional
|
||||
* directives before the processing starts.
|
||||
*/
|
||||
add_filter( 'render_block_' . $block_name, $process_interactive_blocks, 20, 2 );
|
||||
add_filter( 'render_block_' . $block_name, $process_interactive_blocks, 100, 2 );
|
||||
}
|
||||
}
|
||||
|
||||
return $parsed_block;
|
||||
}
|
||||
add_filter( 'render_block_data', 'wp_interactivity_process_directives_of_interactive_blocks' );
|
||||
/*
|
||||
* Uses a priority of 100 to ensure that other filters can add additional attributes to
|
||||
* $parsed_block before the processing starts.
|
||||
*/
|
||||
add_filter( 'render_block_data', 'wp_interactivity_process_directives_of_interactive_blocks', 100, 1 );
|
||||
|
||||
/**
|
||||
* Retrieves the main WP_Interactivity_API instance.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.6-alpha-57824';
|
||||
$wp_version = '6.6-alpha-57826';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue