| Server IP : 69.72.244.102 / Your IP : 216.73.216.164 Web Server : LiteSpeed System : Linux s3434.fra1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64 User : konzalta ( 1271) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/cwd/wp-content/plugins/master-addons/inc/modules/glassmorphism/ |
Upload File : |
<?php
namespace MasterAddons\Modules;
use \Elementor\Controls_Manager;
/**
* Author Name: Liton Arefin
* Author URL: https://jeweltheme.com
* Date: 6/5/2021
*/
if (!defined('ABSPATH')) {
exit;
} // Exit if accessed directly.
class JLTMA_Extension_Glassmorphism
{
/*
* Instance of this class
*/
private static $instance = null;
public function __construct()
{
// Add new controls to advanced tab globally
add_action("elementor/element/section/section_background/before_section_end", array($this, 'jltma_section_add_glassmorphism_controls'), 19, 3);
add_action("elementor/element/column/section_style/before_section_end", array($this, 'jltma_section_add_glassmorphism_controls'), 19, 3);
add_action("elementor/element/common/_section_background/before_section_end", array($this, 'jltma_section_add_glassmorphism_controls'), 19, 3);
}
// Add Section Controls
public function jltma_section_add_glassmorphism_controls($section)
{
// Adds Glasshmorphism options
// ---------------------------------------------------------------------
$section->add_control(
'jltma_section_style_container_glassmorphism',
array(
'label' => __(' MA Glassmorphism', 'master-addons' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before'
)
);
$section->add_control(
'jltma_glassmorphism_notice',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => __('Not Supported Browers: Mozilla Firefox ', 'master-addons' ),
'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
]
);
$section->add_control(
'jltma_enable_glassmorphism_effect',
[
'label' => __('Enable Glassmorphism', 'master-addons' ),
'type' => Controls_Manager::SWITCHER,
'default' => 'no',
'return_value' => 'yes',
'render_type' => 'template',
'label_on' => __('Enable', 'master-addons' ),
'label_off' => __('Disable', 'master-addons' ),
'prefix_class' => 'jltma-glass-effect-',
]
);
$section->add_control(
'jltma_glass_effect_blur_value',
[
'label' => __('Blur Value', 'master-addons' ),
'type' => Controls_Manager::NUMBER,
'min' => 0,
'max' => 100,
'step' => 1,
'default' => 20,
'selectors' => [
'{{WRAPPER}}.jltma-glass-effect-yes.elementor-section' => 'backdrop-filter: blur({{SIZE}}px); -webkit-backdrop-filter: blur({{SIZE}}px);',
'{{WRAPPER}}.jltma-glass-effect-yes > .elementor-widget-wrap' => 'backdrop-filter: blur({{SIZE}}px); -webkit-backdrop-filter: blur({{SIZE}}px);',
'{{WRAPPER}}.jltma-glass-effect-yes > .elementor-widget' => 'backdrop-filter: blur({{SIZE}}px); -webkit-backdrop-filter: blur({{SIZE}}px);',
],
'condition' => [
'jltma_enable_glassmorphism_effect' => 'yes'
],
]
);
}
public static function get_instance()
{
if (!self::$instance) {
self::$instance = new self;
}
return self::$instance;
}
}
JLTMA_Extension_Glassmorphism::get_instance();