mainwp/includesfunctions.php

MainWP Base Functions.

Grab MainWP Directory and check for permissions.

Constants

FILTER_SANITIZE_STRING_COMPATIBLE

FILTER_SANITIZE_STRING_COMPATIBLE = 513

Functions

mainwpdir()

mainwpdir() : string

Grab MainWP Directory

Returns

string

mainwp_do_not_have_permissions()

mainwp_do_not_have_permissions(string  $where = '', boolean  $echo_out = true) : string|boolean

Detect permission level & display message to end user.

Parameters

string $where

User's location.

boolean $echo_out

Defines weather or not to echo error message.

Returns

string|boolean —

$msg|false

mainwp_current_user_can()

mainwp_current_user_can(string  $cap_type = '', string  $cap = '') : boolean

Check permission level.

To compatible with extensions.

Parameters

string $cap_type

Group or type of capabilities.

string $cap

Capabilities for current user.

Returns

boolean —

true|false

mainwp_get_actions_handler_instance()

mainwp_get_actions_handler_instance() : boolean

Function to get mainwp actions handler instance.

Returns

boolean —

true|false

mainwp_send_json_output()

mainwp_send_json_output(array  $output) 

Handle send json output.

Parameters

array $output

Array output.

mainwp_modules_is_enabled()

mainwp_modules_is_enabled(string  $module) : boolean

Check if module is enable.

Parameters

string $module

module slug.

Returns

boolean —

true|false