mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00

+ load plugin icon + add pagination + autoload plugins in Config/Autoload.php to handle plugin i18n + style plugin cards
25 lines
630 B
PHP
25 lines
630 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
if (! function_exists('get_plugin_option')) {
|
|
function get_plugin_option(string $pluginKey, string $option): mixed
|
|
{
|
|
$key = sprintf('Plugins.%s', $option);
|
|
$context = sprintf('plugin:%s', $pluginKey);
|
|
|
|
return setting()->get($key, $context);
|
|
}
|
|
}
|
|
|
|
if (! function_exists('set_plugin_option')) {
|
|
function set_plugin_option(string $pluginKey, string $option, mixed $value = null): void
|
|
{
|
|
$key = sprintf('Plugins.%s', $option);
|
|
$context = sprintf('plugin:%s', $pluginKey);
|
|
|
|
setting()
|
|
->set($key, $value, $context);
|
|
}
|
|
}
|