Admin
Class to load all the pro admin features.
Namespace: WebberZone\Better_Search\Pro
Source: includes/pro/class-admin.php line 24
Methods
__construct()
Constructor.
Line: 50
public function __construct( );
update_registered_settings()
Update the registered settings.
Since: 4.0.0
Line: 98
public function update_registered_settings( $settings ): array;
| Type | Name | Description |
|---|---|---|
array |
$settings |
Registered settings. |
Returns: array — Updated registered settings.
add_destination_post_lookup()
Turn the redirect destination post field into a post lookup.
The field itself is registered in the free plugin, so the autocomplete is bolted on here rather than declared there.
Since: 4.4.0
Line: 129
public function add_destination_post_lookup( $settings ): array;
| Type | Name | Description |
|---|---|---|
array |
$settings |
Redirects settings array. |
Returns: array — Updated redirects settings array.
enqueue_destination_post_lookup()
Localise the post lookup settings for Tom Select.
Since: 4.4.0
Line: 158
public function enqueue_destination_post_lookup( $hook ): void;
| Type | Name | Description |
|---|---|---|
string |
$hook |
Current admin page hook. |
Returns: void
destination_post_search() static
AJAX handler for the redirect destination post lookup.
Only published, unprotected posts are offered, matching what Search_Redirects::resolve_destination() will actually accept.
Since: 4.4.0
Line: 230
static public function destination_post_search( ): void;
Returns: void
clear_cache_button() static
Add clear cache button to the settings page.
Since: 4.0.0
Line: 297
static public function clear_cache_button( );
after_setting_output() static
Updated the settings fields to display a button for creating indexes.
Since: 4.0.0
Line: 313
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.
create_fulltext_indexes()
Create the fulltext indexes.
Since: 4.0.0
Line: 406
public function create_fulltext_indexes( );
create_fuzzy_functions()
Create the Levenshtein function in the database.
Since: 4.0.0
Line: 423
public function create_fuzzy_functions( );
get_fulltext_index_status() static
Get the fulltext index status.
Since: 4.0.0
Line: 441
static public function get_fulltext_index_status( ): string;
Returns: string — Fulltext index status.
add_selected_day_tab()
Add “Selected Day” tab to the dashboard tabs.
Since: 4.3.0
Line: 466
public function add_selected_day_tab( $tabs ): array;
| Type | Name | Description |
|---|---|---|
array |
$tabs |
Array of dashboard tabs. |
Returns: array — Modified array of dashboard tabs.
enqueue_index_creator_script()
Enqueue index creator JavaScript.
Since: 4.3.1
Line: 490
public function enqueue_index_creator_script( $hook ): void;
| Type | Name | Description |
|---|---|---|
string |
$hook |
The current admin page. |
Returns: void
enqueue_chart_interactions_script()
Enqueue chart interactions JavaScript.
Since: 4.3.0
Line: 526
public function enqueue_chart_interactions_script( $hook ): void;
| Type | Name | Description |
|---|---|---|
string |
$hook |
The current admin page. |
Returns: void
get_day_searches()
Get day searches via AJAX.
Since: 4.3.0
Line: 559
public function get_day_searches( );