PHP Class TitanFrameworkOptionAjaxButton

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

Méthodes publiques

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

Méthodes publiques

Méthode Description
__construct ( $settings, $owner ) : void Constructor, fixes the settings to allow for multiple ajax buttons in a single option
ajaxLastSuccess ( ) : void This is last called when an ajax button is clicked. This just exist with a successful state, since doing nothing reads as an error with wp.ajax
ajaxSecurityChecker ( ) : void This is first called when an ajax button is clicked. This checks whether the nonce is valid and if we should continue;
createAjaxScript ( ) : void Prints the Javascript needed by ajax buttons. The script is only echoed once
display ( ) : void Renders the option
registerCustomizerControl ( $wp_customize, $section, $priority = 1 ) * Display for theme customizer

Method Details

__construct() public méthode

Constructor, fixes the settings to allow for multiple ajax buttons in a single option
public __construct ( $settings, $owner ) : void
$settings Array Option settings
$owner Object The container of the option
Résultat void

ajaxLastSuccess() public méthode

This is last called when an ajax button is clicked. This just exist with a successful state, since doing nothing reads as an error with wp.ajax
public ajaxLastSuccess ( ) : void
Résultat void

ajaxSecurityChecker() public méthode

This is first called when an ajax button is clicked. This checks whether the nonce is valid and if we should continue;
public ajaxSecurityChecker ( ) : void
Résultat void

createAjaxScript() public static méthode

Prints the Javascript needed by ajax buttons. The script is only echoed once
public static createAjaxScript ( ) : void
Résultat void

display() public méthode

Renders the option
public display ( ) : void
Résultat void

registerCustomizerControl() public méthode

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

Property Details

$defaultSecondarySettings public_oe property

public $defaultSecondarySettings