mainwp/includesfunctions.php

MainWP Base Functions.

Grab MainWP Directory and check for permissions.

Functions

mainwpdir()

mainwpdir() : string

Grab MainWP Directory

Returns

string

mainwp_do_not_have_permissions()

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

Detect permission level & display message to end user.

Parameters

string $where

User's location.

boolean $echo

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