-
Notifications
You must be signed in to change notification settings - Fork 0
General
Settings Class.
- Full name:
\CourierNotices\Controller\Admin\Settings\General
Define our settings page
public static string $settings_page
- This property is static.
Give our plugin a name
public static string $plugin_name
- This property is static.
Instance of Type_List_Table
private static \CourierNotices\Helper\Type_List_Table $type_list_table
- This property is static.
private array $options
General constructor.
public __construct(string $settings = 'courier_design'): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$settings |
string |
Initialize our plugin settings
public register_actions(): mixed
Show our license area to activate or deactivate our license key
public show_design_sub_settings(mixed $options): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$options |
mixed |
Add the options page to our settings menu
public add_admin_menu(): mixed
Add settings link
public add_settings_link(array $actions, string $plugin_file): array
Parameters:
Parameter | Type | Description |
---|---|---|
$actions |
array | Actions. |
$plugin_file |
string | Plugin file. |
Create our settings section
public create_section(array $args): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$args |
array | Array of arguments. |
Add all of our settings from the API
public settings_init(): mixed
Get available styles of Courier Notices
public static get_styles(): mixed|void
1.3.0
- This method is static.
Preserve options when using multiple pages
public merge_options(mixed $data): array
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
mixed |
Get our general settings registered
private setup_general_settings(): mixed
Add option title display based on each "style" of notice
private add_notice_title_display_options(mixed $tab_section): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$tab_section |
mixed |
Design Panel
private setup_design_global_settings(): mixed
Setup our different types of informational courier notices
private setup_design_type_settings(): mixed
Add our options page wrapper Form
public static add_settings_page(): mixed
- This method is static.
Allow filtering of the settings tabs
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 the default tab slug
public static get_default_tab_slug(): mixed
- This method is static.
Retrieve settings tabs
public static get_tabs(): array
- This method is static.
Return Value:
$tabs Settings tabs
Build out our submenu if we have one.
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. |
Utility Method to get a request parameter within the admin Strip it of malicious things.
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