\

Namespaces

MainWP

Classes

WPRocket_CLI Manage Revisions

Constants

DIRECTORY_SEPARATOR

DIRECTORY_SEPARATOR = '/'

Defines reusable directory separator.

DOING_AJAX

DOING_AJAX = true

Checks whether ajax job is in progress.

DOING_CRON

DOING_CRON = true

Checks whether cron is in progress.

DOING_CRON

DOING_CRON = true

Checks whether cron is in progress.

FS_METHOD

FS_METHOD = 'direct'

FS_METHOD

FS_METHOD = 'direct'

Define WordPress File system.

MAINWP_CHILD_DEBUG

MAINWP_CHILD_DEBUG = false

MAINWP_CHILD_FILE

MAINWP_CHILD_FILE = __FILE__

Define MainWP Child Plugin absolute full path and filename of this file.

MAINWP_CHILD_PLUGIN_DIR

MAINWP_CHILD_PLUGIN_DIR = plugin_dir_path(MAINWP_CHILD_FILE)

Define MainWP Child Plugin Directory.

MAINWP_CHILD_URL

MAINWP_CHILD_URL = plugin_dir_url(MAINWP_CHILD_FILE)

Define MainWP Child Plugin URL.

MAINWP_PLUGIN_DIR

MAINWP_PLUGIN_DIR = plugin_dir_path(MAINWP_PLUGIN_FILE)

Define MainWP Dashboard Plugin Directory.

MAINWP_PLUGIN_FILE

MAINWP_PLUGIN_FILE = __FILE__

Define MainWP Dashboard Plugin absolute full path and filename of this file.

MAINWP_PLUGIN_URL

MAINWP_PLUGIN_URL = plugin_dir_url(MAINWP_PLUGIN_FILE)

Define MainWP Child Dashboard URL.

MAINWP_REST_API

MAINWP_REST_API = true

MAINWP_SAVE_FS_METHOD

MAINWP_SAVE_FS_METHOD = get_filesystem_method()

Defines save file system method.

MAINWP_TWITTER_MAX_SECONDS

MAINWP_TWITTER_MAX_SECONDS = 60 * 5

Defines MainWP Twitter Max Seconds.

MAINWP_VERSION

MAINWP_VERSION = $this->current_version

Defines MainWP Version.

PCLZIP_TEMPORARY_DIR

PCLZIP_TEMPORARY_DIR = $backupdir

Defines PCLZIP temporary directory.

WP_ADMIN

WP_ADMIN = true

WP_DEBUG

WP_DEBUG = false

Defines if WP is debug mode.

WP_INSTALLING

WP_INSTALLING = true

Defines whether WP is being installed.

Functions

add_screen_option()

add_screen_option(mixed  $option, array  $args = array()) 

Adds the WP Fake Screen option.

Parameters

mixed $option

Options.

array $args

Arguments.

convert_to_screen()

convert_to_screen(string  $hook_name) : \MainWP_Fake_Wp_Screen

Convert to screen.

We need this because BackWPup_Page_Jobs extends WP_List_Table. which uses convert_to_screen.

Parameters

string $hook_name

Hook name.

Returns

\MainWP_Fake_Wp_Screen

mainwp_autoload()

mainwp_autoload(string  $class_name) : \require_once

Autoloader for all classes, pages & widgets

Parameters

string $class_name

Folder name class|pages|widgets.

Returns

\require_once —

$autoload_path;

mainwp_child_autoload()

mainwp_child_autoload(string  $class_name) 

MainWP Child Plugin Autoloader to load all other class files.

Parameters

string $class_name

Name of the class to load.

mainwp_child_backwpup_wp_list_table_dependency()

mainwp_child_backwpup_wp_list_table_dependency() 

Method mainwp_child_backwpup_wp_list_table_dependency()

Init backwpupwp list table dependency functions.

mainwp_child_helper()

mainwp_child_helper() : mixed

Method mainwp_child_helper()

Get MainWP Child helper instance.

Returns

mixed —

MainWP\Child\MainWP_Helper

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_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

mainwpdir()

mainwpdir() : string

Grab MainWP Directory

Returns

string

wp_verify_nonce()

wp_verify_nonce(string  $nonce, string|integer  $action = -1) : false|integer

Verify that correct nonce was used with time limit.

The user is given an amount of time to use the token, so therefore, since the UID and $action remain the same, the independent variable is the time.

Parameters

string $nonce

Nonce that was used in the form to verify.

string|integer $action

Should give context to what is taking place and be the same when nonce was created.

Returns

false|integer —

False if the nonce is invalid, 1 if the nonce is valid and generated between 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.