API / Minn\Theme / TemplatePartTheme

TemplatePartTheme final readonly class

Minn\Theme\TemplatePartTheme · public/minn/src/Minn/Theme/TemplatePartTheme.php · 45 lines

A template-part block inside a template says which theme's part it means. The theme's own files usually leave that out, and the reference fills the active theme in on the way out, for saved rows as much as for files. It appends the attribute and leaves every other byte of the markup alone.

Used by 1

Constants and properties

privateTAG = '<!-- wp:template-part'

Public

staticapply(string $markup, string $theme): string#

Template part blocks with the theme attribute set.

Internals 3

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatewithTheme(string $attributes, string $theme): string#
privateencode(string $theme): string#
privatepair(string $theme): string#