Hooks reference
This content is not available in your language yet.
Hooks are methods of the Plugin class, they are executed in parts of the Castopod codebase.
| Hooks | Executes in |
|---|---|
| rssBeforeChannel | RSS Feed |
| rssAfterChannel | RSS Feed |
| rssBeforeItem | RSS Feed |
| rssAfterItem | RSS Feed |
| siteHead | Website |
rssBeforeChannel
Section titled “rssBeforeChannel”This hook is executed just before rendering the <channel> tag in the Podcast
RSS feed using the given Podcast object.
Here is a good place to alter the Podcast object.
public function rssBeforeChannel(Podcast $podcast): void{ // …}rssAfterChannel
Section titled “rssAfterChannel”This hook is executed after rendering all of the <channel> tags in the Podcast
RSS feed.
Here is a good place to add new tags to the generated channel.
public function rssAfterChannel(Podcast $podcast, RssFeed $channel): void{ // …}rssBeforeItem
Section titled “rssBeforeItem”This hook is executed before rendering an <item> tag in the Podcast RSS feed
using the given Episode object.
Here is a good place to alter the Episode object.
public function rssBeforeItem(Episode $episode): void{ // …}rssAfterItem
Section titled “rssAfterItem”This hook is executed after rendering an <item>’s tags in the Podcast RSS
feed.
Here is a good place to add new tags to the generated item.
public function rssAfterItem(Epsiode $episode, RssFeed $item): void{ // …}siteHead
Section titled “siteHead”This hook is executed in the public pages’ <head> tag.
Here is a good place to add meta tags, custom styles, and third-party scripts to Castopod’s public pages.
public function siteHead(HtmlHead $head): void{ // …}