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)


Top ↑

Source

File: wp-includes/block-patterns.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.