Settings
Class to register the settings.
Namespace: WebberZone\Better_Search\Admin
Since: 3.3.0
Source: includes/admin/class-settings.php line 28
Methods
__construct()
Main constructor class.
Since: 3.3.0
Line: 74
public function __construct( );
initialise_settings()
Initialise the settings API.
Since: 3.3.0
Line: 93
public function initialise_settings( );
get_translation_strings()
Array containing the translation strings.
Since: 1.8.0
Line: 121
public function get_translation_strings( ): array;
Returns: array — Translation strings.
get_menus()
Get the admin menus.
Line: 150
public function get_menus( ): array;
Returns: array — Admin menus.
get_settings_sections() static
Array containing the settings’ sections.
Since: 3.3.0
Line: 173
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 bsearch_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.
Since: 4.4.4
Line: 207
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: 314
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: 365
static public function settings_general( ): array;
Returns: array — General 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: 446
static public function settings_features( ): array;
Returns: array — Features settings array
settings_performance() static
Retrieve the array of Performance settings
Since: 4.2.0
Line: 571
static public function settings_performance( ): array;
Returns: array — Performance settings array
settings_search() static
Retrieve the array of Search settings
Since: 3.3.0
Line: 654
static public function settings_search( ): array;
Returns: array — Search settings array
settings_redirects() static
Retrieve the array of Redirects settings
Since: 4.4.0
Line: 1007
static public function settings_redirects( ): array;
Returns: array — Redirects settings array
settings_heatmap() static
Retrieve the array of Heatmap settings
Since: 3.3.0
Line: 1106
static public function settings_heatmap( ): array;
Returns: array — Heatmap settings array
settings_output() static
Retrieve the array of Output settings
Since: 3.3.0
Line: 1233
static public function settings_output( ): array;
Returns: array — Output settings array
get_badwords() static
Get badwords to filter.
Since: 2.2.0
Line: 1347
static public function get_badwords( ): array;
Returns: array — Array containing bad words to filter
plugin_actions_links()
Adding WordPress plugin action links.
Since: 3.3.0
Line: 1441
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: 1460
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: 1479
public function get_help_sidebar( );
get_help_tabs()
Get the help tabs to display on the plugin settings page.
Since: 3.3.0
Line: 1507
public function get_help_tabs( );
get_admin_footer_text() static
Add footer text on the plugin page.
Since: 2.0.0
Line: 1555
static public function get_admin_footer_text( );
admin_enqueue_scripts()
Enqueue scripts and styles.
Since: 4.0.0
Line: 1572
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: 1605
public function change_settings_on_save( $settings ): array;
| Type | Name | Description |
|---|---|---|
array |
$settings |
Settings array. |
Returns: array — Sanitized settings array.
flag_incomplete_repeater_rows() static
Warn about repeater rows that fail their own required-field rules.
Runs across every registered repeater field (found via type => 'repeater' in
get_registered_settings()), not just Search Redirects, so a repeater added later
gets this validation for free - no per-field wiring needed. The rows are kept: a
half-finished row is inert wherever it’s consumed, and deleting the admin’s
typing to enforce that would be worse.
Since: 4.4.0
Line: 1632
static public function flag_incomplete_repeater_rows( $settings ): void;
| Type | Name | Description |
|---|---|---|
array |
$settings |
Sanitized settings. |
Returns: void
after_setting_output() static
Updated the settings fields to display a pro version link.
Line: 1701
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: 1719
public function add_wizard_button( );
taxonomy_search_tom_select() static
AJAX handler for Tom Select taxonomy search.
Since: 4.2.0
Line: 1736
static public function taxonomy_search_tom_select( ): void;
Returns: void