Recent

Statistics_Table class

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 = ... );
TypeNameDescription
bool$network_wideWhether to show network-wide data.

Retrieve the Better Search search terms

Line: 58

public function get_popular_searches( $per_page = ..., $page_number = ..., $args = ... ): array;
TypeNameDescription
int$per_pagePosts per page.
int$page_numberPage number.
array$argsArray 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;
TypeNameDescription
string$table_suffixTable 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 );
TypeNameDescription
string$idSearch result.

record_count()

Returns the count of records in the database.

Line: 263

public function record_count( $args = ... ): int;
TypeNameDescription
array$argsArray 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;
TypeNameDescription
array$itemCurrent item.
string$column_nameColumn name.

Returns: mixed

column_cb()

Render the checkbox column.

Line: 322

public function column_cb( $item ): string;
TypeNameDescription
array$itemCurrent item.

Returns: string

column_title()

Render the title column.

Line: 336

public function column_title( $item ): string;
TypeNameDescription
array$itemCurrent 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 );
TypeNameDescription
string$whichWhich part of the table are we.