options_group_slug = $options_group_slug; $this->section_slug = $section_slug; $this->title = $title; $this->load_dependencies(); $this->add_settings_groups(get_option( $this->options_group_slug )); $this->load_options_group(); } /** * Load the required dependencies. * * Include the following files that provide the settings for this section: * * - {@see SettingsSection}: defines a settings section; and * - {@see CustomCSSSettingsGroup}. * * @see SettingsSection::load_dependencies() */ protected function load_dependencies(): void { parent::load_dependencies(); require_once plugin_dir_path( __DIR__ ) . 'class-settings-section.php'; require_once plugin_dir_path( __DIR__ ) . 'custom-css/class-custom-css-settings-group.php'; } /** * @see SettingsSection::add_settings_groups() */ protected function add_settings_groups(): void { $this->settings_groups = array ( CustomCSSSettingsGroup::GROUP_ID => new CustomCSSSettingsGroup($this->options_group_slug, $this->section_slug, $this->settings ), ); } }