Property | Type | Description | |
---|---|---|---|
$is_network_activated | Boolean indicating whether this plugin is network activated | ||
$prefix | Used to prefix ID's, option names, etc.. | ||
$product | The license |
Method | Description | |
---|---|---|
__construct ( Yoast_Product $product ) | Constructor | |
activate_license ( ) : boolean | Remotely activate License | |
catch_post_request ( ) | Check if the license form has been submitted | |
deactivate_license ( ) : boolean | Remotely deactivate License | |
display_admin_notices ( ) | Display license specific admin notices, namely: | |
get_license_expiry_date ( ) : string | Gets the license expiry date | |
get_license_key ( ) : string | Gets the license key from constant or option | |
get_license_status ( ) : string | Get the license status | |
license_is_valid ( ) : boolean | Checks whether the license status is active | |
output_script ( ) | Output the script containing the YoastLicenseManager JS Object | |
set_license_constant_name ( string $license_constant_name ) | Set the constant used to define the license | |
set_license_expiry_date ( $expiry_date ) | Stores the license expiry date | |
set_license_key ( string $license_key ) | Set the license key | |
set_license_status ( string $license_status ) | Set the license status | |
setup_hooks ( ) | Setup hooks | |
show_license_form ( boolean $embedded = true ) | Show a form where users can enter their license key | |
show_license_form_heading ( ) |
Method | Description | |
---|---|---|
call_license_api ( string $action ) : mixed | ||
get_api_availability ( ) : array | Get the API availability information | |
get_curl_version ( ) : mixed | Get the current curl version, or false | |
get_option ( string $name ) : mixed | Gets a license related option | |
get_options ( ) : array | Get all license related options | |
set_notice ( string $message, $success = true ) | Set a notice to display in the admin area | |
set_option ( string $name, mixed $value ) | Set a license related option | |
set_options ( array $options ) | Set license related options |
Method | Description | |
---|---|---|
check_api_host_availability ( ) : boolean | Check if the API host address is available from this server | |
maybe_set_license_key_from_constant ( ) | Maybe set license key from a defined constant |
public __construct ( Yoast_Product $product ) | ||
$product | Yoast_Product |
public activate_license ( ) : boolean | ||
return | boolean | True if the license is now activated, false if not |
protected call_license_api ( string $action ) : mixed | ||
$action | string | activate|deactivate |
return | mixed |
public catch_post_request ( ) |
public deactivate_license ( ) : boolean | ||
return | boolean | True if the license is now deactivated, false if not |
public display_admin_notices ( ) |
protected get_api_availability ( ) : array | ||
return | array |
protected get_curl_version ( ) : mixed | ||
return | mixed |
public get_license_expiry_date ( ) : string | ||
return | string |
public get_license_key ( ) : string | ||
return | string | $license_key |
public get_license_status ( ) : string | ||
return | string | $license_status; |
protected get_option ( string $name ) : mixed | ||
$name | string | The option name |
return | mixed | The option value |
protected get_options ( ) : array | ||
return | array | Array of license options |
public license_is_valid ( ) : boolean | ||
return | boolean | True if license is active |
public output_script ( ) |
public set_license_constant_name ( string $license_constant_name ) | ||
$license_constant_name | string | The license constant name |
public set_license_expiry_date ( $expiry_date ) |
public set_license_key ( string $license_key ) | ||
$license_key | string |
public set_license_status ( string $license_status ) | ||
$license_status | string |
protected set_notice ( string $message, $success = true ) | ||
$message | string | The message to display |
protected set_option ( string $name, mixed $value ) | ||
$name | string | The option name |
$value | mixed | The option value |
protected set_options ( array $options ) | ||
$options | array | Array of new license options |
public show_license_form ( boolean $embedded = true ) | ||
$embedded | boolean | Boolean indicating whether this form is embedded in another form? |
protected $is_network_activated |