wppaste
WordPress

apply_filters( 'should_load_remote_block_patterns', bool $should_load_remote )

Since
5.8.0
Filter to disable remote block patterns.

Compatibility

WordPress
since 5.8.0
  • 6.7.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

Present in every tracked release (6.7.10 to 7.1.3).

Parameters

$should_load_remotebool

Where this hook fires · 3

  • wp-includes/block-patterns.php:299_load_remote_block_patterns()
  • wp-includes/block-patterns.php:332_load_remote_featured_patterns()
  • wp-includes/block-patterns.php:371_register_remote_theme_patterns()

Source code

	 * Filter to disable remote block patterns.	 *	 * @since 5.8.0	 *	 * @param bool $should_load_remote	 */	$should_load_remote = apply_filters( 'should_load_remote_block_patterns', true ); 	if ( $supports_core_patterns && $should_load_remote ) {		$request         = new WP_REST_Request( 'GET', '/wp/v2/pattern-directory/patterns' );		$core_keyword_id = 11; // 11 is the ID for "core".		$request->set_param( 'keyword', $core_keyword_id );		$response = rest_do_request( $request );

Changelog

Introduced in 5.8.0. Unchanged from 6.7.10 through 7.1.3.

  1. 6.7.10
  2. 6.8.11
  3. 6.9.10
  4. 7.0.7
  5. 7.1.3

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.3 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.