Settings
ATA Settings class to register the settings.
Namespace: WebberZone\Snippetz\Admin
Since: 1.7.0
Source: includes/admin/class-settings.php line 26
Methods
__construct()
Main constructor class.
Since: 1.7.0
Line: 83
public function __construct( );
initialise_settings()
Initialise the settings API.
Since: 3.3.0
Line: 103
public function initialise_settings( );
get_translation_strings()
Array containing the settings’ sections.
Since: 1.8.0
Line: 132
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: 1.7.0
Line: 193
static public function get_settings_sections( ): array;
Returns: array — Settings array
get_registered_settings() static
Retrieve the array of plugin settings
Since: 1.7.0
Line: 221
static public function get_registered_settings( ): array;
Returns: array — Settings array
sanitize_all() static
Sanitize a raw settings array against all registered field callbacks.
Does not depend on $_POST or a Settings_API instance, so it is safe to call during admin-post.php requests (e.g. settings import).
Line: 252
static public function sanitize_all( array $input ): array;
| Type | Name | Description |
|---|---|---|
array |
$input |
Raw settings array (e.g. decoded from imported JSON). |
Returns: array — Sanitized array containing only known setting keys.
get_defaults() static
Raw default values for every setting, keyed by option ID.
Deliberately contains no translation calls, so it is safe to invoke before init
(e.g. from ata_get_option() on the frontend). Values are pre-normalised (checkboxes
as 1/0) and the array is intentionally unfiltered — consumers apply the
ata_settings_defaults filter themselves. feed_copyrightnotice is the one entry
that isn’t the field’s own default: its real value is computed by
get_copyright_text() in the field definition (which needs to run on every install,
not just here), so the raw default is left empty, matching what both consumers
already pass as their fallback.
Since: 2.4.2
Line: 308
static public function get_defaults( ): array;
Returns: array — Raw default values keyed by option ID.
settings_general() static
Returns the Header settings.
Since: 1.7.0
Line: 376
static public function settings_general( ): array;
Returns: array — Header settings.
settings_third_party() static
Returns the Third party settings.
Since: 1.5.0
Line: 427
static public function settings_third_party( ): array;
Returns: array — Third party settings.
settings_head() static
Returns the Header settings.
Since: 1.5.0
Line: 522
static public function settings_head( ): array;
Returns: array — Header settings.
settings_body() static
Returns the Content settings.
Since: 1.5.0
Line: 562
static public function settings_body( ): array;
Returns: array — Content settings.
settings_footer() static
Returns the Footer settings.
Since: 1.5.0
Line: 770
static public function settings_footer( ): array;
Returns: array — Footer settings.
settings_feed() static
Returns the Feed settings.
Since: 1.5.0
Line: 809
static public function settings_feed( ): array;
Returns: array — Feed settings.
get_copyright_text() static
Copyright notice text.
Since: 1.7.0
Line: 907
static public function get_copyright_text( ): string;
Returns: string — Copyright notice
get_upgrade_settings()
Upgrade v1.1.0 settings to v1.2.0.
Since: 1.7.0
Line: 929
public function get_upgrade_settings( ): array;
Returns: array — Settings array
plugin_actions_links()
Adding WordPress plugin action links.
Since: 1.7.0
Line: 991
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: 1.7.0
Line: 1011
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: 1030
public function get_help_sidebar( );
get_help_tabs()
Get the help tabs to display on the plugin settings page.
Since: 1.8.0
Line: 1059
public function get_help_tabs( );
get_admin_footer_text()
Get admin footer text.
Line: 1127
public function get_admin_footer_text( ): string;
Returns: string
change_settings_on_save()
Modify settings when they are being saved.
Since: 2.0.0
Line: 1145
public function change_settings_on_save( $settings ): array;
| Type | Name | Description |
|---|---|---|
array |
$settings |
Settings array. |
Returns: array — Sanitized settings array.
redirect_on_save()
Redirect to the correct settings page on save.
Since: 2.0.0
Line: 1154
public function redirect_on_save( );
get_settings_location()
Get link of the Settings page.
Since: 2.0.1
Line: 1168
public function get_settings_location( );
settings_defaults() static
Default settings.
Since: 2.2.0
Line: 1184
static public function settings_defaults( ): array;
Returns: array — Default settings.
taxonomy_search_tom_select() static
AJAX handler for Tom Select taxonomy search.
Since: 2.3.0
Line: 1250
static public function taxonomy_search_tom_select( ): void;
Returns: void