AR Model Viewer for WooCommerce

Ar_Model_Viewer_For_Woocommerce_Activator

Fired during plugin activation.

This class defines all code necessary to run during the plugin's activation.

Tags
todo

This should probably be in one class together with Deactivator Class.

since
1.0.0
subpackage

Ar_Model_Viewer_For_Woocommerce/includes

author

Manuel Ramirez Coronel ra_cm@outlook.com

Table of Contents

Properties

$plugin  : string
The $_REQUEST['plugin'] during plugin activation.
$request  : array<string|int, mixed>
The $_REQUEST during plugin activation.

Methods

activate()  : mixed
Activate the plugin.
check_caps()  : bool
Check Capabilities.
get_request()  : bool|array<string|int, mixed>
Get the request.
validate_request()  : bool
Validate the Request data.

Properties

$plugin

The $_REQUEST['plugin'] during plugin activation.

private static string $plugin = \AR_MODEL_VIEWER_FOR_WOOCOMMERCE_BASE_NAME

The $_REQUEST['plugin'] value during plugin activation.

Tags
since
1.0.0
access

private

Methods

check_caps()

Check Capabilities.

private static check_caps() : bool

We want no one else but users with activate_plugins or above to be able to active this plugin.

Tags
since
1.0.0
Return values
bool

false if no caps, else true.

get_request()

Get the request.

private static get_request() : bool|array<string|int, mixed>

Gets the $_REQUEST array and checks if necessary keys are set. Populates self::request with necessary and sanitized values.

Tags
since
1.0.0
Return values
bool|array<string|int, mixed>

false or self::$request array.

validate_request()

Validate the Request data.

private static validate_request(string $plugin) : bool

Validates the $_REQUESTed data is matching this plugin and action.

Parameters
$plugin : string

The Plugin folder/name.php.

Tags
since
1.0.0
Return values
bool

false if either plugin or action does not match, else true.


        
On this page

Search results