Recent

Dashboard class

Dashboard

Admin Dashboard Class.

Namespace: WebberZone\Top_Ten\Admin
Since: 3.0.0
Source: includes/admin/class-dashboard.php line 22

Methods

__construct()

Constructor class.

Since: 3.0.0
Line: 38

public function __construct(  );

render_page()

Render the settings page.

Since: 3.0.0
Line: 50

public function render_page(  );

admin_menu()

Admin Menu.

Since: 3.0.0
Line: 192

public function admin_menu(  );

network_admin_menu()

Network Admin Menu.

Since: 4.2.0
Line: 221

public function network_admin_menu(  );

admin_enqueue_scripts()

Enqueue scripts in admin area.

Since: 3.0.0
Line: 250

public function admin_enqueue_scripts( $hook );
TypeNameDescription
string$hookThe current admin page.

fetch_visits_by_date() static

Fetch chart data for visits over time.

Since: 4.2.0
Line: 293

static public function fetch_visits_by_date( $from_date, $to_date, $network = ... ): array;
TypeNameDescription
string$from_dateStart date in Y-m-d format.
string$to_dateEnd date in Y-m-d format.
bool$networkWhether to fetch network-wide data.

Returns: array — Chart data with date and visits.

get_chart_data()

Function to add an action to search for tags using Ajax.

Since: 3.0.0
Line: 341

public function get_chart_data(  );

get_tabs()

Array containing the settings’ sections.

Since: 3.0.0
Line: 372

public function get_tabs(  ): array;

Returns: array — Settings array

Get popular posts for a date range.

Since: 3.0.0
Line: 432

public function display_popular_posts( $args = ... ): string;
TypeNameDescription
string|array$args{

Returns: string — HTML table with popular posts.

get_period_total_visits()

Get the raw total visits for a period, matching the chart methodology.

Since: 4.3.0
Line: 538

public function get_period_total_visits( $args = ... ): int;
TypeNameDescription
array$argsQuery parameters (daily, from_date, to_date, blog_id, network).

Returns: int — Total visits.

Retrieve the popular posts.

Since: 3.0.0
Line: 605

public function get_popular_posts( $args = ... ): array;
TypeNameDescription
string|array$args{

Returns: array — Array of post objects.

help_tabs()

Generates the help tabs.

Since: 3.0.0
Line: 713

public function help_tabs(  );