RenderedFields final class
Minn\Rest\RenderedFields · public/minn/src/Minn/Rest/RenderedFields.php · 68 lines
A post's rendered title, content and excerpt as a REST response carries them. Without plugins they are Minn's own render. With plugins loaded they pass the filters the reference's controller runs, with the post set up as it sets it up: the_title over the stored title, the engine's render of the content then the rest of the_content (shortcodes and every plugin's callback), and get_the_excerpt then the_excerpt.
Public
| static | title(Minn\Content\PostRecord $p): string# | The rendered title. | |||
| static | content(Minn\Content\PostRecord $p): string# | The rendered content. | |||
| static | excerpt(Minn\Content\PostRecord $p): string# | The rendered excerpt. | |||
| static | setUp(Minn\Content\PostRecord $p): void# | The post made current and set up for a response that renders none of its text, as the reference sets up every item it prepares. | |||
| static | classes(array $classes, int $postId): array# | A post's class list as get_post_class hands it back once plugin code filters post_class (WooCommerce drops hentry and adds a product's stock and type): the filter's answer without repeats, in order.
@return list<string> |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | withPost(Minn\Content\PostRecord $p, Closure $render): mixed# |
Nothing matches.