should_load_remote_block_patterns
should_load_remote_block_patterns
Appears in: gutenberg.11.1.0, gutenberg.11.2.0, gutenberg.11.2.1, gutenberg.11.3.0, gutenberg.11.4.0, gutenberg.11.4.1, gutenberg.11.5.0, gutenberg.11.5.1, gutenberg.11.6.0, gutenberg.11.7.1, gutenberg.11.8.0, gutenberg.12.7.2, gutenberg.12.9.0, gutenberg.13.1.0, gutenberg.13.2.0, gutenberg.13.4.0, gutenberg.13.5.0, gutenberg.13.5.2, gutenberg.13.6.0, gutenberg.13.7.1, gutenberg.13.8.2, gutenberg.13.9.0, gutenberg.14.0.2, gutenberg.14.0.3, gutenberg.14.2.0, gutenberg.14.3.1, gutenberg.14.4.0, gutenberg.14.5.0, gutenberg.14.5.3, gutenberg.14.6.1, gutenberg.14.7.0, gutenberg.15.1.0, gutenberg.15.2.1, gutenberg.15.2.2, gutenberg.15.2.4, gutenberg.15.3.1, gutenberg.15.4.0, gutenberg.15.6.2, gutenberg.15.7.0, gutenberg.15.7.1, gutenberg.15.8.0, gutenberg.15.9.0, gutenberg.16.1.0, gutenberg.16.2.1, gutenberg.16.5.0, gutenberg.16.5.1, gutenberg.16.6.0, gutenberg.16.8.1, gutenberg.16.9.0, gutenberg.17.0.2, gutenberg.17.1.2, wordpress-5.8, wordpress-5.8.1, wordpress-5.8.2, wordpress-5.8.3, wordpress-5.9, wordpress-5.9.1, wordpress-5.9.2, wordpress-5.9.3, wordpress-6.0, wordpress-6.0.1, wordpress-6.0.2, wordpress-6.0.3, wordpress-6.1, wordpress-6.1.1, wordpress-6.2, wordpress-6.2.1, wordpress-6.2.2, wordpress-6.3, wordpress-6.3.1, wordpress-6.3.2, wordpress-6.4, wordpress-6.4.1, wordpress-6.4.2, wordpress-6.4.3, wordpress-6.5, wordpress-6.5.2, wordpress-6.5.3, wordpress-6.5.4, wordpress-6.5.5, wordpress-6.6, wordpress-6.6.1, wordpress-6.6.2, wordpress-6.7
Hook Type: filter
See hook in action
Displaying hooks found in version: wordpress-6.7apply_filters('should_load_remote_block_patterns') is found 3 times:
- /wp-includes/block-patterns.php line 228
* @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 );
- /wp-includes/block-patterns.php line 261
function _load_remote_featured_patterns() { $supports_core_patterns = get_theme_support( 'core-block-patterns' ); /** This filter is documented in wp-includes/block-patterns.php */ $should_load_remote = apply_filters( 'should_load_remote_block_patterns', true ); if ( ! $should_load_remote || ! $supports_core_patterns ) { return; } $request = new WP_REST_Request( 'GET', '/wp/v2/pattern-directory/patterns' );
- /wp-includes/block-patterns.php line 300
* @access private */ function _register_remote_theme_patterns() { /** This filter is documented in wp-includes/block-patterns.php */ if ( ! apply_filters( 'should_load_remote_block_patterns', true ) ) { return; } if ( ! wp_theme_has_theme_json() ) { return; }