Properties

$list

$list : array

Modules list

Type

normal

Methods

__construct()

__construct() : mixed

Modules constructor.

Returns

mixed

predefined_modules()

predefined_modules() : mixed

Set modules list

Returns

mixed

get_list()

get_list() : array

Get list of modules

Returns

array

get_data()

get_data(string  $slug) : bool|array

Get module data

Parameters

string $slug

Module slug

Returns

bool|array —

Returns false if module doesn't exists

exists()

exists(string  $slug) : bool

Checking if module exists

Parameters

string $slug

Module slug

Returns

bool —

Returns false if module doesn't exists, otherwise true

is_active()

is_active(string  $slug) : bool

Check if module is active

Parameters

string $slug

Module slug

Returns

bool

is_disabled()

is_disabled(string  $slug) : bool

Check if module is disabled

Parameters

string $slug

Module slug

Returns

bool

can_activate()

can_activate(string  $slug) : bool

Check if current user can activate a module

Parameters

string $slug

Module slug

Returns

bool

can_deactivate()

can_deactivate(string  $slug) : bool

Checking if current user can deactivate a module

Parameters

string $slug

Module slug

Returns

bool

can_flush()

can_flush(string  $slug) : bool

Checking if current user can flush module's data

Parameters

string $slug

Module slug

Returns

bool

is_first_installed()

is_first_installed(string  $slug) : bool

Checking if the module had been already first-time activated Must be reset this marker after flushing data of the module

Parameters

string $slug

Returns

bool

has_settings_section()

has_settings_section(string  $slug) : bool

Checking if the module has the settings section in wp-admin dashboard

Parameters

string $slug

Returns

bool

activate()

activate(string  $slug) : bool

Module's activation handler

Parameters

string $slug

Module's slug

Returns

bool

deactivate()

deactivate(string  $slug) : bool

Module's deactivation handler

Parameters

string $slug

Module slug

Returns

bool

flush_data()

flush_data(string  $slug) : bool

Module's flushing data handler

Parameters

string $slug

Module slug

Returns

bool

load_modules()

load_modules() : mixed

Load all modules

Returns

mixed

run()

run(string  $slug) : mixed

Run main class of module

Parameters

string $slug

Module slug

Returns

mixed

install()

install(string  $slug) : mixed

Installation handler for single module

Parameters

string $slug

Module slug

Returns

mixed