PHP Class TitanFrameworkOptionEddLicense

Inheritance: extends TitanFrameworkOption
Afficher le fichier Open project: gambitph/titan-framework

Méthodes publiques

Свойство Type Description
$defaultSecondarySettings

Méthodes publiques

Méthode 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 méthode

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

activateLicense() public méthode

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

check() public méthode

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)
Résultat string Current license status

checkUpdates() public méthode

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
Résultat boolean True if an update check was done, false otherwise

disable_wporg_request() public méthode

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

display() public méthode

Display for options and meta
public display ( )

item_is() public méthode

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
Résultat string What type of file this is (parent theme, child theme or plugin)

registerCustomizerControl() public méthode

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

Property Details

$defaultSecondarySettings public_oe property

public $defaultSecondarySettings