Skip to content
Snippets Groups Projects
Commit 3a900bba authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat(plugins): add methods to easily retrieve general, podcast and episode...

feat(plugins): add methods to easily retrieve general, podcast and episode settings in hooks methods
parent 2035c39f
No related branches found
No related tags found
1 merge request!350Draft: next
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment