Statistics_Table
Better_Search_Statistics_Table class.
Display the popular search terms in a tabular format.
Namespace: WebberZone\Better_Search\Admin
Since: 3.3.0
Source: includes/admin/class-statistics-table.php line 23
Extends: WP_List_Table
Methods
__construct()
Class constructor.
Line: 39
public function __construct( $network_wide = ... );
| Type | Name | Description |
|---|---|---|
bool | $network_wide | Whether to show network-wide data. |
get_popular_searches()
Retrieve the Better Search search terms
Line: 58
public function get_popular_searches( $per_page = ..., $page_number = ..., $args = ... ): array;
| Type | Name | Description |
|---|---|---|
int | $per_page | Posts per page. |
int | $page_number | Page number. |
array | $args | Array of arguments. |
Returns: array — Array of popular search terms
get_network_table_unions() static
Get UNION SQL fragments for a table across all network sites.
Since: 4.3.0
Line: 198
static public function get_network_table_unions( $table_suffix ): array;
| Type | Name | Description |
|---|---|---|
string | $table_suffix | Table name suffix (e.g., ‘bsearch’ or ‘bsearch_daily’). |
Returns: array — Array of SELECT SQL strings for UNION.
delete_search_entry() static
Delete search result.
Line: 237
static public function delete_search_entry( $id );
| Type | Name | Description |
|---|---|---|
string | $id | Search result. |
record_count()
Returns the count of records in the database.
Line: 263
public function record_count( $args = ... ): int;
| Type | Name | Description |
|---|---|---|
array | $args | Array of arguments. |
Returns: int — Number of records.
no_items()
Text displayed when no post data is available
Line: 292
public function no_items( );
column_default()
Render a column when no column specific method exist.
Line: 305
public function column_default( $item, $column_name ): mixed;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
string | $column_name | Column name. |
Returns: mixed
column_cb()
Render the checkbox column.
Line: 322
public function column_cb( $item ): string;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
Returns: string
column_title()
Render the title column.
Line: 336
public function column_title( $item ): string;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
Returns: string
get_columns()
Associative array of columns
Line: 374
public function get_columns( ): array;
Returns: array
get_sortable_columns()
Columns to make sortable.
Line: 397
public function get_sortable_columns( ): array;
Returns: array
get_bulk_actions()
Returns an associative array containing the bulk action
Line: 411
public function get_bulk_actions( ): array;
Returns: array
prepare_items()
Handles data query and filter, sorting, and pagination.
Line: 424
public function prepare_items( );
process_bulk_action()
Handles any bulk actions
Line: 465
public function process_bulk_action( );
extra_tablenav()
Adds extra navigation elements to the table.
Line: 537
public function extra_tablenav( $which );
| Type | Name | Description |
|---|---|---|
string | $which | Which part of the table are we. |