Initial commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?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();
|
||||
Reference in New Issue
Block a user