License_Key_Setting implements Registerable, License_Setting

Handles the display and saving of the license key on the plugin settings page.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

version
1.2

Interfaces, Classes and Traits

Registerable
An object that can be registered with WordPress via the Plugin API, i.e. add_action() and add_filter().
License_Setting
Interface which represents a license key setting.

Table of Contents

ACTIVATE_KEY  = 'activate_key'
CHECK_KEY  = 'check_key'
DEACTIVATE_KEY  = 'deactivate_key'
OVERRIDE_HASH  = 'caf9da518b5d4b46c2ef1f9d7cba50ad'
$deferred_message  : mixed
$is_edd  : mixed
$is_woocommerce  : mixed
$license  : mixed
$saving_key  : mixed
__construct()  : mixed
get_license_key_setting()  : mixed
get_license_override_setting()  : mixed
get_license_setting_name()  : mixed
handle_edd_license_message()  : mixed
process_license_action()  : mixed
Process a license action from the plugin license settings page (i.e. activate, deactivate or check license)
register()  : void
Register this object with WordPress.
save_license_key()  : string
Save the specified license key.
save_posted_license_key()  : mixed
activate_license()  : mixed
add_settings_message()  : mixed
get_license_description()  : string
Retrieve the description for the license key input, to display on the settings page.
is_license_action()  : mixed
is_license_setting_readonly()  : mixed
license_action_button()  : mixed

Constants

Properties

Methods

__construct()

public __construct(License $license[, mixed $is_woocommerce = false ][, mixed $is_edd = false ]) : mixed
Parameters
$license : License
$is_woocommerce : mixed = false
$is_edd : mixed = false
Return values
mixed

get_license_key_setting()

public get_license_key_setting() : mixed
Return values
mixed

get_license_override_setting()

public get_license_override_setting() : mixed
Return values
mixed

get_license_setting_name()

public get_license_setting_name() : mixed
Return values
mixed

handle_edd_license_message()

public handle_edd_license_message(mixed $options) : mixed
Parameters
$options : mixed
Return values
mixed

process_license_action()

Process a license action from the plugin license settings page (i.e. activate, deactivate or check license)

public process_license_action() : mixed
Return values
mixed

register()

Register this object with WordPress.

public register() : void
Return values
void

save_license_key()

Save the specified license key.

public save_license_key(string $license_key) : string

If there is a valid key currently active, the current key will be deactivated first before activating the new one.

Parameters
$license_key : string

The license key to save.

Return values
string

The license key.

save_posted_license_key()

public save_posted_license_key() : mixed
Return values
mixed

activate_license()

private activate_license(mixed $license_key) : mixed
Parameters
$license_key : mixed
Return values
mixed

add_settings_message()

private add_settings_message(mixed $sucess_message, mixed $error_message[, mixed $success = true ]) : mixed
Parameters
$sucess_message : mixed
$error_message : mixed
$success : mixed = true
Return values
mixed

get_license_description()

Retrieve the description for the license key input, to display on the settings page.

private get_license_description() : string
Return values
string

The license key status message

is_license_action()

private is_license_action(mixed $action) : mixed
Parameters
$action : mixed
Return values
mixed

is_license_setting_readonly()

private is_license_setting_readonly() : mixed
Return values
mixed

license_action_button()

private license_action_button(mixed $input_name, mixed $button_text) : mixed
Parameters
$input_name : mixed
$button_text : mixed
Return values
mixed

Search results