FeedTemplates final class
Minn\Front\FeedTemplates · public/minn/src/Minn/Front/FeedTemplates.php · 295 lines
The feed templates do_feed_* loads, written from the reference's output (suite feed-hooks, probes feed-templates): RSS 2.0, Atom, RDF and RSS 0.92 for posts, RSS 2.0 and Atom for comments. Each is written through the template tags, so every feed filter has its say, and fires each feed action where the reference fires it; the whitespace between is the reference's. A template is written once a request, as require_once loads it, and sends its content type through the header callback first.
Constants and properties
| private | SYNDICATION = ' xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" ' | |
| private | static array $loaded |
Public
| static | load(string $name, Closure $send): string# | A feed template by its name (rss2, rss2-comments, atom, atom-comments, rdf, rss), between wp_before_load_template and wp_after_load_template.
|
Internals 15
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | syndication(Minn\Front\FeedWriter $w): Minn\Front\FeedWriter# | What the period and frequency of updates are, as the syndication module says. |
| private | rss2(Minn\Front\FeedWriter $w): void# | |
| private | rss2Item(Minn\Front\FeedWriter $w): void# | |
| private | atom(Minn\Front\FeedWriter $w): void# | |
| private | atomEntry(Minn\Front\FeedWriter $w): void# | |
| private | rdf(Minn\Front\FeedWriter $w): void# | |
| private | rdfItem(Minn\Front\FeedWriter $w): void# | |
| private | rss(Minn\Front\FeedWriter $w): void# | |
| private | commentsTitle(string $single): string# | The heading of a comments feed: the post's, the search's, or the site's. |
| private | commentTitle(WP_Post $post): string# | A comment's heading in a comments feed: by whom, and on what when the feed is not a single post's. |
| private | current(): array# | The comment the loop is on, with its post made the current one. @return array{0: object, 1: \WP_Post} @return array{0: object, 1: \WP_Post} |
| private | rss2Comments(Minn\Front\FeedWriter $w): void# | |
| private | rss2Comment(Minn\Front\FeedWriter $w): void# | |
| private | atomComments(Minn\Front\FeedWriter $w): void# | |
| private | atomComment(Minn\Front\FeedWriter $w): void# |
Nothing matches.