pre_get_block_file_template

pre_get_block_file_template

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('pre_get_block_file_template') is found 1 times:

  • /wp-includes/block-template-utils.php line 1143

    * 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]

See this hook used in plugins: