refactor: finish refactoring

This commit is contained in:
Ben Goldsworthy 2021-08-09 11:27:13 +01:00
parent facda599bb
commit fbb00fab2f
30 changed files with 599 additions and 108 deletions

View file

@ -10,8 +10,6 @@ declare(strict_types=1);
namespace footnotes\includes\settings\general;
require_once plugin_dir_path( __DIR__ ) . 'class-settings-group.php';
use footnotes\includes\Settings;
use footnotes\includes\settings\Setting;
use footnotes\includes\settings\SettingsGroup;
@ -31,6 +29,15 @@ class HardLinksSettingsGroup extends SettingsGroup {
* @since 2.8.0
*/
const GROUP_ID = 'hard-links';
/**
* Setting group name.
*
* @var string
*
* @since 2.8.0
*/
const GROUP_NAME = 'URL Fragment ID Configuration';
/**
* Settings container key to enable hard links.
@ -150,7 +157,10 @@ class HardLinksSettingsGroup extends SettingsGroup {
'type' => 'string',
'input_type' => 'text',
);
/**
* @see SettingsGroup::add_settings()
*/
protected function add_settings( array|false $options ): void {
$this->settings = array(
self::FOOTNOTES_HARD_LINKS_ENABLE['key'] => $this->add_setting( self::FOOTNOTES_HARD_LINKS_ENABLE ),