WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 59 | $supports_core_patterns = get_theme_support( 'core-block-patterns' ); |
| 60 | |
| 61 | /** |
| 62 | * Filter to disable remote block patterns. |
| 63 | * |
| 64 | * @since 5.8.0 |
| 65 | * |
| 66 | * @param bool $should_load_remote |
| 67 | */ |
| 68 | $should_load_remote = apply_filters( 'should_load_remote_block_patterns', true ); |
| 69 | |
| 70 | if ( $supports_core_patterns && $should_load_remote ) { |
| 71 | $request = new WP_REST_Request( 'GET', '/wp/v2/pattern-directory/patterns' ); |
| 72 | $core_keyword_id = 11; // 11 is the ID for "core". |
| 73 | $request->set_param( 'keyword', $core_keyword_id ); |
| 74 | $response = rest_do_request( $request ); |
| 75 | if ( $response->is_error() ) { |
| 76 | return; |
| 77 | } |