Properties

$extensions

$extensions : array

All extensions.

Type

array

$possible_options

$possible_options : array

Possible options.

Type

array

Methods

get_class_name()

get_class_name() : object

Method get_class_name()

Get Class Name.

Returns

object

get_extension_slug()

get_extension_slug(mixed  $pSlug) : string

Get Extension Slug.

Parameters

mixed $pSlug

Extension Slug.

Returns

string —

Extensions Slug.

get_slugs()

get_slugs() : array

Get all extension slugs.

Returns

array —

am_slugs|slugs.

polish_ext_name()

polish_ext_name(array  $extension) : string

Clean up MainWP Extention names.

Parameters

array $extension

Array of MainWP Extentsions.

Returns

string —

$menu_name Final Menu Name.

get_extensions()

get_extensions(boolean  $forced = false) : array

Load MainWP Extensions.

Parameters

boolean $forced

Forced reload value.

Returns

array —

Array of loaded Extensions.

get_indexed_extensions_infor()

get_indexed_extensions_infor(array  $args = array()) : array

Get MainWP Extensions infor array.

Parameters

array $args

Empty Array.

Returns

array —

Array of Extensions.

gen_api_password()

gen_api_password(integer  $length = 12, boolean  $special_chars = true, boolean  $extra_special_chars = false) : \MainWP\Dashboard\MainWP_Api_Manager_Password_Management::generate_password()

Generate API Password.

Parameters

integer $length

Lenght of password.

boolean $special_chars

true|false, allow special characters.

boolean $extra_special_chars

true|false, allow extra special characters.

Returns

\MainWP\Dashboard\MainWP_Api_Manager_Password_Management::generate_password()

add_extension_menu()

add_extension_menu(mixed  $slug) : boolean

Add Extension Menu.

Parameters

mixed $slug

Extension slug.

Returns

boolean —

true|false.

http_request_reject_unsafe_urls()

http_request_reject_unsafe_urls(boolean  $r, mixed  $url) : mixed

HTTP Request Reject Unsafe Urls.

Parameters

boolean $r

Results.

mixed $url

Upgrade Extension URL.

Returns

mixed —

false|$r.

no_ssl_filter_function()

no_ssl_filter_function(boolean  $r, mixed  $url) : mixed

No SSL Filter Function.

Parameters

boolean $r

Results.

mixed $url

Upgrade Extension URL.

Returns

mixed —

false|$r.

no_ssl_filter_extension_upgrade()

no_ssl_filter_extension_upgrade(boolean  $r, mixed  $url) : mixed

No SSL Filter Extention Upgrade.

Parameters

boolean $r

Results.

mixed $url

Upgrade Extension URL.

Returns

mixed —

false|$r.

activate_license()

activate_license() 

Activate MainWP Extension License.

install_plugin()

install_plugin(mixed  $url, boolean  $activatePlugin = false) : mixed

Install MainWP Extension.

Parameters

mixed $url

MainWP Extension update URL.

boolean $activatePlugin

true|false Whether or not to activate extension.

Returns

mixed —

$return

is_extension_available()

is_extension_available(mixed  $pAPI) : boolean

Check if MainWP Extension is available.

Parameters

mixed $pAPI

MainWP Extension API Key.

Returns

boolean —

true|false.

is_extension_enabled()

is_extension_enabled(mixed  $pluginFile) : array

Check if MainWP Extension is enabled.

Parameters

mixed $pluginFile

MainWP Extension to bo verified.

Returns

array —

'key' => md5( $pluginFile . '-SNNonceAdder').

added_on_menu()

added_on_menu(mixed  $slug) : array

Create Menu Extension Array.

Parameters

mixed $slug

menu slug.

Returns

array —

Menu Array.

is_extension_activated()

is_extension_activated(mixed  $plugin_slug) : boolean

Check if MainWP Extension is activated or not.

Parameters

mixed $plugin_slug

MainWP Extension slug.

Returns

boolean —

true|false.

hook_verify()

hook_verify(mixed  $pluginFile, mixed  $key) : mixed

Verify MainWP Extension.

Parameters

mixed $pluginFile

MainWP Extensoin to verify.

mixed $key

Child Site Key.

Returns

mixed —

md5( $pluginFile . '-SNNonceAdder' ) == $key

hook_get_dashboard_sites()

hook_get_dashboard_sites(mixed  $pluginFile, mixed  $key) : mixed

Get sql websites for current user.

Parameters

mixed $pluginFile

Extension plugin file to verify.

mixed $key

PThe child-key.

Returns

mixed —

null|sql query.

hook_fetch_urls_authed()

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

Fetch Authorized URLS.

Parameters

mixed $pluginFile

Extension plugin file to verify.

string $key

The child key.

object $dbwebsites

The websites.

string $what

Action to perorm.

mixed $params

Request parameters.

mixed $handle

Request handle.

mixed $output

Request output.

Returns

mixed —

false|MainWP_Connect::fetch_urls_authed()

hook_fetch_url_authed()

hook_fetch_url_authed(mixed  $pluginFile, mixed  $key, mixed  $websiteId, mixed  $what, mixed  $params, null  $rawResponse = null) : mixed

Fetch Authorized URL.

Parameters

mixed $pluginFile

Extension plugin file to verify.

mixed $key

The child-key.

mixed $websiteId

Child Site ID.

mixed $what

What.

mixed $params

Parameters.

null $rawResponse

Raw responce.

Throws

\MainWP\Dashboard\MainWP_Exception

On incorrect website.

Returns

mixed —

false|throw|error

hook_get_db_sites()

hook_get_db_sites(mixed  $pluginFile, mixed  $key, mixed  $sites, string  $groups = '', boolean  $options = false) : array

Get DB Sites.

Parameters

mixed $pluginFile

Extension plugin file to verify.

mixed $key

The child-key.

mixed $sites

Child Sites.

string $groups

Groups.

boolean $options

Options.

Returns

array —

$dbwebsites.

hook_get_sites()

hook_get_sites(string  $pluginFile, string  $key, integer  $websiteid = null, boolean  $for_manager = false, array  $others = array()) : array

Get Sites.

Parameters

string $pluginFile

Extension plugin file to verify.

string $key

The child-key.

integer $websiteid

The id of the child site you wish to retrieve.

boolean $for_manager

Check Team Control.

array $others

Array of others.

Returns

array —

$output Array of content to output.

hook_get_groups()

hook_get_groups(string  $pluginFile, string  $key, integer  $groupid, boolean  $for_manager = false) : array|boolean

Method hook_get_groups()

Get Child Sites within groups & store them in an array.

Parameters

string $pluginFile

Extension plugin file to verify.

string $key

The child-key.

integer $groupid

The id of the group you wish to retrieve.

boolean $for_manager

Check Team Control.

Returns

array|boolean —

$output|false An array of arrays, the inner-array contains the id/name/array of site ids for the supplied groupid/all groups. False when something goes wrong.

hook_get_all_extensions()

hook_get_all_extensions() : \MainWP\Dashboard\mainwp_extensions

Get all loaded extensions.

Returns

\MainWP\Dashboard\mainwp_extensions —

value.

hook_clone_site()

hook_clone_site(mixed  $pluginFile, mixed  $key, mixed  $websiteid, mixed  $cloneID, mixed  $clone_url, boolean  $force_update = false) : mixed

Clone Site.

Parameters

mixed $pluginFile

Extension plugin file to verify.

mixed $key

The child-key.

mixed $websiteid

Child Site ID.

mixed $cloneID

Clone ID.

mixed $clone_url

URL to CLone to.

boolean $force_update

true|false, force an update.

Returns

mixed —

false|$ret

hook_delete_clone_site()

hook_delete_clone_site(mixed  $pluginFile, mixed  $key, mixed  $clone_url = '', boolean  $clone_site_id = false) : mixed

Delete Clones Site.

Parameters

mixed $pluginFile

Extension plugin file to verify.

mixed $key

The child-key.

mixed $clone_url

URL to Clone to.

boolean $clone_site_id

Cloned Site ID.

Returns

mixed —

false|array Array => "Success".

hook_add_group()

hook_add_group(mixed  $pluginFile, mixed  $key, mixed  $newName) : mixed

Add Groups.

Parameters

mixed $pluginFile

Extension plugin file to verify.

mixed $key

The child-key.

mixed $newName

Name that you want to give the group.

Returns

mixed —

false|$groupId