updated plugin GP Premium version 1.11.2

This commit is contained in:
2020-08-13 14:53:39 +00:00
committed by Gitium
parent 3f0f8d3ac9
commit 885bbdd113
151 changed files with 11329 additions and 6954 deletions

View File

@ -15,9 +15,11 @@ if ( ! class_exists( 'GeneratePress_Action_Button_Control' ) ) {
public $type = 'gp_action_button';
public $data_type = '';
public $description = '';
public $nonce = '';
public function enqueue() {
wp_enqueue_script( 'gp-button-actions', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/button-actions.js', array( 'customize-controls' ), GP_PREMIUM_VERSION, true );
wp_enqueue_script( 'gp-button-actions', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/button-actions.js', array( 'customize-controls' ), GP_PREMIUM_VERSION, true );
wp_enqueue_style( 'gp-button-actions', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'css/button-actions.css', array(), GP_PREMIUM_VERSION );
}
public function to_json() {
@ -25,14 +27,17 @@ if ( ! class_exists( 'GeneratePress_Action_Button_Control' ) ) {
$this->json['data_type'] = $this->data_type;
$this->json['description'] = $this->description;
$this->json['nonce'] = $this->nonce;
}
public function content_template() {
?>
<button class="button" data-type="{{{ data.data_type }}}">{{{ data.label }}}</button>
<span class="description customize-control-description">
<p>{{{ data.description }}}</p>
</span>
<button class="button" data-type="{{{ data.data_type }}}" data-nonce="{{{ data.nonce }}}">{{{ data.label }}}</button>
<# if ( data.description ) { #>
<span class="description customize-control-description">
<p>{{{ data.description }}}</p>
</span>
<# } #>
<?php
}
}