*** # General Settings Class. * Full name: `\CourierNotices\Controller\Admin\Settings\General` ## Properties ### settings_page Define our settings page ```php public static string $settings_page ``` * This property is **static**. *** ### plugin_name Give our plugin a name ```php public static string $plugin_name ``` * This property is **static**. *** ### type_list_table Instance of Type_List_Table ```php private static \CourierNotices\Helper\Type_List_Table $type_list_table ``` * This property is **static**. *** ### options ```php private array $options ``` *** ## Methods ### __construct General constructor. ```php public __construct(string $settings = 'courier_design'): mixed ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$settings` | **string** | | *** ### register_actions Initialize our plugin settings ```php public register_actions(): mixed ``` *** ### show_design_sub_settings Show our license area to activate or deactivate our license key ```php public show_design_sub_settings(mixed $options): mixed ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$options` | **mixed** | | *** ### add_admin_menu Add the options page to our settings menu ```php public add_admin_menu(): mixed ``` *** ### add_settings_link Add settings link ```php public add_settings_link(array $actions, string $plugin_file): array ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$actions` | **array** | Actions. | | `$plugin_file` | **string** | Plugin file. | *** ### create_section Create our settings section ```php public create_section(array $args): mixed ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$args` | **array** | Array of arguments. | *** ### settings_init Add all of our settings from the API ```php public settings_init(): mixed ``` *** ### get_styles Get available styles of Courier Notices ```php public static get_styles(): mixed|void ``` 1.3.0 * This method is **static**. *** ### merge_options Preserve options when using multiple pages ```php public merge_options(mixed $data): array ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$data` | **mixed** | | *** ### setup_general_settings Get our general settings registered ```php private setup_general_settings(): mixed ``` *** ### add_notice_title_display_options Add option title display based on each "style" of notice ```php private add_notice_title_display_options(mixed $tab_section): mixed ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$tab_section` | **mixed** | | *** ### setup_design_global_settings Design Panel ```php private setup_design_global_settings(): mixed ``` *** ### setup_design_type_settings Setup our different types of informational courier notices ```php private setup_design_type_settings(): mixed ``` *** ### add_settings_page Add our options page wrapper Form ```php public static add_settings_page(): mixed ``` * This method is **static**. *** ### apply_tab_slug_filters Allow filtering of the settings tabs ```php private static apply_tab_slug_filters(array $default_settings): array ``` * This method is **static**. **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$default_settings` | **array** | Default settings array. | *** ### get_default_tab_slug Get the default tab slug ```php public static get_default_tab_slug(): mixed ``` * This method is **static**. *** ### get_tabs Retrieve settings tabs ```php public static get_tabs(): array ``` * This method is **static**. **Return Value:** $tabs Settings tabs *** ### get_sub_tabs Build out our submenu if we have one. ```php public static get_sub_tabs(string $parent_tab): mixed ``` Allow for this to be extended by addons. * This method is **static**. **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$parent_tab` | **string** | The parent of the sub tab to retrieve. | *** ### get_request_param Utility Method to get a request parameter within the admin Strip it of malicious things. ```php public static get_request_param(string $key, string $default = ''): string ``` * This method is **static**. **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$key` | **string** | The parameter key. | | `$default` | **string** | The default value. | *** *** > Automatically generated on 2024-08-26