| Server IP : 185.143.234.238 / Your IP : 185.215.232.195 Web Server : nginx/1.22.1 System : Linux server2065 6.1.0-35-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.137-1 (2025-05-07) x86_64 User : www-data ( 33) PHP Version : 8.2.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/bcandle/wp-content/plugins/elementor-pro/modules/query-control/controls/ |
Upload File : |
<?php
namespace ElementorPro\Modules\QueryControl\Controls;
use Elementor\Control_Select2;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Template_Query extends Control_Select2 {
const CONTROL_ID = 'template_query';
/**
* @return string
*/
public function get_type() {
return static::CONTROL_ID;
}
public function content_template() {
parent::content_template();
?>
<div class="elementor-template-query-control-actions">
<# if ( data.actions.new.visible ) { #>
<button
type="button"
class="elementor-button"
data-action="new"
data-after-action="{{ data.actions.new.after_action }}"
>
{{ data.actions.new.label }}
</button>
<# } #>
<# if ( data.actions.edit.visible ) { #>
<button
type="button"
class="elementor-button"
data-action="edit"
data-after-action="{{ data.actions.edit.after_action }}"
>
{{ data.actions.edit.label }}
</button>
<# } #>
</div>
<?php
}
/**
* @return array
*/
protected function get_default_settings() {
return array_replace_recursive(
parent::get_default_settings(),
[
'query' => '',
'actions' => [
'new' => [
'visible' => false,
'label' => __( 'Create template', 'elementor-pro' ),
'document_config' => [
'type' => null,
],
'after_action' => 'switch_document',
],
'edit' => [
'visible' => false,
'label' => __( 'Edit template', 'elementor-pro' ),
'after_action' => 'switch_document',
],
],
]
);
}
}