Settings
Class to register the settings.
Namespace: WebberZone\Top_Ten\Admin
Since: 3.3.0
Source: includes/admin/class-settings.php line 27
Methods
__construct()
Main constructor class.
Since: 3.3.0
Line: 80
public function __construct( );
initialise_settings()
Initialise the settings API.
Since: 3.3.0
Line: 101
public function initialise_settings( );
get_translation_strings()
Array containing the settings’ sections.
Since: 1.8.0
Line: 129
public function get_translation_strings( ): array;
Returns: array — Settings array
get_menus()
Get the admin menus.
Line: 161
public function get_menus( ): array;
Returns: array — Admin menus.
get_settings_sections() static
Array containing the settings’ sections.
Since: 3.3.0
Line: 184
static public function get_settings_sections( ): array;
Returns: array — Settings array
get_defaults() static
Raw defaults for every registered setting, keyed by option ID.
Must exactly match what tptn_settings_defaults() computes from
{@see self::get_registered_settings()}, but without building the full
(translated) field definitions. Values are pre-normalized: checkboxes are
1/0, not true/false. Computed defaults (e.g. thumb_default) are
represented as '' here since their real value cannot be known statically.
Since: 4.4.2
Line: 220
static public function get_defaults( ): array<string,;
Returns: array<string, — mixed> Default value for every option ID.
get_registered_settings() static
Retrieve the array of plugin settings
Since: 3.3.0
Line: 365
static public function get_registered_settings( ): array;
Returns: array — Settings array
settings_general() static
Retrieve the array of General settings
Since: 3.3.0
Line: 393
static public function settings_general( ): array;
Returns: array — General settings array
settings_counter() static
Retrieve the array of Counter settings
Since: 3.3.0
Line: 534
static public function settings_counter( ): array;
Returns: array — Counter settings array
settings_list() static
Retrieve the array of List settings
Since: 3.3.0
Line: 748
static public function settings_list( ): array;
Returns: array — List settings array
settings_thumbnail() static
Retrieve the array of Thumbnail settings
Since: 3.3.0
Line: 1020
static public function settings_thumbnail( ): array;
Returns: array — Thumbnail settings array
settings_styles() static
Retrieve the array of Styles settings
Since: 3.3.0
Line: 1137
static public function settings_styles( ): array;
Returns: array — Styles settings array
settings_maintenance() static
Retrieve the array of Maintenance settings
Since: 3.3.0
Line: 1182
static public function settings_maintenance( ): array;
Returns: array — Maintenance settings array
settings_feed() static
Retrieve the array of Feed settings
Since: 2.8.0
Line: 1283
static public function settings_feed( ): array;
Returns: array — Feed settings array
settings_features() static
Retrieve the array of Features settings
All features are enabled by default. Disabling a feature stops its classes from being loaded on any request.
Since: 4.4.0
Line: 1354
static public function settings_features( ): array;
Returns: array — Features settings array
get_styles() static
Get the various styles.
Since: 2.5.0
Line: 1524
static public function get_styles( ): array;
Returns: array — Style options.
get_user_roles() static
Get User Roles.
Since: 4.0.0
Line: 1561
static public function get_user_roles( $remove_roles = ... ): array;
| Type | Name | Description |
|---|---|---|
array |
$remove_roles |
Roles to remove. |
Returns: array — User roles in the format ‘role’ => ‘name’.
plugin_actions_links()
Adding WordPress plugin action links.
Since: 3.3.0
Line: 1604
public function plugin_actions_links( $links ): array;
| Type | Name | Description |
|---|---|---|
array |
$links |
Array of links. |
Returns: array
plugin_row_meta()
Add meta links on Plugins page.
Since: 3.3.0
Line: 1623
public function plugin_row_meta( $links, $file ): array;
| Type | Name | Description |
|---|---|---|
array |
$links |
Array of Links. |
string |
$file |
Current file. |
Returns: array
get_help_sidebar()
Get the help sidebar content to display on the plugin settings page.
Since: 1.8.0
Line: 1642
public function get_help_sidebar( );
get_help_tabs()
Get the help tabs to display on the plugin settings page.
Since: 1.8.0
Line: 1670
public function get_help_tabs( );
get_tracker_types() static
Function returns the different types of trackers.
Since: 3.3.0
Line: 1739
static public function get_tracker_types( ): array;
Returns: array — Tracker types.
get_tracking_methods() static
Function returns the different tracking methods.
Since: 4.3.3
Line: 1775
static public function get_tracking_methods( ): array;
Returns: array — Tracking methods.
get_admin_footer_text() static
Add footer text on the plugin page.
Since: 2.0.0
Line: 1808
static public function get_admin_footer_text( );
admin_enqueue_scripts()
Enqueue scripts and styles.
Since: 3.3.0
Line: 1825
public function admin_enqueue_scripts( $hook );
| Type | Name | Description |
|---|---|---|
string |
$hook |
Current hook. |
change_settings_on_save()
Modify settings when they are being saved.
Since: 3.3.0
Line: 1868
public function change_settings_on_save( $settings ): array;
| Type | Name | Description |
|---|---|---|
array |
$settings |
Settings array. |
Returns: array — Sanitized settings array.
display_admin_thumbnail()
Display the default thumbnail below the setting.
Since: 3.3.0
Line: 1949
public function display_admin_thumbnail( $html, $args ): string;
| Type | Name | Description |
|---|---|---|
string |
$html |
Current HTML. |
array |
$args |
Argument array of the setting. |
Returns: string
reset_default_thumb_setting()
Display the default thumbnail below the setting.
Since: 3.3.0
Line: 1970
public function reset_default_thumb_setting( $html, $args ): string;
| Type | Name | Description |
|---|---|---|
string |
$html |
Current HTML. |
array |
$args |
Argument array of the setting. |
Returns: string
settings_page_header() static
Add a link to the Tools page from the settings page.
Since: 3.5.0
Line: 1986
static public function settings_page_header( );
after_setting_output() static
Updated the settings fields to display a pro version link.
Line: 2007
static public function after_setting_output( $output, $args ): string;
| Type | Name | Description |
|---|---|---|
string |
$output |
Settings field HTML. |
array |
$args |
Settings field arguments. |
Returns: string — Updated HTML.
add_wizard_button()
Add a button to the settings page to start the settings wizard.
Since: 4.2.0
Line: 2037
public function add_wizard_button( );
taxonomy_search_tom_select() static
Handle Tom Select taxonomy search AJAX requests.
Since: 4.2.0
Line: 2054
static public function taxonomy_search_tom_select( ): void;
Returns: void