Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

locate_block_template()

3 tags 1 category

locate_block_template() — Finds a block template with equal or higher specificity than a given PHP template file. Internally, this communicates the block content that needs to be used by the template canvas through a global variable.

Inputs: $template (string): Path to the template. See locate_template(). $type (string): Sanitized filename without extension. $templates (string[]): A list of template candidates, in descending order of priority.

Returns string: The path to the Site Editor template canvas file, or the fallback PHP template.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…