PHP Class TitanFrameworkOptionEddLicense

Inheritance: extends TitanFrameworkOption
Datei anzeigen Open project: gambitph/titan-framework

Public Properties

Property Type Description
$defaultSecondarySettings

Public Methods

Method Description
__construct ( array $settings, string $owner ) Constructor
activateLicense ( $option ) : void Activated the given EDD license.
check ( string $license = '', string $action = 'check_license' ) : string Check license status.
checkUpdates ( ) : boolean Check for plugin updates.
disable_wporg_request ( $r, $url ) Disable requests to wp.org repository for this theme.
display ( ) Display for options and meta
item_is ( string $file ) : string Check if $file is a theme or a plugin.
registerCustomizerControl ( $wp_customize, $section, $priority = 1 ) * Display for theme customizer

Method Details

__construct() public method

Constructor
Since: 1.7.1
public __construct ( array $settings, string $owner )
$settings array Option settings
$owner string

activateLicense() public method

Activated the given EDD license.
Since: 1.7.1
public activateLicense ( $option ) : void
return void

check() public method

The function makes an API call to the remote server and requests the license status. This function check (only) the license status or activate it depending on the $action parameter. The license status is then stored as a transient, and if an activation was made, an activation transient is also set in order to avoid activating when checking only is required.
public check ( string $license = '', string $action = 'check_license' ) : string
$license string License key
$action string Action to take (check_license or activate_license)
return string Current license status

checkUpdates() public method

This method is called throughout the entire WordPress admin and uses the EDD plugin updater class to check for new updates.
Since: 1.7.2
public checkUpdates ( ) : boolean
return boolean True if an update check was done, false otherwise

disable_wporg_request() public method

Disable requests to wp.org repository for this theme.
Since: 1.7.2
public disable_wporg_request ( $r, $url )

display() public method

Display for options and meta
public display ( )

item_is() public method

Check if $file is a theme or a plugin.
Since: 1.7.2
public item_is ( string $file ) : string
$file string Path to the file to check
return string What type of file this is (parent theme, child theme or plugin)

registerCustomizerControl() public method

* Display for theme customizer
public registerCustomizerControl ( $wp_customize, $section, $priority = 1 )

Property Details

$defaultSecondarySettings public_oe property

public $defaultSecondarySettings