pre_get_block_file_template
pre_get_block_file_template
Appears in: gutenberg.11.0.0, 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, 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('pre_get_block_file_template') is found 1 times:
- /wp-includes/block-template-utils.php line 1310
* or null to allow WP to run its normal queries.
* @param string $id Template unique identifier (example: ‘theme_slug//template_slug’).
* @param string $template_type Template type. Either ‘wp_template’ or ‘wp_template_part’.
*/
$block_template = apply_filters( ‘pre_get_block_file_template’, null, $id, $template_type );
if ( ! is_null( $block_template ) ) {
return $block_template;
}$parts = explode( ‘//’, $id, 2 );
if ( count( $parts ) < 2 ) { [/php]