-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactivity API: Fix interactivity api e2e tests. #59836
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,16 +58,20 @@ function wp_interactivity_process_directives_of_interactive_blocks( array $parse | |
}; | ||
|
||
/* | ||
* Uses a priority of 20 to ensure that other filters can add additional | ||
* directives before the processing starts. | ||
*/ | ||
add_filter( 'render_block_' . $block_name, $process_interactive_blocks, 20, 2 ); | ||
* 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, 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 edit $parsed_block | ||
* without crashing the SSR. | ||
*/ | ||
add_filter( 'render_block_data', 'wp_interactivity_process_directives_of_interactive_blocks', 100 ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. core has 1 as the last argument here, although I think that's the default and maybe it should be omitted in core. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it should be omitted, pointless to add the default |
||
} | ||
|
||
if ( ! function_exists( 'wp_interactivity' ) ) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matches core 👍