mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 13:01:19 +00:00
New translations hooks.mdx (French traditional)
[ci skip]
This commit is contained in:
parent
05e07691b4
commit
7664caa286
86
docs/src/content/docs/fr2/plugins/hooks.mdx
Normal file
86
docs/src/content/docs/fr2/plugins/hooks.mdx
Normal file
@ -0,0 +1,86 @@
|
||||
---
|
||||
title: Hooks reference
|
||||
---
|
||||
|
||||
Hooks are methods of the Plugin class, they are executed in parts of the
|
||||
Castopod codebase.
|
||||
|
||||
## List
|
||||
|
||||
| Hooks | Executes in |
|
||||
| ---------------- | ----------- |
|
||||
| rssBeforeChannel | RSS Feed |
|
||||
| rssAfterChannel | RSS Feed |
|
||||
| rssBeforeItem | RSS Feed |
|
||||
| rssAfterItem | RSS Feed |
|
||||
| siteHead | Website |
|
||||
|
||||
### 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.
|
||||
|
||||
```php
|
||||
public function rssBeforeChannel(Podcast $podcast): void
|
||||
{
|
||||
// …
|
||||
}
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
```php
|
||||
public function rssAfterChannel(Podcast $podcast, SimpleRSSElement $channel): void
|
||||
{
|
||||
// …
|
||||
}
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
```php
|
||||
public function rssBeforeItem(Episode $episode): void
|
||||
{
|
||||
// …
|
||||
}
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
```php
|
||||
public function rssAfterItem(Epsiode $episode, SimpleRSSElement $item): void
|
||||
{
|
||||
// …
|
||||
}
|
||||
```
|
||||
|
||||
### siteHead
|
||||
|
||||
This hook is executed in the public pages' `<head>` tag.
|
||||
|
||||
This is a good place to add meta tags and third-party scripts to Castopod's
|
||||
public pages.
|
||||
|
||||
```php
|
||||
public function siteHead(): void
|
||||
{
|
||||
// …
|
||||
}
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user