Recent

Counter class

Counter

Admin Columns Class.

Namespace: WebberZone\Top_Ten
Since: 3.3.0
Source: includes/class-counter.php line 23

Methods

__construct()

Constructor class.

Since: 3.3.0
Line: 30

public function __construct(  );

the_content() static

Adds the viewed count to the post content. Filters the_content.

Since: 3.3.0
Line: 45

static public function the_content( $content ): string;
TypeNameDescription
string$contentPost content.

Returns: string — Filtered post content.

rss_filter() static

Filter to display the post count when viewing feeds.

Since: 1.9.8
Line: 93

static public function rss_filter( $content ): string;
TypeNameDescription
string$contentPost content.

Returns: string — Filtered post content

echo_post_count() static

Function to manually display count.

Since: 1.0
Line: 114

static public function echo_post_count( $echo_output = ... ): string|void;
TypeNameDescription
int|boolean$echo_outputFlag to echo the output.

Returns: string|void — Formatted string if $echo_output is set to 0|false

get_post_count() static

Return the formatted post count for the supplied ID.

Since: 4.0.0
Line: 189

static public function get_post_count( $post = ..., $blog_id = ..., $args = ... ): string;
TypeNameDescription
int|string|\WP_Post$postPost ID or WP_Post object.
int|string$blog_idBlog ID.
array$argsAdditional arguments.

Returns: string — Formatted post count

get_post_count_only() static

Returns the post count.

Since: 3.3.0
Line: 254

static public function get_post_count_only( $post = ..., $counter = ..., $blog_id = ..., $args = ... ): int|string;
TypeNameDescription
int|\WP_Post$postPost ID or WP_Post object.
string$counterWhich count to return? total, daily or overall.
int$blog_idBlog ID.
array$argsAdditional arguments.

Returns: int|string — Post count

delete_counts() static

Delete the counts from the selected table.

Since: 3.3.0
Line: 336

static public function delete_counts( $args = ... ): int|false;
TypeNameDescription
string|array$args{

Returns: int|false — The number of rows updated, or false on error.

delete_count() static

Delete post count.

Since: 3.3.0
Line: 378

static public function delete_count( $post_id, $blog_id, $daily = ... ): bool|int;
TypeNameDescription
int$post_idPost ID.
int$blog_idBlog ID.
bool$dailyDaily flag.

Returns: bool|int — Number of rows affected or false if error.

edit_count_ajax() static

Function to update the Top 10 count with ajax.

Since: 3.3.0
Line: 405

static public function edit_count_ajax(  );

edit_count() static

Edit post count.

Since: 3.3.0
Line: 463

static public function edit_count( $post_id, $blog_id, $total_count ): bool|int;
TypeNameDescription
int$post_idPost ID.
int$blog_idBlog ID.
int$total_countTotal count.

Returns: bool|int — Number of rows affected or false if error.