Recent

Tracker class

Tracker

Admin Columns Class.

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

Methods

__construct()

Constructor class.

Since: 3.3.0
Line: 30

public function __construct(  );

enqueue_scripts() static

Enqueues the scripts needed by Top 10.

Since: 1.9.7
Line: 44

static public function enqueue_scripts(  ): void;

Returns: void

query_vars() static

Function to add additional queries to query_vars.

Since: 2.0.0
Line: 162

static public function query_vars( $vars ): array;
TypeNameDescription
array$varsQuery variables array.

Returns: array — Query variables array with Top 10 parameters appended

parse_request() static

Parses the WordPress object to update/display the count.

Since: 2.0.0
Line: 188

static public function parse_request( $wp );
TypeNameDescription
\WP$wpCurrent WordPress environment instance.

add_feed_tracker() static

Add a tracking pixel to feed content.

Appends a 1×1 transparent GIF to each feed item. When a feed reader loads the image, parse_request() intercepts the request, increments the view count, and serves the GIF. Views are merged into the same tables as regular web views.

Note: feed readers that block remote images by default will not trigger the pixel. The count only increments when the reader actually loads images.

Since: 4.3.0
Line: 252

static public function add_feed_tracker( $content ): string;
TypeNameDescription
string$contentFeed content.

Returns: string — Feed content with the tracker image appended.

tracker_parser() static

Parse the ajax response.

Since: 2.4.0
Line: 321

static public function tracker_parser(  );

update_count() static

Function to update the count in the database.

Since: 2.6.0
Line: 353

static public function update_count( $id, $blog_id, $activate_counter, $source = ... ): string;
TypeNameDescription
int$idPost ID.
int$blog_idBlog ID.
int$activate_counterActivate counter flag.
int$sourceTraffic source: 0 = web, 1 = feed.

Returns: string — Response on database update.