Files
ogre-consent/inc/class-settings.php
T
2026-07-27 16:33:53 +00:00

47 lines
930 B
PHP

<?php
/**
* @package plugin
* @author cleverogre
* @copyright 2026 CleverOgre
* @license GLP-3.0-or-later
* @version 0.0.0
* @since 0.0.0
*/
namespace Ogre\Example;
use Override;
use Ogre\Settings as AbstractSettings;
use Ogre\Example as Plugin;
defined('ABSPATH') || exit;
final class Settings extends AbstractSettings {
protected function __construct() {
parent::__construct(Plugin::instance());
}
#[Override]
public function register_settings(): void {
$this->add_section(
Plugin::__('General'),
Plugin::__('General settings for this plugin.')
);
$this->add_field(
'text',
Plugin::__('Text'),
[
'placeholder' => Plugin::__('Insert some text here...'),
'description' => Plugin::__('An example field.'),
]
);
}
}
Settings::instance();