mainwp-child/includesfunctions.php

MainWP Child Functions

Functions

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.

mainwp_child_helper()

mainwp_child_helper() : mixed

Method mainwp_child_helper()

Get MainWP Child helper instance.

Returns

mixed —

MainWP\Child\MainWP_Helper

convert_to_screen()

convert_to_screen() : \MainWP_Fake_Wp_Screen

Convert to screen.

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

Returns

\MainWP_Fake_Wp_Screen

add_screen_option()

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

Adds the WP Fake Screen option.

Parameters

mixed $option

Options.

array $args

Arguments.

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.

apply_filters_deprecated()

apply_filters_deprecated(string  $hook_name, array  $args, string  $version, string  $replacement = '', string  $message = '') 

Support old WP version 4.0.

Fires functions attached to a deprecated filter hook.

When a filter hook is deprecated, the apply_filters() call is replaced with apply_filters_deprecated(), which triggers a deprecation notice and then fires the original filter hook.

Parameters

string $hook_name

The name of the filter hook.

array $args

Array of additional function arguments to be passed to apply_filters().

string $version

The version of WordPress that deprecated the hook.

string $replacement

Optional. The hook that should have been used. Default empty.

string $message

Optional. A message regarding the change. Default empty.