PHP Class TitanFrameworkOptionAjaxButton

Inheritance: extends TitanFrameworkOption
Exibir arquivo Open project: gambitph/titan-framework Class Usage Examples

Public Properties

Property Type Description
$defaultSecondarySettings

Public Methods

Method 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 method

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
return void

ajaxLastSuccess() public method

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
return void

ajaxSecurityChecker() public method

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
return void

createAjaxScript() public static method

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

display() public method

Renders the option
public display ( ) : void
return void

registerCustomizerControl() public method

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

Property Details

$defaultSecondarySettings public_oe property

public $defaultSecondarySettings