# clanbite_locate_block_or_plugin_template()

Resolve the template for a Clanbite route: a theme PHP file, then the block template, then the plugin's PHP loader.

Only a real theme template may be handed to `locate_block_template()`. Passing the plugin's own PHP loader
makes WordPress treat it as a theme template that wins over the block template, so block themes would fall back to
the classic loader and blocks would render after `wp_head` (no import map, broken Interactivity API modules).

```php
clanbite_locate_block_or_plugin_template( string $theme_template, string $plugin_template, string $slug, array $hierarchy ): string
```

## Parameters

- `$theme_template` (string) Result of `locate_template()` (empty when the theme has no matching PHP file).
- `$plugin_template` (string) Absolute path of the plugin's classic PHP loader used as the last resort.
- `$slug` (string) Block template slug registered with `register_block_template()` (id segment after `//`).
- `$hierarchy` (string[]) Template file hierarchy for the route (for example `array( 'teams-create.php', 'index.php' )`).

## Return

`string` Template path to hand back to `template_include`.

## Changelog

| Version | Description |
| --- | --- |
| 1.3.0 | Introduced |
