Recent

Activator class

Activator

Admin Columns Class.

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

Methods

__construct()

Constructor class.

Since: 3.3.0
Line: 62

public function __construct(  );

activation_hook() static

Fired when the plugin is Network Activated.

Since: 1.9.10.1
Line: 77

static public function activation_hook( $network_wide );
TypeNameDescription
boolean$network_wideTrue if WPMU superadmin uses

single_activate() static

Fired for each blog when the plugin is activated.

Since: 2.0.0
Line: 106

static public function single_activate(  );

is_table_installed() static

Check if the Top Ten table is installed.

Since: 4.1.0
Line: 157

static public function is_table_installed( $table_name ): bool;
TypeNameDescription
string$table_nameTable name.

Returns: bool — True if the table exists, false otherwise.

maybe_create_table() static

Create table if not exists.

Since: 4.1.0
Line: 169

static public function maybe_create_table( $table_name, $sql );
TypeNameDescription
string$table_nameTable name.
string$sqlSQL to create the table.

create_tables() static

Create tables.

Since: 4.1.0
Line: 185

static public function create_tables(  );

create_full_table_sql() static

Create full table sql.

Since: 4.1.0
Line: 206

static public function create_full_table_sql(  ): string;

Returns: string — SQL to create the full table.

create_daily_table_sql() static

Create full daily table sql.

Since: 4.1.0
Line: 217

static public function create_daily_table_sql(  ): string;

Returns: string — SQL to create the daily table.

recreate_table() static

Recreate a table.

This method recreates a table by creating a backup, dropping the original table, and then creating a new table with the original name and inserting the data from the backup.

Since: 4.1.0
Line: 237

static public function recreate_table( $table_name, $create_table_sql, $backup = ..., $fields = ..., $group_by_fields = ... ): bool|\WP_Error;
TypeNameDescription
string$table_nameThe name of the table to recreate.
string$create_table_sqlThe SQL statement to create the new table.
bool$backupWhether to backup the table or not.
array$fieldsThe fields to include in the temporary table and on duplicate key code.
array$group_by_fieldsThe fields to group by in the temporary table.

Returns: bool|\WP_Error — True if recreated, error message if failed.

recreate_overall_table() static

Recreate overall table.

Since: 4.1.0
Line: 256

static public function recreate_overall_table( $backup = ... ): bool|\WP_Error;
TypeNameDescription
bool$backupWhether to backup the table or not.

Returns: bool|\WP_Error — True if recreated, error message if failed.

recreate_daily_table() static

Recreate daily table.

Since: 4.1.0
Line: 269

static public function recreate_daily_table( $backup = ... ): bool|\WP_Error;
TypeNameDescription
bool$backupWhether to backup the table or not.

Returns: bool|\WP_Error — True if recreated, error message if failed.

activate_new_site() static

Fired when a new site is activated with a WPMU environment.

Since: 2.0.0
Line: 280

static public function activate_new_site( $blog );
TypeNameDescription
int|\WP_Site$blogWordPress 5.1 passes a WP_Site object.

deactivation_hook() static

Fired when the plugin is deactivated.

Since: 4.3.0
Line: 302

static public function deactivation_hook( $network_wide );
TypeNameDescription
bool$network_wideTrue if WPMU superadmin uses “Network Deactivate” action, false otherwise.

single_deactivate() static

Fired for each blog when the plugin is deactivated.

Since: 4.3.0
Line: 327

static public function single_deactivate(  );

update_db_check() static

Check and update database version.

Since: 3.3.0
Line: 340

static public function update_db_check(  );

is_all_tables_installed() static

Check if all required tables are installed.

Since: 4.1.0
Line: 355

static public function is_all_tables_installed(  ): bool;

Returns: bool — True if all tables are installed, false if any are missing.