Statistics_Table
Statistics Table class to display the popular counts.
Namespace: WebberZone\Top_Ten\Admin
Since: 3.3.0
Source: includes/admin/class-statistics-table.php line 26
Extends: WP_List_Table
Methods
__construct()
Class constructor.
Line: 47
public function __construct( $network_wide = ... );
| Type | Name | Description |
|---|---|---|
bool | $network_wide | Network wide popular posts. |
get_popular_posts()
Retrieve the Top 10 posts
Line: 69
public function get_popular_posts( $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 posts
record_count()
Returns the count of records in the database.
Line: 197
public function record_count( $args = ... ): null|string;
| Type | Name | Description |
|---|---|---|
array | $args | Array of arguments. |
Returns: null|string — null|string
delete_post_count() static
Delete the post count for this post.
Line: 234
static public function delete_post_count( $id, $blog_id );
| Type | Name | Description |
|---|---|---|
int | $id | Post ID. |
int | $blog_id | Blog ID. |
no_items()
Text displayed when no post data is available
Line: 242
public function no_items( );
column_default()
Render a column when no column specific method exist.
Line: 255
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: 271
public function column_cb( $item ): string;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
Returns: string
column_title()
Render the title column.
Line: 286
public function column_title( $item ): string;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
Returns: string
column_date()
Handles the post date column output.
Line: 330
public function column_date( $item ): string;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
Returns: string — Post date.
column_post_type()
Handles the post_type column output.
Line: 352
public function column_post_type( $item ): string;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
Returns: string — Post Type.
column_author()
Handles the post author column output.
Line: 373
public function column_author( $item ): string;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
Returns: string — Post Author.
column_total_count()
Render the Total Count column.
Line: 404
public function column_total_count( $item ): string;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
Returns: string
column_blog_id()
Handles the blog id column output.
Line: 420
public function column_blog_id( $item ): void;
| Type | Name | Description |
|---|---|---|
array | $item | Current item. |
Returns: void
get_columns()
Associative array of columns
Line: 467
public function get_columns( ): array;
Returns: array
get_sortable_columns()
Columns to make sortable.
Line: 498
public function get_sortable_columns( ): array;
Returns: array
get_bulk_actions()
Returns an associative array containing the bulk action
Line: 514
public function get_bulk_actions( ): array;
Returns: array
prepare_items()
Handles data query and filter, sorting, and pagination.
Line: 524
public function prepare_items( );
process_bulk_action()
Handles any bulk actions
Line: 569
public function process_bulk_action( );
extra_tablenav()
Adds extra navigation elements to the table.
Line: 620
public function extra_tablenav( $which );
| Type | Name | Description |
|---|---|---|
string | $which | Which part of the table are we. |