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.

hook_fetch_url_verify_action()

hook_fetch_url_verify_action(mixed  $pluginFile, string  $childKey, integer  $websiteId, array  $params) : mixed

Method hook_fetch_url_verify_action()

Filter fetch Authorized URL.

Parameters

mixed $pluginFile

MainWP extention.

string $childKey

Extension child key.

integer $websiteId

Website ID.

array $params

Function paramerters.

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.

admin_init()

admin_init() 

Method admin_init()

Do nothing if current user is not an Admin.

hook_get_sql_websites_for_current_user()

hook_get_sql_websites_for_current_user(mixed  $input_value, string  $pluginFile, string  $key, mixed  $params) : string

Method hook_get_sql_websites_for_current_user()

Get sql websites for current user.

Parameters

mixed $input_value

First input filter value.

string $pluginFile

Extension plugin file to verify.

string $key

The child-key.

mixed $params

Input params data.

Returns

string —

sql.

handle_manage_sites_screen_settings()

handle_manage_sites_screen_settings() 

Method handle_manage_sites_screen_settings()

Handle manage sites screen settings

handle_monitoring_sites_screen_settings()

handle_monitoring_sites_screen_settings() 

Method handle_monitoring_sites_screen_settings()

Handle monitoring sites screen settings

handle_clients_screen_settings()

handle_clients_screen_settings() 

Method handle_clients_screen_settings()

Handle manage clients screen settings

handle_updates_screen_settings()

handle_updates_screen_settings() 

Method handle_clients_screen_settings()

Handle manage clients screen settings

handle_mainwp_tools_settings()

handle_mainwp_tools_settings() 

Method handle_mainwp_tools_settings()

Handle mainwp tools settings.

include_pluggable()

include_pluggable() 

Method include_pluggable()

Include pluggable functions.

plugins_api_extension_info()

plugins_api_extension_info(mixed  $input_value, mixed  $action, mixed  $arg) : mixed

Method plugins_api_extension_info()

Get MainWP Extension api information.

Parameters

mixed $input_value

Return value.

mixed $action

Action being performed.

mixed $arg

Action arguments. Should be the plugin slug.

Returns

mixed —

$info|$input_value

plugins_api_wp_plugins_api_result()

plugins_api_wp_plugins_api_result(mixed  $res, mixed  $action, mixed  $arg) : mixed

Method plugins_api_wp_plugins_api_result()

Hook after get plugins api information.

Parameters

mixed $res

api information value.

mixed $action

Action being performed.

mixed $arg

Action arguments. Should be the plugin slug.

Returns

mixed —

$res

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, boolean  $dashboard_only = false) 

Method deactivate_extension()

Deactivate MaiNWP Extension.

Parameters

mixed $ext_key

Exnension API Key.

boolean $dashboard_only

Deactive API Key on dashboard only.

check_upgrade()

check_upgrade() 

Method check_upgrade()

Check if Extension has an update.