apply_filters( ‘should_load_remote_block_patterns’, bool $should_load_remote )

Filter to disable remote block patterns.

Parameters

$should_load_remotebool

Source

$should_load_remote = apply_filters( 'should_load_remote_block_patterns', true );

Changelog

VersionDescription
5.8.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    If you want to limit access to the remote block patterns to only admins, you can do so by verifying the capabilities of the user:

    add_filter( 'should_load_remote_block_patterns', 'limit_access_load_remote_block_patterns' );
    
    function limit_access_load_remote_block_patterns() 
    {
    	return current_user_can( 'activate_plugins' );
    }

You must log in before being able to contribute a note or feedback.