Properties

$instance

$instance : mixed

Private static variable to hold the single instance of the class.

Type

mixed — Default null

$upgradeVersionInfo

$upgradeVersionInfo : null

Private variable to hold the upgrade version info.

Type

null — Version info.

Methods

__construct()

__construct() 

MainWP_System_Handler constructor.

Run each time the class is called.

filter_fetch_urls_authed()

filter_fetch_urls_authed(mixed  $pluginFile, string  $key, object  $dbwebsites, string  $what, array  $params, mixed  $handle, mixed  $output) : mixed

Method filter_fetch_urls_authed()

Filter fetch authorized urls.

Parameters

mixed $pluginFile

MainWP extention.

string $key

MainWP Licence Key.

object $dbwebsites

Child Sites.

string $what

Function to perform.

array $params

Function paramerters.

mixed $handle

Function handle.

mixed $output

Function output.

Returns

mixed —

MainWP_Extensions_Handler::hook_fetch_urls_authed() Hook fetch authorized URLs.

filter_fetch_url_authed()

filter_fetch_url_authed(mixed  $pluginFile, string  $key, integer  $websiteId, string  $what, array  $params, null  $raw_response = null) : mixed

Method filter_fetch_url_authed()

Filter fetch Authorized URL.

Parameters

mixed $pluginFile

MainWP extention.

string $key

MainWP licence key.

integer $websiteId

Website ID.

string $what

Function to perform.

array $params

Function paramerters.

null $raw_response

Raw response.

Returns

mixed —

MainWP_Extensions_Handler::hook_fetch_url_authed() Hook fetch authorized URL.

apply_filters()

apply_filters(string  $filter, array  $value = array()) : array

Method apply_filter()

Apply filter

Parameters

string $filter

The filter.

array $value

Input value.

Returns

array —

$output Output array.

handle_manage_sites_screen_settings()

handle_manage_sites_screen_settings() 

Method handle_manage_sites_screen_settings()

Handle manage sites screen settings

handle_mainwp_tools_settings()

handle_mainwp_tools_settings() 

Method handle_mainwp_tools_settings()

Handle mainwp tools settings.

handle_rest_api_settings()

handle_rest_api_settings() 

Method handle_rest_api_settings()

Handle rest api settings

plugins_api_info()

plugins_api_info(mixed  $false, mixed  $action, mixed  $arg) : mixed

Method plugins_api_info()

Get MainWP Extension api information.

Parameters

mixed $false

Return value.

mixed $action

Action being performed.

mixed $arg

Action arguments. Should be the plugin slug.

Returns

mixed —

$info|$false

check_update_custom()

check_update_custom(object  $transient) : object

Method check_update_custom()

Check MainWP Extensions for updates.

Parameters

object $transient

Transient information.

Returns

object —

$transient Transient information.

map_rslt_obj()

map_rslt_obj(object  $result) : object

Method map_rslt_obj()

Map resulting object.

Parameters

object $result

Resulting information.

Returns

object —

$obj Mapped resulting object.

pre_check_update_custom()

pre_check_update_custom(object  $transient) : object

Method pre_check_update_custom()

Pre-check for extension updates.

Parameters

object $transient

Transient information.

Returns

object —

$transient Transient information.

upload_file()

upload_file(mixed  $file) : void

Method upload_file()

Upload a file.

Parameters

mixed $file

File to upload.

readfile_chunked()

readfile_chunked(mixed  $filename) : mixed

Method readfile_chunked()

Read Chunked File.

Parameters

mixed $filename

Name of file.

Returns

mixed —

echo $buffer|false|$handle.

activate_redirect()

activate_redirect(mixed  $location) : \MainWP\Dashboard\$location

Method activate_redirection()

Redirect after activating MainWP Extension.

Parameters

mixed $location

Location to redirect to.

Returns

\MainWP\Dashboard\$location —

Admin URL + the page to redirect to.

activate_extension()

activate_extension(mixed  $ext_key, array  $info = array()) 

Method activate_extension()

Activate MainWP Extension.

Parameters

mixed $ext_key

Extension API Key.

array $info

Extension Info.

deactivate_extension()

deactivate_extension(mixed  $ext_key) 

Method deactivate_extension()

Deactivate MaiNWP Extension.

Parameters

mixed $ext_key

Exnension API Key.

check_upgrade()

check_upgrade() 

Method check_upgrade()

Check if Extension has an update.