mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-04 07:19:03 +02:00
feat(plugins): add methods to easily retrieve general, podcast and episode settings in hooks methods
This commit is contained in:
parent
2035c39fd1
commit
3a900bbab6
1 changed files with 15 additions and 0 deletions
|
|
@ -96,6 +96,21 @@ abstract class BasePlugin implements PluginInterface
|
|||
{
|
||||
}
|
||||
|
||||
final public function getGeneralSetting(string $key): mixed
|
||||
{
|
||||
return get_plugin_option($this->key, $key);
|
||||
}
|
||||
|
||||
final public function getPodcastSetting(int $podcastId, string $key): mixed
|
||||
{
|
||||
return get_plugin_option($this->key, $key, ['podcast', $podcastId]);
|
||||
}
|
||||
|
||||
final public function getEpisodeSetting(int $episodeId, string $key): mixed
|
||||
{
|
||||
return get_plugin_option($this->key, $key, ['episode', $episodeId]);
|
||||
}
|
||||
|
||||
final public function getStatus(): PluginStatus
|
||||
{
|
||||
return $this->status;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue