%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 54.36.91.62 / Your IP : 216.73.217.162 Web Server : Apache System : Linux webm002.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : wellingtpa ( 97533) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wellingtpa/www/wp-content/plugins/kata-plus-pro/includes/elementor/ |
Upload File : |
<?php
/**
* Elementor Class.
*
* @author ClimaxThemes
* @package Kata Plus Pro
* @since 1.0.0
*/
// Don't load directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
use Elementor\Plugin;
use Elementor\Controls_Manager;
use Elementor\Core\DynamicTags\Dynamic_CSS;
use Elementor\Utils as ElementorUtils;
use Elementor\Settings;
use Elementor\Controls_Stack;
use Elementor\Group_Control_Css_Filter;
if ( ! class_exists( 'Kata_Plus_Pro_Elementor' ) ) {
class Kata_Plus_Pro_Elementor {
/**
* The directory of the file.
*
* @access public
* @var string
*/
public static $dir;
/**
* The url of the file.
*
* @access public
* @var string
*/
public static $url;
/**
* Instance of this class.
*
* @since 1.0.0
* @access public
* @var Kata_Plus_Pro_Elementor
*/
public static $instance;
/**
* Provides access to a single instance of a module using the singleton pattern.
*
* @since 1.0.0
* @return object
*/
public static function get_instance() {
if ( self::$instance === null ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Constructor.
*
* @since 1.0.0
*/
public function __construct() {
if ( ! class_exists( 'Elementor\Plugin' ) && ! class_exists( 'Kata_Plus' ) ) {
return;
}
$this->definitions();
$this->actions();
$this->dependencies();
}
/**
* Global definitions.
*
* @since 1.0.0
*/
public function definitions() {
self::$dir = Kata_Plus_Pro::$dir . 'includes/elementor/';
self::$url = Kata_Plus_Pro::$url . 'includes/elementor/';
}
/**
* Add actions.
*
* @since 1.0.0
*/
public function actions() {
add_action( 'elementor/init', [$this, 'elementorinit'], 0 );
add_filter( 'kata_plus_pro_widgets', [$this, 'render_kata_widgets_script'] );
remove_filter( 'kata_plus_common_controls', [Kata_Plus_Elementor::get_instance(), 'common_controls'], 10, 1 );
add_action( 'elementor/element/post/document_settings/before_section_start', [$this, 'kata_page_options'], 10, 2 );
add_action( 'kata_plus_full_page_slider', [$this, 'kata_full_page_slider'], 10, 2 );
add_action( 'elementor/controls/controls_registered', [$this, 'controls'] );
add_filter( 'kata_plus_common_controls', [$this, 'common_controls'], 10, 1 );
remove_action( 'styler_breakpoints', [Kata_Styler::instance(), 'breakpoints'] );
add_action('styler_breakpoints', [$this, 'breakpoints']);
remove_action( 'styler_end_actions', [Kata_Styler::instance(), 'styler_actions'] );
add_action('styler_end_actions', [$this, 'styler_actions']);
add_action('before_start_shadow_section', [$this, 'styler_multiple_box_shadow']);
remove_action( 'before_start_svg_panel', [Kata_Styler::instance(), 'styler_filters_and_transform_panels'] );
add_action('before_start_svg_panel', [$this, 'styler_filters_and_transform_panels']);
add_action('before_start_svg_section', [$this, 'styler_filters_and_transform_options']);
add_action('styler_before_platforms', [$this, 'styler_more']);
if( ! defined( 'ELEMENTOR_PRO_PATH' ) ) {
add_action( 'elementor/preview/enqueue_scripts', [$this, 'full_site_editor_enqueue_script'] );
}
}
/**
* Load dependencies.
*
* @since 1.0.0
*/
public function dependencies() {
// Modules
foreach ( glob( self::$dir . 'modules/*' ) as $folder ) {
Kata_Plus_Pro_Autoloader::load( $folder, 'widget' );
}
// Builders
foreach ( glob( self::$dir . 'builders/*' ) as $file ) {
Kata_Plus_Pro_Autoloader::load( dirname( $file ), basename( $file, '.php' ) );
}
}
/**
* Add kata category.
*
* @since 1.0.0
*/
public function elementorinit() {
// Load Template Manager
Kata_Plus_Autoloader::load( self::$dir . 'template-manager', 'template-manager' );
// Kata Post Type Support
add_post_type_support( 'kata_mega_menu', 'elementor' );
}
/**
* Render Kata Plus Pro Widgets
*
* @since 1.0.0
*/
public function render_kata_widgets_script( $handel ) {
return 'var KataPlusPro = true; var KataProWidgets = ' . json_encode( [] ) . ';';
}
/**
* Controls.
*
* @since 1.0.0
*/
public function breakpoints() {
$breakpoints = did_action('elementor/loaded') ? Kata_Plus_Elementor::get_breakpoints() : ''; ?>
<li data-name="desktop" class="active">
<i class="eicon-device-desktop active"></i>
<strong><?php echo __('Desktop', 'kata-plus'); ?></strong>
<span><?php echo __('Default Preview', 'kata-plus'); ?></span>
</li>
<li data-name="laptop">
<i class="eicon-device-laptop"></i>
<strong><?php echo __('Laptop', 'kata-plus'); ?></strong>
<span><?php echo $breakpoints['laptop'] ?>px</span>
</li>
<li data-name="tabletlandscape">
<i class="eicon-device-tablet rotate-90"></i>
<strong><?php echo __('Tablet Landscape', 'kata-plus'); ?></strong>
<span><?php echo $breakpoints['tabletlandscape'] ?>px</span>
</li>
<li data-name="tablet">
<i class="eicon-device-tablet"></i>
<strong><?php echo __('Tablet', 'kata-plus'); ?></strong>
<span><?php echo $breakpoints['tablet'] - 1 ?>px</span>
</li>
<li data-name="mobile">
<i class="eicon-device-mobile"></i>
<strong><?php echo __('Mobile', 'kata-plus'); ?></strong>
<span><?php echo $breakpoints['mobile'] - 1 ?>px</span>
</li>
<li data-name="smallmobile">
<i class="eicon-device-mobile small-icon"></i>
<strong><?php echo __('Small Mobile', 'kata-plus'); ?></strong>
<span><?php echo $breakpoints['smallmobile'] ?>px</span>
</li>
<?php
}
/**
* Controls.
*
* @since 1.0.0
*/
public function controls() {
foreach ( glob( self::$dir . 'controls/*' ) as $file ) {
Kata_Plus_Autoloader::load( $file, 'control' );
}
}
/**
* is Edit mode.
*
* @since 1.0.0
*/
public static function is_edit_mode() {
return Plugin::$instance->editor->is_edit_mode();
}
/**
* Common controls.
*
* @since 1.0.0
*/
public function common_controls( $self ) {
/**
* Custom CSS section
*/
$self->start_controls_section(
'custom_css_section',
[
'label' => esc_html__( 'Custom CSS', 'kata-plus' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$self->add_control(
'custom_css',
[
'type' => 'kata_plus_custom_code',
]
);
$self->end_controls_section();
/**
* Parallax Motion section
*/
$self->start_controls_section(
'section_box_parallax',
[
'label' => esc_html__( 'Parallax Motion', 'kata-plus' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$self->add_control(
'parallax',
[
'label' => esc_html__( 'Parallax', 'kata-plus' ),
'type' => Controls_Manager::SELECT,
'default' => '',
'options' => [
'' => esc_html__( 'Select', 'kata-plus' ),
'vertical' => esc_html__( 'Vertical', 'kata-plus' ),
'vertical_mouse' => esc_html__( 'Vertical + Mouse parallax', 'kata-plus' ),
'horizontal' => esc_html__( 'Horizontal', 'kata-plus' ),
'horizontal_mouse' => esc_html__( 'Horizontal + Mouse parallax', 'kata-plus' ),
'mouse' => esc_html__( 'Mouse parallax', 'kata-plus' ),
],
]
);
$self->add_control(
'parallax_speed',
[
'label' => __( 'Parallax speed', 'kata-plus' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'' => [
'min' => 0,
'max' => 100,
'step' => 1,
],
],
'default' => [
'unit' => '',
'size' => 0,
],
'condition' => [
'parallax' => ['vertical', 'vertical_mouse', 'horizontal', 'horizontal_mouse'],
],
]
);
$self->add_control(
'parallax_mouse_speed',
[
'label' => __( 'Parallax mouse speed', 'kata-plus' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'' => [
'min' => -30,
'max' => 30,
'step' => 1,
],
],
'default' => [
'unit' => '',
'size' => 0,
],
'condition' => [
'parallax' => ['vertical_mouse', 'horizontal_mouse', 'mouse'],
],
]
);
$self->end_controls_section();
/**
* Presets
*/
$self->start_controls_section(
'section_kata_plus_presets',
[
'label' => __( 'Presets', 'kata-plus' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$self->add_control(
'kata_plus_presets_sync',
[
'type' => 'raw_html',
'content_classes' => 'kata-plus-presets-sync',
'raw' => '<div class="kata-plus-presets-sync"><span data-nonce="' . wp_create_nonce( 'kata_plus_sync_library_nonce' ) . '" data-element="' . $self->get_name() . '"><i class="eicon-sync" title=" ' . __( 'Sync library', 'kata-plus' ) . '"></i>' . __( 'Sync library', 'kata-plus' ) . '</span></div>',
]
);
$self->add_control(
'kata_plus_presets',
[
'type' => 'kata_plus_presets',
'element' => $self->get_name(),
]
);
$self->end_controls_section();
}
/**
* Full page slider.
*
* @since 1.0.0
*/
public function kata_page_options( $page ) {
$page->remove_control( 'full_page_slider_pro' );
}
/**
* Full page slider Options.
*
* @since 1.0.0
*/
public function kata_full_page_slider( $page ) {
$page->add_control(
'full_page_slider',
[
'label' => __( 'Full Page Slider', 'kata-plus' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => __( 'On', 'kata-plus' ),
'label_off' => __( 'Off', 'kata-plus' ),
'return_value' => '1',
'default' => '0',
]
);
$page->add_control(
'full_page_slider_navigation',
[
'label' => __( 'Navigation', 'kata-plus' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => __( 'Show', 'kata-plus' ),
'label_off' => __( 'Hide', 'kata-plus' ),
'return_value' => '1',
'default' => '1',
'condition' => [
'full_page_slider' => '1',
],
]
);
$page->add_control(
'full_page_slider_navigation_position',
[
'label' => __( 'Position', 'kata-plus' ),
'type' => Controls_Manager::SELECT,
'default' => 'right',
'options' => [
'right' => __( 'Right', 'kata-plus' ),
'left' => __( 'Left', 'kata-plus' ),
],
'condition' => [
'full_page_slider_navigation' => '1',
],
]
);
$page->add_control(
'full_page_slider_loop_bottom',
[
'label' => __( 'Loop Bottom', 'kata-plus' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => __( 'Show', 'kata-plus' ),
'label_off' => __( 'Hide', 'kata-plus' ),
'default' => '1',
'return_value' => '1',
'condition' => [
'full_page_slider' => '1',
],
]
);
$page->add_control(
'full_page_slider_loop_top',
[
'label' => __( 'Loop Top', 'kata-plus' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => __( 'Show', 'kata-plus' ),
'label_off' => __( 'Hide', 'kata-plus' ),
'return_value' => '1',
'default' => '1',
'condition' => [
'full_page_slider' => '1',
],
]
);
$page->add_control(
'full_page_slider_scrolling_speed',
[
'label' => __( 'Scroll Speed', 'kata-plus' ),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 100,
'max' => 2000,
'step' => 1,
],
],
'default' => [
'size' => 850,
'unit' => 'px',
],
'condition' => [
'full_page_slider' => '1',
],
]
);
}
/**
* filters and transform panels.
*
* @since 1.0.0
*/
public function styler_filters_and_transform_panels() {
?>
<li class="styler-tooltip" data-name="filters" data-tooltip="Filters">
<i class="eicon-review"></i>
<a href="#"><?php echo __('Filters', 'kata-plus'); ?></a>
</li>
<li class="styler-tooltip" data-name="transform" data-tooltip="Transform">
<i class="eicon-integration"></i>
<a href="#"><?php echo __('Transform', 'kata-plus'); ?></a>
</li>
<?php
}
/**
* Multiple Box Shadow.
*
* @since 1.0.0
*/
public function styler_filters_and_transform_options() {
?>
<!-- filters Options -->
<div class="styler-tab styler-tab-filters" data-name="filters">
<!-- filters Options -->
<h3><?php echo __('Effects', 'kata-plus'); ?></h3>
<div class="form-group">
<!-- Blur -->
<label>
<span><?php echo __('Blur', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="filter[blur]" data-unit="px">
</label>
<!-- Grayscale -->
<label>
<span><?php echo __('Grayscale', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" min="0" max="100">
</div>
<input type="text" name="filter[grayscale]" data-unit="%">
</label>
<!-- Brightness -->
<label>
<span><?php echo __('Brightness', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" step="0.1">
</div>
<input type="text" name="filter[brightness]" data-unit="%">
</label>
<!-- Contrast -->
<label>
<span><?php echo __('Contrast', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="filter[contrast]" data-unit="%">
</label>
<!-- Hue Rotate -->
<label>
<span><?php echo __('Hue Rotate', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="filter[hue-rotate]" data-unit="deg">
</label>
<!-- Invert -->
<label>
<span><?php echo __('Invert', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="filter[invert]" data-unit="%">
</label>
<!-- Saturate -->
<label>
<span><?php echo __('Saturate', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="filter[saturate]" data-unit="%">
</label>
<!-- Sepia -->
<label>
<span><?php echo __('Sepia', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="filter[sepia]" data-unit="%">
</label>
</div>
<h3><?php echo __('BackDrop Effects', 'kata-plus'); ?></h3>
<div class="form-group">
<!-- Blur -->
<label>
<span><?php echo __('Blur', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="backdrop-filter[blur]" data-unit="px">
</label>
<!-- Grayscale -->
<label>
<span><?php echo __('Grayscale', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" min="0" max="100">
</div>
<input type="text" name="backdrop-filter[grayscale]" data-unit="%">
</label>
<!-- Brightness -->
<label>
<span><?php echo __('Brightness', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" step="0.1">
</div>
<input type="text" name="backdrop-filter[brightness]" data-unit="%">
</label>
<!-- Contrast -->
<label>
<span><?php echo __('Contrast', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="backdrop-filter[contrast]" data-unit="%">
</label>
<!-- Hue Rotate -->
<label>
<span><?php echo __('Hue Rotate', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="backdrop-filter[hue-rotate]" data-unit="deg">
</label>
<!-- Invert -->
<label>
<span><?php echo __('Invert', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="backdrop-filter[invert]" data-unit="%">
</label>
<!-- Saturate -->
<label>
<span><?php echo __('Saturate', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="backdrop-filter[saturate]" data-unit="%">
</label>
<!-- Sepia -->
<label>
<span><?php echo __('Sepia', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range">
</div>
<input type="text" name="backdrop-filter[sepia]" data-unit="%">
</label>
</div>
</div> <!-- .styler-tab-filters -->
<!-- transform Options -->
<div class="styler-tab styler-tab-transform" data-name="transform">
<!-- transform Options -->
<h3><?php echo __('Transform', 'kata-plus'); ?></h3>
<div class="form-group">
<!-- Rotate -->
<label>
<span><?php echo __('Rotate', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" min="0" max="360">
</div>
<input type="text" name="f_transform[rotate]" data-unit="deg">
</label>
<!-- Scale -->
<label>
<span><?php echo __('Scale', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" min="0" max="3" step="0.1">
</div>
<input type="text" name="f_transform[scale]" data-unit="">
</label>
<!-- Scale -->
<label>
<span><?php echo __('Translate X', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" min="0" max="50" step="1">
</div>
<input type="text" name="f_transform[translate-x]" data-unit="px">
</label>
<!-- Scale -->
<label>
<span><?php echo __('Translate Y', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" min="0" max="50" step="1">
</div>
<input type="text" name="f_transform[translate-y]" data-unit="px">
</label>
<!-- Scale -->
<label>
<span><?php echo __('Translate Z', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" min="-500" max="500" step="1">
</div>
<input type="text" name="f_transform[translateZ]" data-unit="px">
</label>
<!-- Scale -->
<label>
<span><?php echo __('Skew X', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" min="0" max="50" step="1">
</div>
<input type="text" name="f_transform[skew-x]" data-unit="deg">
</label>
<!-- Scale -->
<label>
<span><?php echo __('Skew Y', 'kata-plus'); ?></span>
<div class="range-wrap">
<input type="range" min="0" max="50" step="1">
</div>
<input type="text" name="f_transform[skew-y]" data-unit="deg">
</label>
</div>
</div> <!-- .styler-tab-transform -->
<?php
}
/**
* Multiple Box Shadow.
*
* @since 1.0.0
*/
public function styler_multiple_box_shadow() {
?>
<div class="multi-box-shadow-actions-wrap bxh-mini-wrp">
<div class="add-box-shadow styler-tooltip" data-tooltip="Add New">+</div>
</div>
<?php
}
/**
* actions options.
*
* @since 1.0.0
*/
public function styler_actions() {
?>
<span data-name="phover" class="p-hover"><?php echo __('Parent Hover', 'kata-plus'); ?></span>
<span data-name="before"><?php echo __('Before', 'kata-plus'); ?></span>
<span data-name="after"><?php echo __('After', 'kata-plus'); ?></span>
<?php
}
/**
* More options.
*
* @since 1.0.0
*/
public function styler_more() {
?>
<div class="styler-tooltip more-menu-btn" data-tooltip="<?php echo __( 'More', 'kata-plus' ); ?>"><i class="eicon-ellipsis-v"></i></div>
<ul class="actions-menu">
<li class="kata-copy" data-action="copy"><?php echo __('Copy', 'kata-plus'); ?></li>
<li class="kata-paste" data-action="paste"><?php echo __('Paste', 'kata-plus'); ?></li>
<li class="kata-reset" data-action="reset"><?php echo __('Reset', 'kata-plus'); ?></li>
</ul>
<?php
}
/**
* Start parallax.
*
* @since 1.0.0
*/
public static function start_parallax( $parallax, $parallax_speed, $parallax_mouse_speed ) {
if ( $parallax ) {
$parallax_speed = isset( $parallax_speed['size'] ) ? $parallax_speed['size'] : '';
$parallax_mouse_speed = $parallax_mouse_speed['size'];
if ( $parallax == 'vertical_mouse' || $parallax == 'horizontal_mouse' || $parallax == 'mouse' ) {
echo '<div class="kata-mouse-parallax" data-speed-x="' . esc_attr( -1 * $parallax_mouse_speed ) . '" data-speed-y="' . esc_attr( -1 * $parallax_mouse_speed ) . '">';
}
if ( $parallax == 'vertical' || $parallax == 'vertical_mouse' || $parallax == 'horizontal' || $parallax == 'horizontal_mouse' ) {
$direction = $parallax == 'vertical' || $parallax == 'vertical_mouse' ? 'vertical' : 'horizontal';
echo '<div class="kata_parallax" data-enllax-ratio="' . esc_attr( $parallax_speed / 100 ) . '" data-enllax-direction="' . esc_attr( $direction ) . '" data-enllax-type="foreground">';
}
}
}
/**
* End parallax.
*
* @since 1.0.0
*/
public static function end_parallax( $parallax ) {
if ( $parallax ) {
if ( $parallax == 'vertical' || $parallax == 'vertical_mouse' || $parallax == 'horizontal' || $parallax == 'horizontal_mouse' ) {
echo '</div>';
}
if ( $parallax == 'vertical_mouse' || $parallax == 'horizontal_mouse' || $parallax == 'mouse' ) {
echo '</div>';
}
}
}
/**
* Full Site Editor Enqueue scripts.
*
* @since 1.0.0
*/
public function full_site_editor_enqueue_script() {
wp_enqueue_script( 'kata-plus-full-site-editor', Kata_Plus::$assets . 'js/backend/full-site-editor.js', ['jquery'], Kata_Plus::$version, true );
}
} // class
Kata_Plus_Pro_Elementor::get_instance();
}