should_load_remote_block_patterns WordPress Filter Hook
The should_load_remote_block_patterns hook allows you to conditionally load remote block patterns. This hook is useful if you want to only load remote block patterns when a certain conditions is met. For example, you could only load remote block patterns when a user is logged in. To use this hook, you would first need to check if the should_load_remote_block_patterns hook exists. If it does, you can then use it to conditionally load remote block patterns. Here is an example of how you would use this hook: function my_load_remote_block_patterns() { if ( should_load_remote_block_patterns() ) { // Load remote block patterns. } } add_action( 'init', 'my_load_remote_block_patterns' );
apply_filters( 'should_load_remote_block_patterns', bool $should_load_remote ) #
Filter to disable remote block patterns.
Parameters
- $should_load_remote
(bool)
Source
Changelog
Version | Description |
---|---|
5.8.0 | Introduced. |