| Server IP : 165.22.154.248 / Your IP : 216.73.217.0 [ Web Server : Apache/2.4.29 (Ubuntu) System : Linux droplet-integra 4.15.0-197-generic #208-Ubuntu SMP Tue Nov 1 17:23:37 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 7.2.24-0ubuntu0.18.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/web-integra/wp-content/plugins/elementor/includes/controls/ |
Upload File : |
<?php
namespace Elementor;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Elementor order control.
*
* A base control for creating an order control. Displays an 'Order By' select
* box.
*
* @since 1.0.0
* @deprecated 2.0.0
*/
class Control_Order extends Control_Base_Multiple {
/**
* Get order control type.
*
* Retrieve the control type, in this case `order`.
*
* @since 1.0.0
* @access public
*
* @return string Control type.
*/
public function get_type() {
return 'order';
}
/**
* Get order control default values.
*
* Retrieve the default value of the order control. Used to return the default
* values while initializing the order control.
*
* @since 1.0.0
* @access public
*
* @return array Control default value.
*/
public function get_default_value() {
return [
'order_by' => '',
'reverse_order' => '',
];
}
/**
* Get order control value.
*
* Retrieve the value of the order control from a specific Controls_Stack.
*
* @since 2.0.0
* @access public
*
* @param array $control Control
* @param array $settings Controls_Stack settings
*
* @return mixed Control values.
*/
public function get_value( $control, $settings ) {
_deprecated_file( __CLASS__, '2.0.0' );
return parent::get_value( $control, $settings );
}
/**
* Render order control output in the editor.
*
* Used to generate the control HTML in the editor using Underscore JS
* template. The variables for the class are available using `data` JS
* object.
*
* @since 1.0.0
* @access public
*/
public function content_template() {
$control_uid = $this->get_control_uid();
$reverse_order_control_uid = $this->get_control_uid( 'reverse_order' );
?>
<div class="elementor-control-field">
<label for="<?php echo $control_uid; ?>" class="elementor-control-title">{{{ data.label }}}</label>
<div class="elementor-control-input-wrapper">
<div class="elementor-control-oreder-wrapper">
<select id="<?php echo $control_uid; ?>" data-setting="order_by">
<# _.each( data.options, function( option_title, option_value ) { #>
<option value="{{ option_value }}">{{{ option_title }}}</option>
<# } ); #>
</select>
<input id="<?php echo $reverse_order_control_uid; ?>" type="checkbox" data-setting="reverse_order">
<label for="<?php echo $reverse_order_control_uid; ?>" class="elementor-control-order-label">
<i class="fa fa-sort-amount-desc" aria-hidden="true"></i>
</label>
</div>
</div>
</div>
<# if ( data.description ) { #>
<div class="elementor-control-field-description">{{{ data.description }}}</div>
<# } #>
<?php
}
}