Properties

$security_nonces

$security_nonces : string

Protected static variable to hold security nounces.

Type

string — Security nonce.

$security_names

$security_names : string

Protected static variable to hold security nounces.

Type

string — Security nonce.

$instance

$instance : null

Public static varibale to hold the instance.

Type

null — Default value.

Methods

init()

init() : void

Init extensions actions

Force Extending class to define this method.

secure_request()

secure_request(string  $action = '', string  $query_arg = 'security') 

Method secure_request()

Add security check to request parameter

Parameters

string $action

Action to perform.

string $query_arg

Query argument.

check_security()

check_security(string  $action = -1, string  $query_arg = 'security', boolean  $out_die = true) : boolean

Method check_security()

Check security request.

Parameters

string $action

Action to perform.

string $query_arg

Query argument.

boolean $out_die

return or exit.

Returns

boolean —

true or false

add_action()

add_action(string  $action, string  $callback, integer  $priority = 10, integer  $accepted = 2) 

Method add_action()

Add ajax action.

Parameters

string $action

Action to perform.

string $callback

Callback to perform.

integer $priority

priority aciton.

integer $accepted

number args.

add_action_nonce()

add_action_nonce(string  $action) 

Method add_action_nonce()

Add security nonce.

Parameters

string $action

Action to perform.

create_security_nonces()

create_security_nonces() : self

Create the security nonces.

Returns

self —

$security_nonces.

instance()

instance() : self

Method instance()

Create public static instance.

Returns

self —

$instance.

mainwp_ext_applypluginsettings()

mainwp_ext_applypluginsettings() : mixed

Apply plugin settings.

Returns

mixed —

success|error.

add_extension_menu()

add_extension_menu() : void

Ajax add extension menu.

activate_api_extension()

activate_api_extension() : void

Activate MainWP Extension.

ajax_extension_plugin_action()

ajax_extension_plugin_action() : void

Handle MainWP Extension plugin actions.

delete_extension_plugin()

delete_extension_plugin(string  $plugin_slug) : array

Delete MainWP Extension plugin.

Parameters

string $plugin_slug

plugin slug.

Returns

array —

$status Status result.

grab_extension_api_key()

grab_extension_api_key() : void

Grab MainWP Extension API Key.

save_extensions_api_login()

save_extensions_api_login() : void

Save MainWP Extensions API Login details for future logins.

save_api_ssl_verify()

save_api_ssl_verify() : void

Save whenther or not to verify MainWP API SSL certificate.

test_extensions_api_login()

test_extensions_api_login() : void

Test Extension page MainWP.com login details.

download_and_install()

download_and_install() : void

Download & Install MainWP Extension.

bulk_activate()

bulk_activate() : void

MainWP Extension Bulck Activation.

remove_extension_menu_from_mainwp_menu()

remove_extension_menu_from_mainwp_menu() : void

Remove Extensions menu from MainWP Menu.