Recent

Dashboardclass

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: 51

public function render_page(  );

admin_menu()

Admin Menu.

Since: 3.0.0
Line: 216

public function admin_menu(  );

network_admin_menu()

Network Admin Menu.

Since: 4.2.0
Line: 245

public function network_admin_menu(  );

admin_enqueue_scripts()

Enqueue scripts in admin area.

Since: 3.0.0
Line: 274

public function admin_enqueue_scripts( $hook );
Type Name Description
string $hook The current admin page.

fetch_visits_by_date() static

Fetch chart data for visits over time.

Since: 4.2.0
Line: 319

static public function fetch_visits_by_date( $from_date, $to_date, $network = ... ): array;
Type Name Description
string $from_date Start date in Y-m-d format.
string $to_date End date in Y-m-d format.
bool $network Whether 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: 385

public function get_chart_data(  );

get_dashboard_tab()

Load one historical dashboard tab.

Since: 4.5.0
Line: 413

public function get_dashboard_tab(  );

get_tabs()

Array containing the settings’ sections.

Since: 3.0.0
Line: 448

public function get_tabs(  ): array;

Returns: array — Settings array

Get popular posts for a date range.

Since: 3.0.0
Line: 508

public function display_popular_posts( $args = ... ): string;
Type Name Description
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: 624

public function get_period_total_visits( $args = ... ): int;
Type Name Description
array $args Query parameters (daily, from_date, to_date, blog_id, network).

Returns: int — Total visits.

Retrieve the popular posts.

Since: 3.0.0
Line: 688

public function get_popular_posts( $args = ... ): array;
Type Name Description
string|array $args {

Returns: array — Array of post objects.

help_tabs()

Generates the help tabs.

Since: 3.0.0
Line: 789

public function help_tabs(  );