Plugin Directory

Changeset 3202104


Ignore:
Timestamp:
12/04/2024 07:05:45 AM (16 months ago)
Author:
sayedulsayem
Message:

release v2.1.0

Location:
custom-css-for-elementor
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • custom-css-for-elementor/tags/2.1.0/assets/js/editor-css-script.js

    r2979212 r3202104  
    1 jQuery(window).on('elementor/frontend/init', function () {
    2   function addCustomCss(css, context) {
    3     if (!context) {
    4       return;
    5     }
    6     var customCss = '';
     1jQuery( window ).on( 'elementor/frontend/init', function () {
     2    function addCustomCss ( css, context ) {
     3        if ( !context ) {
     4            return;
     5        }
     6        var customCss = '';
    77
    8     var model = context.model,
    9       customCssDesktop = model.get('settings').get('_custom_css_f_ele_css_desktop'),
    10       customCssTablet = model.get('settings').get('_custom_css_f_ele_css_tablet'),
    11       customCssMobile = model.get('settings').get('_custom_css_f_ele_css_mobile');
     8        var model = context.model,
     9            customCssDesktop = model.get( 'settings' ).get( '_custom_css_f_ele_css_desktop' ),
     10            customCssTablet = model.get( 'settings' ).get( '_custom_css_f_ele_css_tablet' ),
     11            customCssMobile = model.get( 'settings' ).get( '_custom_css_f_ele_css_mobile' );
    1212
    13     customCss += customCssDesktop ? customCssDesktop : '';
    14     customCss += customCssTablet ? ' @media (max-width: 768px) { ' + customCssTablet + '}' : '';
    15     customCss += customCssMobile ? ' @media (max-width: 425px) { ' + customCssMobile + '}' : '';
     13        customCss += customCssDesktop ? customCssDesktop : '';
     14        customCss += customCssTablet ? ' @media (max-width: ' + modelData.breakpoints.tablet + 'px) { ' + customCssTablet + '}' : '';
     15        customCss += customCssMobile ? ' @media (max-width: ' + modelData.breakpoints.mobile + 'px) { ' + customCssMobile + '}' : '';
    1616
    17     if (!customCss) {
    18       return;
    19     }
     17        if ( !customCss ) {
     18            return;
     19        }
    2020
    21     var selector = '.elementor-' + modelData.postID + ' .elementor-element.elementor-element-' + model.get('id');
     21        var selector = '.elementor-' + modelData.postID + ' .elementor-element.elementor-element-' + model.get( 'id' );
    2222
    23     if ('document' === model.get('elType')) {
    24       selector = elementor.config.document.settings.cssWrapperSelector;
    25     }
     23        if ( 'document' === model.get( 'elType' ) ) {
     24            selector = elementor.config.document.settings.cssWrapperSelector;
     25        }
    2626
    27     if (customCss) {
    28       css += customCss.replaceAll('selector', selector);
    29     }
     27        if ( customCss ) {
     28            css += customCss.replaceAll( 'selector', selector );
     29        }
    3030
    31     return DOMPurify.sanitize(css, { CSS: true });
    32   }
     31        return DOMPurify.sanitize( css, { CSS: true } );
     32    }
    3333
    34   if ((typeof elementor) !== 'undefined') {
    35     elementor.hooks.addFilter('editor/style/styleText', addCustomCss);
    36   }
    37 });
     34    if ( ( typeof elementor ) !== 'undefined' ) {
     35        elementor.hooks.addFilter( 'editor/style/styleText', addCustomCss );
     36    }
     37} );
  • custom-css-for-elementor/tags/2.1.0/custom-css-for-elementor.php

    r2979212 r3202104  
    33 * Plugin Name: Custom CSS for Elementor
    44 * Plugin URI: https://wordpress.org/plugins/custom-css-for-elementor/
    5  * Description: A lightweight plugin that open an option to add custom CSS code for each device (desktop, tablets, mobiles) by elementor widgets.
    6  * Version: 2.0.0
    7  * Author: sayedulsayem
     5 * Description: A lightweight plugin that open an option to add custom CSS code for each device (desktop, tablets, mobiles) by elementor widgets.
     6 * Version: 2.1.0
     7 * Requires at least: 5.0
     8 * Requires PHP: 7.4
     9 * Author: Sayedul Sayem
    810 * Author URI: https://sayedulsayem.com/
    911 * Text Domain: custom-css-for-elementor
     
    1113 * License: GPL v3 or later
    1214 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
    13  * Elementor tested up to: 3.16
    14  * Elementor Pro tested up to: 3.16
     15 * Elementor tested up to: 3.25
     16 * Elementor Pro tested up to: 3.25
    1517 */
    1618
    17 
    1819// If this file is called directly, abort.
    19 defined('ABSPATH') || exit;
     20defined( 'ABSPATH' ) || exit;
    2021
    2122// include the autoloader file
     
    2829 * load plugin after initialize wordpress core
    2930 */
    30 add_action('plugins_loaded', function () {
    31     Custom_Css_FEle\Plugin::instance()->init();
    32 });
     31add_action( 'plugins_loaded', function () {
     32    Custom_Css_FEle\Plugin::instance()->init();
     33} );
  • custom-css-for-elementor/tags/2.1.0/i18n/custom-css-for-elementor.pot

    r2979212 r3202104  
    1 # Copyright (C) 2023 sayedulsayem
     1# Copyright (C) 2024 Sayedul Sayem
    22# This file is distributed under the GPL v3 or later.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Custom CSS for Elementor 2.0.0\n"
     5"Project-Id-Version: Custom CSS for Elementor 2.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/custom-css-for-elementor\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-10-15T14:06:07+00:00\n"
     12"POT-Creation-Date: 2024-12-04T06:43:33+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.8.1\n"
     14"X-Generator: WP-CLI 2.11.0\n"
    1515"X-Domain: custom-css-for-elementor\n"
    1616
    1717#. Plugin Name of the plugin
    18 #: inc/hook-action.php:58
     18#: custom-css-for-elementor.php
     19#: inc/hook-action.php:65
    1920#: plugin.php:97
    2021#: plugin.php:115
     
    2425
    2526#. Plugin URI of the plugin
     27#: custom-css-for-elementor.php
    2628msgid "https://wordpress.org/plugins/custom-css-for-elementor/"
    2729msgstr ""
    2830
    2931#. Description of the plugin
     32#: custom-css-for-elementor.php
    3033msgid "A lightweight plugin that open an option to add custom CSS code for each device (desktop, tablets, mobiles) by elementor widgets."
    3134msgstr ""
    3235
    3336#. Author of the plugin
    34 msgid "sayedulsayem"
     37#: custom-css-for-elementor.php
     38msgid "Sayedul Sayem"
    3539msgstr ""
    3640
    3741#. Author URI of the plugin
     42#: custom-css-for-elementor.php
    3843msgid "https://sayedulsayem.com/"
    3944msgstr ""
    4045
    41 #: inc/hook-action.php:70
     46#: inc/hook-action.php:77
    4247msgid "Desktop"
    4348msgstr ""
    4449
    45 #: inc/hook-action.php:77
    46 #: inc/hook-action.php:85
     50#: inc/hook-action.php:84
     51#: inc/hook-action.php:92
    4752msgid "Custom CSS"
    4853msgstr ""
    4954
    50 #: inc/hook-action.php:99
     55#: inc/hook-action.php:106
    5156msgid "Tablet"
    5257msgstr ""
    5358
    54 #: inc/hook-action.php:106
    55 #: inc/hook-action.php:115
     59#: inc/hook-action.php:113
     60#: inc/hook-action.php:122
    5661msgid "Custom CSS (Tablet)"
    5762msgstr ""
    5863
    59 #: inc/hook-action.php:129
     64#: inc/hook-action.php:136
    6065msgid "Mobile"
    6166msgstr ""
    6267
    63 #: inc/hook-action.php:136
    64 #: inc/hook-action.php:145
     68#: inc/hook-action.php:143
     69#: inc/hook-action.php:152
    6570msgid "Custom CSS (Mobile)"
    6671msgstr ""
    6772
    68 #: inc/hook-action.php:159
     73#: inc/hook-action.php:166
    6974msgid "Use \"selector\" to target wrapper element. Examples:<br>selector {color: red;} // For main element<br>selector .child-element {margin: 10px;} // For child element<br>.my-class {text-align: center;} // Or use any custom selector"
    7075msgstr ""
    7176
    72 #: inc/hook-action.php:169
     77#: inc/hook-action.php:176
    7378msgid "If the CSS is not reflecting in the editor panel or frontend, you need to write a more specific CSS selector."
    7479msgstr ""
     
    8287msgstr ""
    8388
    84 #. translators: 1: Plugin name 2: Elementor
     89#. translators: 1: Plugin name 2: Required on 3: Required version
    8590#: plugin.php:96
    8691msgid "\"%1$s\" requires \"%2$s\" to be installed and activated. %3$s"
     
    9297msgstr ""
    9398
    94 #. translators: 1: Plugin name 2: Elementor 3: Required Elementor version
    95 #. translators: 1: Plugin name 2: PHP 3: Required PHP version
     99#. translators: 1: Plugin name 2: Required on 3: Required version
    96100#: plugin.php:114
    97101#: plugin.php:132
  • custom-css-for-elementor/tags/2.1.0/inc/hook-action.php

    r2979212 r3202104  
    44
    55// If this file is called directly, abort.
    6 defined('ABSPATH') || exit;
    7 
     6defined( 'ABSPATH' ) || exit;
     7
     8use Wikimedia\CSS\Util;
     9use Elementor\Controls_Stack;
    810use Elementor\Controls_Manager;
    9 use Elementor\Controls_Stack;
     11use Wikimedia\CSS\Parser\Parser;
     12use Elementor\Plugin as Elementor_Plugin;
    1013use Elementor\Core\DynamicTags\Dynamic_CSS;
    11 use Elementor\Plugin as Elementor_Plugin;
    12 
    13 use Wikimedia\CSS\Parser\Parser;
    1414use Wikimedia\CSS\Sanitizer\StylesheetSanitizer;
    15 use Wikimedia\CSS\Util;
    1615
    1716class Hook_Action {
    1817
    19     /**
    20      * @var Singleton The reference the *Singleton* instance of this class
    21      */
    22     public static $instance;
    23 
    24     /**
    25      * this class initialize function
    26      *
    27      * @return void
    28      */
    29     public function init() {
    30         add_action('elementor/element/common/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2);
    31         add_action('elementor/element/section/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2);
    32         add_action('elementor/element/column/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2);
    33 
    34         add_action('elementor/element/container/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2);
    35 
    36         add_action('elementor/element/parse_css', [$this, 'add_post_css'], 10, 2);
    37         add_action('elementor/css-file/post/parse', [$this, 'add_page_settings_css']);
    38 
    39         add_action('elementor/frontend/after_enqueue_scripts', [$this, 'add_custom_css_for_editor']);
    40     }
    41 
    42     /**
    43      * register controls to elementor widget function
    44      *
    45      * @param Controls_Stack $element
    46      * @param [type] $section_id
    47      * @return void
    48      */
    49     public function register_controls(Controls_Stack $element, $section_id) {
    50 
    51         if (!current_user_can('edit_pages') && !current_user_can('unfiltered_html')) {
    52             return;
    53         }
    54 
    55         $element->start_controls_section(
    56             '_custom_css_f_ele',
    57             [
    58                 'label' => esc_html__('Custom CSS for Elementor', 'custom-css-for-elementor'),
    59                 'tab' => Controls_Manager::TAB_ADVANCED,
    60             ]
    61         );
    62 
    63         $element->start_controls_tabs(
    64             'style_tabs'
    65         );
    66 
    67         $element->start_controls_tab(
    68             '_custom_css_desktop',
    69             [
    70                 'label' => '<span class="eicon-device-desktop" title="' . esc_html__('Desktop', 'custom-css-for-elementor') . '"></span>',
    71             ]
    72         );
    73 
    74         $element->add_control(
    75             '_custom_css_f_ele_title_desktop',
    76             [
    77                 'label' => esc_html__('Custom CSS', 'custom-css-for-elementor'),
    78                 'type' => Controls_Manager::HEADING,
    79             ]
    80         );
    81 
    82         $element->add_control(
    83             '_custom_css_f_ele_css_desktop',
    84             [
    85                 'label' => esc_html__('Custom CSS', 'custom-css-for-elementor'),
    86                 'type' => Controls_Manager::CODE,
    87                 'language' => 'css',
    88                 'render_type' => 'ui',
    89                 'show_label' => false,
    90                 'separator' => 'none',
    91             ]
    92         );
    93 
    94         $element->end_controls_tab();
    95 
    96         $element->start_controls_tab(
    97             '_custom_css_tablet',
    98             [
    99                 'label' => '<span class="eicon-device-tablet" title="' . esc_html__('Tablet', 'custom-css-for-elementor') . '"></span>',
    100             ]
    101         );
    102 
    103         $element->add_control(
    104             '_custom_css_f_ele_title_tablet',
    105             [
    106                 'label' => esc_html__('Custom CSS (Tablet)', 'custom-css-for-elementor'),
    107                 'type' => Controls_Manager::HEADING,
    108             ]
    109         );
    110 
    111         $element->add_control(
    112             '_custom_css_f_ele_css_tablet',
    113             [
    114                 'type' => Controls_Manager::CODE,
    115                 'label' => esc_html__('Custom CSS (Tablet)', 'custom-css-for-elementor'),
    116                 'language' => 'css',
    117                 'render_type' => 'ui',
    118                 'show_label' => false,
    119                 'separator' => 'none',
    120             ]
    121         );
    122 
    123         $element->end_controls_tab();
    124 
    125 
    126         $element->start_controls_tab(
    127             '_custom_css_mobile',
    128             [
    129                 'label' => '<span class="eicon-device-mobile" title="' . esc_html__('Mobile', 'custom-css-for-elementor') . '"></span>',
    130             ]
    131         );
    132 
    133         $element->add_control(
    134             '_custom_css_f_ele_title_mobile',
    135             [
    136                 'label' => esc_html__('Custom CSS (Mobile)', 'custom-css-for-elementor'),
    137                 'type' => Controls_Manager::HEADING,
    138             ]
    139         );
    140 
    141         $element->add_control(
    142             '_custom_css_f_ele_css_mobile',
    143             [
    144                 'type' => Controls_Manager::CODE,
    145                 'label' => esc_html__('Custom CSS (Mobile)', 'custom-css-for-elementor'),
    146                 'language' => 'css',
    147                 'render_type' => 'ui',
    148                 'show_label' => false,
    149                 'separator' => 'none',
    150             ]
    151         );
    152 
    153         $element->end_controls_tab();
    154         $element->end_controls_tabs();
    155 
    156         $element->add_control(
    157             '_custom_css_f_ele_description',
    158             [
    159                 'raw' => esc_html__('Use "selector" to target wrapper element. Examples:<br>selector {color: red;} // For main element<br>selector .child-element {margin: 10px;} // For child element<br>.my-class {text-align: center;} // Or use any custom selector', 'custom-css-for-elementor'),
    160                 'type' => Controls_Manager::RAW_HTML,
    161                 'content_classes' => 'elementor-descriptor',
    162             ]
    163         );
    164 
    165         $element->add_control(
    166             '_custom_css_f_ele_notice',
    167             [
    168                 'type' => Controls_Manager::RAW_HTML,
    169                 'raw' => esc_html__('If the CSS is not reflecting in the editor panel or frontend, you need to write a more specific CSS selector.', 'custom-css-for-elementor'),
    170                 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
    171             ]
    172         );
    173 
    174         $element->end_controls_section();
    175     }
    176 
    177     /**
    178      * add custom css function to post function
    179      *
    180      * @param [type] $post_css
    181      * @param [type] $element
    182      * @return void
    183      */
    184     public function add_post_css($post_css, $element) {
    185         if ($post_css instanceof Dynamic_CSS) {
    186             return;
    187         }
    188 
    189         $element_settings = $element->get_settings();
    190 
    191         $sanitize_css = $this->parse_css_to_remove_injecting_code($element_settings, $post_css->get_element_unique_selector($element));
    192 
    193         $post_css->get_stylesheet()->add_raw_css($sanitize_css);
    194     }
    195 
    196     /**
    197      * add custom css function to page function
    198      *
    199      * @param [type] $post_css
    200      * @return void
    201      */
    202     public function add_page_settings_css($post_css) {
    203 
    204         $document = Elementor_Plugin::instance()->documents->get($post_css->get_post_id());
    205 
    206         $element_settings = $document->get_settings();
    207 
    208         $sanitize_css = $this->parse_css_to_remove_injecting_code($element_settings, $document->get_css_wrapper_selector());
    209 
    210         $post_css->get_stylesheet()->add_raw_css($sanitize_css);
    211     }
    212 
    213     /**
    214      * validate css and sanitize css for avoiding injection of malicious code function
    215      *
    216      * @param [type] $raw_css
    217      * @return void
    218      */
    219     public function parse_css_to_remove_injecting_code($element_settings, $unique_selector) {
    220 
    221         $custom_css = '';
    222 
    223         if (empty($element_settings['_custom_css_f_ele_css_desktop']) && empty($element_settings['_custom_css_f_ele_css_tablet']) && empty($element_settings['_custom_css_f_ele_css_mobile'])) {
    224             return;
    225         }
    226 
    227         $custom_css_desktop = trim($element_settings['_custom_css_f_ele_css_desktop']);
    228         $custom_css_tablet = trim($element_settings['_custom_css_f_ele_css_tablet']);
    229         $custom_css_mobile = trim($element_settings['_custom_css_f_ele_css_mobile']);
    230 
    231         if (empty($custom_css_desktop) && empty($custom_css_tablet) && empty($custom_css_mobile)) {
    232             return;
    233         }
    234 
    235         $custom_css .= ((!empty($custom_css_desktop)) ? $custom_css_desktop : "");
    236         $custom_css .= ((!empty($custom_css_tablet)) ? " @media (max-width: 768px) { " . $custom_css_tablet . "}" : "");
    237         $custom_css .= ((!empty($custom_css_mobile)) ? " @media (max-width: 425px) { " . $custom_css_mobile . "}" : "");
    238 
    239         if (empty($custom_css)) {
    240             return;
    241         }
    242 
    243         $custom_css = str_replace('selector', $unique_selector, $custom_css);
    244 
    245         $remove_tags_css = wp_kses($custom_css, []);
    246         $parser = Parser::newFromString($remove_tags_css);
    247         $parsed_css = $parser->parseStylesheet();
    248 
    249         $sanitizer = StylesheetSanitizer::newDefault();
    250         $sanitized_css = $sanitizer->sanitize($parsed_css);
    251         $minified_css = Util::stringify($sanitized_css, ['minify' => true]);
    252 
    253         return $minified_css;
    254     }
    255 
    256     public function get_script_depends() {
    257         return ['editor-css-script'];
    258     }
    259 
    260     public function add_custom_css_for_editor() {
    261         wp_enqueue_script(
    262             'purify',
    263             CUSTOM_CSS_FELE_PLUGIN_URL . 'assets/js/purify.min.js',
    264             [],
    265             '3.0.6',
    266             true
    267         );
    268 
    269         wp_enqueue_script(
    270             'editor-css-script',
    271             CUSTOM_CSS_FELE_PLUGIN_URL . 'assets/js/editor-css-script.js',
    272             ['elementor-frontend', 'purify'],
    273             CUSTOM_CSS_FELE_VERSION,
    274             true
    275         );
    276 
    277         wp_localize_script(
    278             'editor-css-script',
    279             'modelData',
    280             array(
    281                 'postID' => get_the_ID()
    282             )
    283         );
    284     }
    285 
    286     /**
    287      * Returns the *Singleton* instance of this class.
    288      *
    289      * @return Singleton The *Singleton* instance.
    290      */
    291     public static function instance() {
    292         if (null === self::$instance) {
    293             self::$instance = new self();
    294         }
    295         return self::$instance;
    296     }
     18    /**
     19     * @var Singleton The reference the *Singleton* instance of this class
     20     */
     21    public static $instance;
     22    public $default_breakpoints;
     23
     24    /**
     25     * this class initialize function
     26     *
     27     * @return void
     28     */
     29    public function init() {
     30
     31        $this->default_breakpoints = [
     32            'tablet' => 768,
     33            'mobile' => 425
     34        ];
     35
     36        add_action( 'elementor/element/common/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2 );
     37        add_action( 'elementor/element/section/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2 );
     38        add_action( 'elementor/element/column/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2 );
     39
     40        add_action( 'elementor/element/container/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2 );
     41
     42        add_action( 'elementor/element/parse_css', [$this, 'add_post_css'], 10, 2 );
     43        add_action( 'elementor/css-file/post/parse', [$this, 'add_page_settings_css'] );
     44
     45        add_action( 'elementor/frontend/after_enqueue_scripts', [$this, 'add_custom_css_for_editor'] );
     46    }
     47
     48    /**
     49     * register controls to elementor widget function
     50     *
     51     * @param Controls_Stack $element
     52     * @param [type] $section_id
     53     * @return void
     54     */
     55    public function register_controls( Controls_Stack $element, $section_id ) {
     56
     57        if ( ! current_user_can( 'edit_pages' ) && ! current_user_can( 'unfiltered_html' ) ) {
     58            return;
     59        }
     60
     61        $element->start_controls_section(
     62            '_custom_css_f_ele',
     63            [
     64                'label' => esc_html__( 'Custom CSS for Elementor', 'custom-css-for-elementor' ),
     65                'tab'   => Controls_Manager::TAB_ADVANCED
     66            ]
     67        );
     68
     69        $element->start_controls_tabs(
     70            'style_tabs'
     71        );
     72
     73        $element->start_controls_tab(
     74            '_custom_css_desktop',
     75            [
     76                'label' => '<span class="eicon-device-desktop" title="' . esc_html__( 'Desktop', 'custom-css-for-elementor' ) . '"></span>'
     77            ]
     78        );
     79
     80        $element->add_control(
     81            '_custom_css_f_ele_title_desktop',
     82            [
     83                'label' => esc_html__( 'Custom CSS', 'custom-css-for-elementor' ),
     84                'type'  => Controls_Manager::HEADING
     85            ]
     86        );
     87
     88        $element->add_control(
     89            '_custom_css_f_ele_css_desktop',
     90            [
     91                'label'       => esc_html__( 'Custom CSS', 'custom-css-for-elementor' ),
     92                'type'        => Controls_Manager::CODE,
     93                'language'    => 'css',
     94                'render_type' => 'ui',
     95                'show_label'  => false,
     96                'separator'   => 'none'
     97            ]
     98        );
     99
     100        $element->end_controls_tab();
     101
     102        $element->start_controls_tab(
     103            '_custom_css_tablet',
     104            [
     105                'label' => '<span class="eicon-device-tablet" title="' . esc_html__( 'Tablet', 'custom-css-for-elementor' ) . '"></span>'
     106            ]
     107        );
     108
     109        $element->add_control(
     110            '_custom_css_f_ele_title_tablet',
     111            [
     112                'label' => esc_html__( 'Custom CSS (Tablet)', 'custom-css-for-elementor' ),
     113                'type'  => Controls_Manager::HEADING
     114            ]
     115        );
     116
     117        $element->add_control(
     118            '_custom_css_f_ele_css_tablet',
     119            [
     120                'type'        => Controls_Manager::CODE,
     121                'label'       => esc_html__( 'Custom CSS (Tablet)', 'custom-css-for-elementor' ),
     122                'language'    => 'css',
     123                'render_type' => 'ui',
     124                'show_label'  => false,
     125                'separator'   => 'none'
     126            ]
     127        );
     128
     129        $element->end_controls_tab();
     130
     131        $element->start_controls_tab(
     132            '_custom_css_mobile',
     133            [
     134                'label' => '<span class="eicon-device-mobile" title="' . esc_html__( 'Mobile', 'custom-css-for-elementor' ) . '"></span>'
     135            ]
     136        );
     137
     138        $element->add_control(
     139            '_custom_css_f_ele_title_mobile',
     140            [
     141                'label' => esc_html__( 'Custom CSS (Mobile)', 'custom-css-for-elementor' ),
     142                'type'  => Controls_Manager::HEADING
     143            ]
     144        );
     145
     146        $element->add_control(
     147            '_custom_css_f_ele_css_mobile',
     148            [
     149                'type'        => Controls_Manager::CODE,
     150                'label'       => esc_html__( 'Custom CSS (Mobile)', 'custom-css-for-elementor' ),
     151                'language'    => 'css',
     152                'render_type' => 'ui',
     153                'show_label'  => false,
     154                'separator'   => 'none'
     155            ]
     156        );
     157
     158        $element->end_controls_tab();
     159        $element->end_controls_tabs();
     160
     161        $element->add_control(
     162            '_custom_css_f_ele_description',
     163            [
     164                'raw'             => esc_html__( 'Use "selector" to target wrapper element. Examples:<br>selector {color: red;} // For main element<br>selector .child-element {margin: 10px;} // For child element<br>.my-class {text-align: center;} // Or use any custom selector', 'custom-css-for-elementor' ),
     165                'type'            => Controls_Manager::RAW_HTML,
     166                'content_classes' => 'elementor-descriptor'
     167            ]
     168        );
     169
     170        $element->add_control(
     171            '_custom_css_f_ele_notice',
     172            [
     173                'type'            => Controls_Manager::RAW_HTML,
     174                'raw'             => esc_html__( 'If the CSS is not reflecting in the editor panel or frontend, you need to write a more specific CSS selector.', 'custom-css-for-elementor' ),
     175                'content_classes' => 'elementor-panel-alert elementor-panel-alert-info'
     176            ]
     177        );
     178
     179        $element->end_controls_section();
     180    }
     181
     182    /**
     183     * add custom css function to post function
     184     *
     185     * @param [type] $post_css
     186     * @param [type] $element
     187     * @return void
     188     */
     189    public function add_post_css( $post_css, $element ) {
     190        if ( $post_css instanceof Dynamic_CSS ) {
     191            return;
     192        }
     193
     194        $element_settings = $element->get_settings();
     195
     196        $sanitize_css = $this->parse_css_to_remove_injecting_code( $element_settings, $post_css->get_element_unique_selector( $element ) );
     197
     198        $post_css->get_stylesheet()->add_raw_css( $sanitize_css );
     199    }
     200
     201    /**
     202     * add custom css function to page function
     203     *
     204     * @param [type] $post_css
     205     * @return void
     206     */
     207    public function add_page_settings_css( $post_css ) {
     208
     209        $document = Elementor_Plugin::instance()->documents->get( $post_css->get_post_id() );
     210
     211        $element_settings = $document->get_settings();
     212
     213        $sanitize_css = $this->parse_css_to_remove_injecting_code( $element_settings, $document->get_css_wrapper_selector() );
     214
     215        $post_css->get_stylesheet()->add_raw_css( $sanitize_css );
     216    }
     217
     218    /**
     219     * validate css and sanitize css for avoiding injection of malicious code function
     220     *
     221     * @param [type] $raw_css
     222     * @return void
     223     */
     224    public function parse_css_to_remove_injecting_code( $element_settings, $unique_selector ) {
     225
     226        $custom_css = '';
     227
     228        if ( empty( $element_settings['_custom_css_f_ele_css_desktop'] ) && empty( $element_settings['_custom_css_f_ele_css_tablet'] ) && empty( $element_settings['_custom_css_f_ele_css_mobile'] ) ) {
     229            return;
     230        }
     231
     232        $custom_css_desktop = trim( $element_settings['_custom_css_f_ele_css_desktop'] );
     233        $custom_css_tablet  = trim( $element_settings['_custom_css_f_ele_css_tablet'] );
     234        $custom_css_mobile  = trim( $element_settings['_custom_css_f_ele_css_mobile'] );
     235
     236        if ( empty( $custom_css_desktop ) && empty( $custom_css_tablet ) && empty( $custom_css_mobile ) ) {
     237            return;
     238        }
     239
     240        $this->default_breakpoints = apply_filters( 'custom_css_for_elementor_breakpoints', $this->default_breakpoints );
     241
     242        $custom_css .= ( ( ! empty( $custom_css_desktop ) ) ? $custom_css_desktop : '' );
     243        $custom_css .= ( ( ! empty( $custom_css_tablet ) ) ? ' @media (max-width: ' . $this->default_breakpoints['tablet'] . 'px) { ' . $custom_css_tablet . '}' : '' );
     244        $custom_css .= ( ( ! empty( $custom_css_mobile ) ) ? ' @media (max-width: ' . $this->default_breakpoints['mobile'] . 'px) { ' . $custom_css_mobile . '}' : '' );
     245
     246        if ( empty( $custom_css ) ) {
     247            return;
     248        }
     249
     250        $custom_css = str_replace( 'selector', $unique_selector, $custom_css );
     251
     252        $remove_tags_css = wp_kses( $custom_css, [] );
     253        $parser          = Parser::newFromString( $remove_tags_css );
     254        $parsed_css      = $parser->parseStylesheet();
     255
     256        $sanitizer     = StylesheetSanitizer::newDefault();
     257        $sanitized_css = $sanitizer->sanitize( $parsed_css );
     258        $minified_css  = Util::stringify( $sanitized_css, ['minify' => true] );
     259
     260        return $minified_css;
     261    }
     262
     263    public function get_script_depends() {
     264        return ['editor-css-script'];
     265    }
     266
     267    public function add_custom_css_for_editor() {
     268        wp_enqueue_script(
     269            'purify',
     270            CUSTOM_CSS_FELE_PLUGIN_URL . 'assets/js/purify.min.js',
     271            [],
     272            '3.0.6',
     273            true
     274        );
     275
     276        wp_enqueue_script(
     277            'editor-css-script',
     278            CUSTOM_CSS_FELE_PLUGIN_URL . 'assets/js/editor-css-script.js',
     279            ['elementor-frontend', 'purify'],
     280            CUSTOM_CSS_FELE_VERSION,
     281            true
     282        );
     283
     284        $this->default_breakpoints = apply_filters( 'custom_css_for_elementor_breakpoints', $this->default_breakpoints );
     285
     286        wp_localize_script(
     287            'editor-css-script',
     288            'modelData',
     289            [
     290                'postID'      => get_the_ID(),
     291                'breakpoints' => $this->default_breakpoints
     292            ]
     293        );
     294    }
     295
     296    /**
     297     * Returns the *Singleton* instance of this class.
     298     *
     299     * @return Singleton The *Singleton* instance.
     300     */
     301    public static function instance() {
     302        if ( null === self::$instance ) {
     303            self::$instance = new self();
     304        }
     305
     306        return self::$instance;
     307    }
    297308}
  • custom-css-for-elementor/tags/2.1.0/plugin.php

    r2979212 r3202104  
    44
    55// If this file is called directly, abort.
    6 defined('ABSPATH') || exit;
     6defined( 'ABSPATH' ) || exit;
    77
    88/**
     
    1111 */
    1212final class Plugin {
    13     /**
    14     * @var Singleton The reference the *Singleton* instance of this class
    15     */
    16     public static $instance;
     13    /**
     14    * @var Singleton The reference the *Singleton* instance of this class
     15    */
     16    public static $instance;
    1717
    18     /**
    19     * elementor required version
    20     */
    21     const CCFE_MINIMUM_ELE_VER = '3.9.0';
     18    /**
     19    * elementor required version
     20    */
     21    const CCFE_MINIMUM_ELE_VER = '3.9.0';
    2222
    23     /**
    24     * php required version
    25     */
    26     const CCFE_MINIMUM_PHP_VER = '5.6';
     23    /**
     24    * php required version
     25    */
     26    const CCFE_MINIMUM_PHP_VER = '5.6';
    2727
    28     /**
    29     * class constructor function
    30     */
    31     public function __construct() {
    32         $this->define_constants();
    33     }
     28    /**
     29    * class constructor function
     30    */
     31    public function __construct() {
     32        $this->define_constants();
     33    }
    3434
    35     /**
    36     * constent declare function
    37     *
    38     * @return void
    39     */
    40     public function define_constants() {
    41         define('CUSTOM_CSS_FELE_VERSION', '2.0.0');
    42         define('CUSTOM_CSS_FELE_PACKAGE', 'free');
    43         define('CUSTOM_CSS_FELE_PLUGIN_URL', plugin_dir_url(__FILE__));
    44         define('CUSTOM_CSS_FELE_PLUGIN_DIR', plugin_dir_path(__FILE__));
    45     }
     35    /**
     36    * constent declare function
     37    *
     38    * @return void
     39    */
     40    public function define_constants() {
     41        define( 'CUSTOM_CSS_FELE_VERSION', '2.1.0' );
     42        define( 'CUSTOM_CSS_FELE_PACKAGE', 'free' );
     43        define( 'CUSTOM_CSS_FELE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     44        define( 'CUSTOM_CSS_FELE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     45    }
    4646
    47     /**
    48     * init function of plugin
    49     *
    50     * @return void
    51     */
    52     public function init() {
     47    /**
     48    * init function of plugin
     49    *
     50    * @return void
     51    */
     52    public function init() {
    5353
    54         // Check if Elementor installed and activated
    55         if (!did_action('elementor/loaded')) {
    56             add_action('admin_notices', [$this, 'admin_notice_missing_main_plugin']);
    57             return;
    58         }
     54        // Check if Elementor installed and activated
     55        if ( ! did_action( 'elementor/loaded' ) ) {
     56            add_action( 'admin_notices', [$this, 'admin_notice_missing_main_plugin'] );
    5957
    60         // Check for required Elementor version
    61         if (!version_compare(ELEMENTOR_VERSION, self::CCFE_MINIMUM_ELE_VER, '>=')) {
    62             add_action('admin_notices', [$this, 'admin_notice_minimum_elementor_version']);
    63             return;
    64         }
     58            return;
     59        }
    6560
    66         // Check for required PHP version
    67         if (version_compare(PHP_VERSION, self::CCFE_MINIMUM_PHP_VER, '<')) {
    68             add_action('admin_notices', [$this, 'admin_notice_minimum_php_version']);
    69             return;
    70         }
     61        // Check for required Elementor version
     62        if ( ! version_compare( ELEMENTOR_VERSION, self::CCFE_MINIMUM_ELE_VER, '>=' ) ) {
     63            add_action( 'admin_notices', [$this, 'admin_notice_minimum_elementor_version'] );
    7164
    72         if (!class_exists('Custom_Css_FEle\Inc\Hook_Action')) {
    73             include_once CUSTOM_CSS_FELE_PLUGIN_DIR . 'inc/hook-action.php';
    74         }
     65            return;
     66        }
    7567
    76         Inc\Hook_Action::instance()->init();
    77     }
     68        // Check for required PHP version
     69        if ( version_compare( PHP_VERSION, self::CCFE_MINIMUM_PHP_VER, '<' ) ) {
     70            add_action( 'admin_notices', [$this, 'admin_notice_minimum_php_version'] );
    7871
    79     /**
    80      * admin notice for missing depended plugin function
    81      *
    82      * @return void
    83      */
    84     public function admin_notice_missing_main_plugin() {
     72            return;
     73        }
    8574
    86         if (file_exists(WP_PLUGIN_DIR . '/elementor/elementor.php')) {
    87             $notice_title = esc_html__('Activate Elementor', 'custom-css-for-elementor');
    88             $notice_url = wp_nonce_url('plugins.php?action=activate&plugin=elementor/elementor.php&plugin_status=all&paged=1', 'activate-plugin_elementor/elementor.php');
    89         } else {
    90             $notice_title = esc_html__('Install Elementor', 'custom-css-for-elementor');
    91             $notice_url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=elementor'), 'install-plugin_elementor');
    92         }
     75        if ( ! class_exists( 'Custom_Css_FEle\Inc\Hook_Action' ) ) {
     76            include_once CUSTOM_CSS_FELE_PLUGIN_DIR . 'inc/hook-action.php';
     77        }
    9378
    94         $message = sprintf(
    95             /* translators: 1: Plugin name 2: Elementor */
    96             esc_html__('"%1$s" requires "%2$s" to be installed and activated. %3$s', 'custom-css-for-elementor'),
    97             '<strong>' . esc_html__('Custom CSS for Elementor', 'custom-css-for-elementor') . '</strong>',
    98             '<strong>' . esc_html__('Elementor', 'custom-css-for-elementor') . '</strong>',
    99             '<a href="' . esc_url($notice_url) . '">' . $notice_title . '</a>'
    100         );
     79        Inc\Hook_Action::instance()->init();
     80    }
    10181
    102         printf('<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message);
    103     }
     82    /**
     83     * admin notice for missing depended plugin function
     84     *
     85     * @return void
     86     */
     87    public function admin_notice_missing_main_plugin() {
    10488
    105     /**
    106      * admin notice for minimum version required plugin function
    107      *
    108      * @return void
    109      */
    110     public function admin_notice_minimum_elementor_version() {
     89        if ( file_exists( WP_PLUGIN_DIR . '/elementor/elementor.php' ) ) {
     90            $notice_title = esc_html__( 'Activate Elementor', 'custom-css-for-elementor' );
     91            $notice_url   = wp_nonce_url( 'plugins.php?action=activate&plugin=elementor/elementor.php&plugin_status=all&paged=1', 'activate-plugin_elementor/elementor.php' );
     92        } else {
     93            $notice_title = esc_html__( 'Install Elementor', 'custom-css-for-elementor' );
     94            $notice_url   = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
     95        }
    11196
    112         $message = sprintf(
    113             /* translators: 1: Plugin name 2: Elementor 3: Required Elementor version */
    114             esc_html__('"%1$s" requires "%2$s" version %3$s or greater.', 'custom-css-for-elementor'),
    115             '<strong>' . esc_html__('Custom CSS for Elementor', 'custom-css-for-elementor') . '</strong>',
    116             '<strong>' . esc_html__('Elementor', 'custom-css-for-elementor') . '</strong>',
    117             self::CCFE_MINIMUM_ELE_VER
    118         );
     97        $message = sprintf(
     98            /* translators: 1: Plugin name 2: Required on 3: Required version*/
     99            esc_html__( '"%1$s" requires "%2$s" to be installed and activated. %3$s', 'custom-css-for-elementor' ),
     100            '<strong>' . esc_html__( 'Custom CSS for Elementor', 'custom-css-for-elementor' ) . '</strong>',
     101            '<strong>' . esc_html__( 'Elementor', 'custom-css-for-elementor' ) . '</strong>',
     102            '<a href="' . esc_url( $notice_url ) . '">' . $notice_title . '</a>'
     103        );
    119104
    120         printf('<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message);
    121     }
     105        printf( '<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message );
     106    }
    122107
    123     /**
    124      * admin notice for minimum version php required function
    125     *
    126     * @return void
    127     */
    128     public function admin_notice_minimum_php_version() {
     108    /**
     109     * admin notice for minimum version required plugin function
     110    *
     111    * @return void
     112    */
     113    public function admin_notice_minimum_elementor_version() {
    129114
    130         $message = sprintf(
    131             /* translators: 1: Plugin name 2: PHP 3: Required PHP version */
    132             esc_html__('"%1$s" requires "%2$s" version %3$s or greater.', 'custom-css-for-elementor'),
    133             '<strong>' . esc_html__('Custom CSS for Elementor', 'custom-css-for-elementor') . '</strong>',
    134             '<strong>' . esc_html__('PHP', 'custom-css-for-elementor') . '</strong>',
    135             self::CCFE_MINIMUM_PHP_VER
    136         );
     115        $message = sprintf(
     116            /* translators: 1: Plugin name 2: Required on 3: Required version */
     117            esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'custom-css-for-elementor' ),
     118            '<strong>' . esc_html__( 'Custom CSS for Elementor', 'custom-css-for-elementor' ) . '</strong>',
     119            '<strong>' . esc_html__( 'Elementor', 'custom-css-for-elementor' ) . '</strong>',
     120            self::CCFE_MINIMUM_ELE_VER
     121        );
    137122
    138         printf('<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message);
    139     }
     123        printf( '<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message );
     124    }
    140125
    141     /**
    142      * Returns the *Singleton* instance of this class.
    143      *
    144      * @return Singleton The *Singleton* instance.
    145      */
    146     public static function instance() {
    147         if (null === self::$instance) {
    148             self::$instance = new self();
    149         }
    150         return self::$instance;
    151     }
     126    /**
     127     * admin notice for minimum version php required function
     128     *
     129     * @return void
     130     */
     131    public function admin_notice_minimum_php_version() {
     132
     133        $message = sprintf(
     134            /* translators: 1: Plugin name 2: Required on 3: Required version */
     135            esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'custom-css-for-elementor' ),
     136            '<strong>' . esc_html__( 'Custom CSS for Elementor', 'custom-css-for-elementor' ) . '</strong>',
     137            '<strong>' . esc_html__( 'PHP', 'custom-css-for-elementor' ) . '</strong>',
     138            self::CCFE_MINIMUM_PHP_VER
     139        );
     140
     141        printf( '<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message );
     142    }
     143
     144    /**
     145     * Returns the *Singleton* instance of this class.
     146     *
     147     * @return Singleton The *Singleton* instance.
     148     */
     149    public static function instance() {
     150        if ( null === self::$instance ) {
     151            self::$instance = new self();
     152        }
     153
     154        return self::$instance;
     155    }
    152156}
  • custom-css-for-elementor/tags/2.1.0/readme.txt

    r2979212 r3202104  
    11=== Custom CSS for Elementor ===
     2Plugin Name: Custom CSS for Elementor
     3Version: 2.1.0
     4Author: Sayedul Sayem
     5Author URI: https://sayedulsayem.com/
    26Contributors: sayedulsayem, ikamal, gtarafdarr
    37Tags: elementor, css, custom css, responsive css, elementor addons
    48Requires at least: 5.0
    5 Tested up to: 6.3.2
    6 Requires PHP: 5.6
    7 Stable tag: 2.0.0
     9Tested up to: 6.7
     10Requires PHP: 7.4
     11Stable tag: 2.1.0
    812License: GPL v3 or later
    913License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    5761* It works with any Elementor widget and other third-party Elementor addons widgets too.
    5862
     63### 💻 How to Change Breakpoints in WordPress
     64To modify breakpoints for tablet and mobile devices in WordPress, you can add custom code to your theme's `functions.php` file. Breakpoints determine when your website layout switches between different screen sizes, ensuring optimal display across devices.
     65
     66#### Changing Tablet Breakpoint
     67To adjust the breakpoint for tablets, follow these steps:
     68
     691. Open your WordPress theme's `functions.php` file.
     702. Add the following PHP code snippet:
     71
     72```php
     73add_filter( 'custom_css_for_elementor_breakpoints' , function( $default_breakpoints ) {
     74    $default_breakpoints['tablet'] = 768; // change this value
     75    return $default_breakpoints;
     76}, 20, 1);
     77```
     783. Save the file.
     79
     80#### Changing Mobile Breakpoint
     81To customize the breakpoint for mobile devices, use the following instructions:
     82
     831. Navigate to your theme's `functions.php` file.
     842. Insert the following PHP code:
     85
     86```php
     87add_filter( 'custom_css_for_elementor_breakpoints' , function( $default_breakpoints ) {
     88    $default_breakpoints['mobile'] = 425; // change this value
     89    return $default_breakpoints;
     90}, 20, 1);
     91```
     923. Save the changes.
     93
     94By adjusting these breakpoints, you can fine-tune your website's responsiveness and ensure a seamless viewing experience across various devices.
     95
    5996
    6097### **PRIVACY POLICY**
     
    104141== Changelog ==
    105142
     143= 2.1.0 =
     144
     145- New: Filter added for changing breakpoints.
     146
    106147= 2.0.0 =
    107148
  • custom-css-for-elementor/tags/2.1.0/vendor/autoload.php

    r2979212 r3202104  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit89ceebd147ade89d01e60cb732f065bf::getLoader();
     25return ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9::getLoader();
  • custom-css-for-elementor/tags/2.1.0/vendor/composer/autoload_real.php

    r2979212 r3202104  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit89ceebd147ade89d01e60cb732f065bf
     5class ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit89ceebd147ade89d01e60cb732f065bf', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit89ceebd147ade89d01e60cb732f065bf', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::getInitializer($loader));
    3333
    3434        $loader->register(true);
    3535
    36         $filesToLoad = \Composer\Autoload\ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::$files;
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$files;
    3737        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
    3838            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • custom-css-for-elementor/tags/2.1.0/vendor/composer/autoload_static.php

    r2979212 r3202104  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit89ceebd147ade89d01e60cb732f065bf
     7class ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9
    88{
    99    public static $files = array (
     
    4040    {
    4141        return \Closure::bind(function () use ($loader) {
    42             $loader->prefixLengthsPsr4 = ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::$prefixLengthsPsr4;
    43             $loader->prefixDirsPsr4 = ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::$prefixDirsPsr4;
    44             $loader->classMap = ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::$classMap;
     42            $loader->prefixLengthsPsr4 = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$prefixLengthsPsr4;
     43            $loader->prefixDirsPsr4 = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$prefixDirsPsr4;
     44            $loader->classMap = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$classMap;
    4545
    4646        }, null, ClassLoader::class);
  • custom-css-for-elementor/tags/2.1.0/vendor/composer/installed.json

    r2979212 r3202104  
    168168        }
    169169    ],
    170     "dev": true,
     170    "dev": false,
    171171    "dev-package-names": []
    172172}
  • custom-css-for-elementor/tags/2.1.0/vendor/composer/installed.php

    r2979212 r3202104  
    11<?php return array(
    22    'root' => array(
    3         'name' => '__root__',
     3        'name' => 'sayedulsayem/custom-css-for-elementor',
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'a6aae11540b676b742465a618c7174ef4c1c89b6',
    7         'type' => 'library',
     6        'reference' => 'bbd25cb5ee020f2758bb911f1ce0563dfbf0e50e',
     7        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
    99        'aliases' => array(),
    10         'dev' => true,
     10        'dev' => false,
    1111    ),
    1212    'versions' => array(
    13         '__root__' => array(
     13        'sayedulsayem/custom-css-for-elementor' => array(
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => 'a6aae11540b676b742465a618c7174ef4c1c89b6',
    17             'type' => 'library',
     16            'reference' => 'bbd25cb5ee020f2758bb911f1ce0563dfbf0e50e',
     17            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
    1919            'aliases' => array(),
  • custom-css-for-elementor/trunk/assets/js/editor-css-script.js

    r2979212 r3202104  
    1 jQuery(window).on('elementor/frontend/init', function () {
    2   function addCustomCss(css, context) {
    3     if (!context) {
    4       return;
    5     }
    6     var customCss = '';
     1jQuery( window ).on( 'elementor/frontend/init', function () {
     2    function addCustomCss ( css, context ) {
     3        if ( !context ) {
     4            return;
     5        }
     6        var customCss = '';
    77
    8     var model = context.model,
    9       customCssDesktop = model.get('settings').get('_custom_css_f_ele_css_desktop'),
    10       customCssTablet = model.get('settings').get('_custom_css_f_ele_css_tablet'),
    11       customCssMobile = model.get('settings').get('_custom_css_f_ele_css_mobile');
     8        var model = context.model,
     9            customCssDesktop = model.get( 'settings' ).get( '_custom_css_f_ele_css_desktop' ),
     10            customCssTablet = model.get( 'settings' ).get( '_custom_css_f_ele_css_tablet' ),
     11            customCssMobile = model.get( 'settings' ).get( '_custom_css_f_ele_css_mobile' );
    1212
    13     customCss += customCssDesktop ? customCssDesktop : '';
    14     customCss += customCssTablet ? ' @media (max-width: 768px) { ' + customCssTablet + '}' : '';
    15     customCss += customCssMobile ? ' @media (max-width: 425px) { ' + customCssMobile + '}' : '';
     13        customCss += customCssDesktop ? customCssDesktop : '';
     14        customCss += customCssTablet ? ' @media (max-width: ' + modelData.breakpoints.tablet + 'px) { ' + customCssTablet + '}' : '';
     15        customCss += customCssMobile ? ' @media (max-width: ' + modelData.breakpoints.mobile + 'px) { ' + customCssMobile + '}' : '';
    1616
    17     if (!customCss) {
    18       return;
    19     }
     17        if ( !customCss ) {
     18            return;
     19        }
    2020
    21     var selector = '.elementor-' + modelData.postID + ' .elementor-element.elementor-element-' + model.get('id');
     21        var selector = '.elementor-' + modelData.postID + ' .elementor-element.elementor-element-' + model.get( 'id' );
    2222
    23     if ('document' === model.get('elType')) {
    24       selector = elementor.config.document.settings.cssWrapperSelector;
    25     }
     23        if ( 'document' === model.get( 'elType' ) ) {
     24            selector = elementor.config.document.settings.cssWrapperSelector;
     25        }
    2626
    27     if (customCss) {
    28       css += customCss.replaceAll('selector', selector);
    29     }
     27        if ( customCss ) {
     28            css += customCss.replaceAll( 'selector', selector );
     29        }
    3030
    31     return DOMPurify.sanitize(css, { CSS: true });
    32   }
     31        return DOMPurify.sanitize( css, { CSS: true } );
     32    }
    3333
    34   if ((typeof elementor) !== 'undefined') {
    35     elementor.hooks.addFilter('editor/style/styleText', addCustomCss);
    36   }
    37 });
     34    if ( ( typeof elementor ) !== 'undefined' ) {
     35        elementor.hooks.addFilter( 'editor/style/styleText', addCustomCss );
     36    }
     37} );
  • custom-css-for-elementor/trunk/custom-css-for-elementor.php

    r2979212 r3202104  
    33 * Plugin Name: Custom CSS for Elementor
    44 * Plugin URI: https://wordpress.org/plugins/custom-css-for-elementor/
    5  * Description: A lightweight plugin that open an option to add custom CSS code for each device (desktop, tablets, mobiles) by elementor widgets.
    6  * Version: 2.0.0
    7  * Author: sayedulsayem
     5 * Description: A lightweight plugin that open an option to add custom CSS code for each device (desktop, tablets, mobiles) by elementor widgets.
     6 * Version: 2.1.0
     7 * Requires at least: 5.0
     8 * Requires PHP: 7.4
     9 * Author: Sayedul Sayem
    810 * Author URI: https://sayedulsayem.com/
    911 * Text Domain: custom-css-for-elementor
     
    1113 * License: GPL v3 or later
    1214 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
    13  * Elementor tested up to: 3.16
    14  * Elementor Pro tested up to: 3.16
     15 * Elementor tested up to: 3.25
     16 * Elementor Pro tested up to: 3.25
    1517 */
    1618
    17 
    1819// If this file is called directly, abort.
    19 defined('ABSPATH') || exit;
     20defined( 'ABSPATH' ) || exit;
    2021
    2122// include the autoloader file
     
    2829 * load plugin after initialize wordpress core
    2930 */
    30 add_action('plugins_loaded', function () {
    31     Custom_Css_FEle\Plugin::instance()->init();
    32 });
     31add_action( 'plugins_loaded', function () {
     32    Custom_Css_FEle\Plugin::instance()->init();
     33} );
  • custom-css-for-elementor/trunk/i18n/custom-css-for-elementor.pot

    r2979212 r3202104  
    1 # Copyright (C) 2023 sayedulsayem
     1# Copyright (C) 2024 Sayedul Sayem
    22# This file is distributed under the GPL v3 or later.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Custom CSS for Elementor 2.0.0\n"
     5"Project-Id-Version: Custom CSS for Elementor 2.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/custom-css-for-elementor\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-10-15T14:06:07+00:00\n"
     12"POT-Creation-Date: 2024-12-04T06:43:33+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.8.1\n"
     14"X-Generator: WP-CLI 2.11.0\n"
    1515"X-Domain: custom-css-for-elementor\n"
    1616
    1717#. Plugin Name of the plugin
    18 #: inc/hook-action.php:58
     18#: custom-css-for-elementor.php
     19#: inc/hook-action.php:65
    1920#: plugin.php:97
    2021#: plugin.php:115
     
    2425
    2526#. Plugin URI of the plugin
     27#: custom-css-for-elementor.php
    2628msgid "https://wordpress.org/plugins/custom-css-for-elementor/"
    2729msgstr ""
    2830
    2931#. Description of the plugin
     32#: custom-css-for-elementor.php
    3033msgid "A lightweight plugin that open an option to add custom CSS code for each device (desktop, tablets, mobiles) by elementor widgets."
    3134msgstr ""
    3235
    3336#. Author of the plugin
    34 msgid "sayedulsayem"
     37#: custom-css-for-elementor.php
     38msgid "Sayedul Sayem"
    3539msgstr ""
    3640
    3741#. Author URI of the plugin
     42#: custom-css-for-elementor.php
    3843msgid "https://sayedulsayem.com/"
    3944msgstr ""
    4045
    41 #: inc/hook-action.php:70
     46#: inc/hook-action.php:77
    4247msgid "Desktop"
    4348msgstr ""
    4449
    45 #: inc/hook-action.php:77
    46 #: inc/hook-action.php:85
     50#: inc/hook-action.php:84
     51#: inc/hook-action.php:92
    4752msgid "Custom CSS"
    4853msgstr ""
    4954
    50 #: inc/hook-action.php:99
     55#: inc/hook-action.php:106
    5156msgid "Tablet"
    5257msgstr ""
    5358
    54 #: inc/hook-action.php:106
    55 #: inc/hook-action.php:115
     59#: inc/hook-action.php:113
     60#: inc/hook-action.php:122
    5661msgid "Custom CSS (Tablet)"
    5762msgstr ""
    5863
    59 #: inc/hook-action.php:129
     64#: inc/hook-action.php:136
    6065msgid "Mobile"
    6166msgstr ""
    6267
    63 #: inc/hook-action.php:136
    64 #: inc/hook-action.php:145
     68#: inc/hook-action.php:143
     69#: inc/hook-action.php:152
    6570msgid "Custom CSS (Mobile)"
    6671msgstr ""
    6772
    68 #: inc/hook-action.php:159
     73#: inc/hook-action.php:166
    6974msgid "Use \"selector\" to target wrapper element. Examples:<br>selector {color: red;} // For main element<br>selector .child-element {margin: 10px;} // For child element<br>.my-class {text-align: center;} // Or use any custom selector"
    7075msgstr ""
    7176
    72 #: inc/hook-action.php:169
     77#: inc/hook-action.php:176
    7378msgid "If the CSS is not reflecting in the editor panel or frontend, you need to write a more specific CSS selector."
    7479msgstr ""
     
    8287msgstr ""
    8388
    84 #. translators: 1: Plugin name 2: Elementor
     89#. translators: 1: Plugin name 2: Required on 3: Required version
    8590#: plugin.php:96
    8691msgid "\"%1$s\" requires \"%2$s\" to be installed and activated. %3$s"
     
    9297msgstr ""
    9398
    94 #. translators: 1: Plugin name 2: Elementor 3: Required Elementor version
    95 #. translators: 1: Plugin name 2: PHP 3: Required PHP version
     99#. translators: 1: Plugin name 2: Required on 3: Required version
    96100#: plugin.php:114
    97101#: plugin.php:132
  • custom-css-for-elementor/trunk/inc/hook-action.php

    r2979212 r3202104  
    44
    55// If this file is called directly, abort.
    6 defined('ABSPATH') || exit;
    7 
     6defined( 'ABSPATH' ) || exit;
     7
     8use Wikimedia\CSS\Util;
     9use Elementor\Controls_Stack;
    810use Elementor\Controls_Manager;
    9 use Elementor\Controls_Stack;
     11use Wikimedia\CSS\Parser\Parser;
     12use Elementor\Plugin as Elementor_Plugin;
    1013use Elementor\Core\DynamicTags\Dynamic_CSS;
    11 use Elementor\Plugin as Elementor_Plugin;
    12 
    13 use Wikimedia\CSS\Parser\Parser;
    1414use Wikimedia\CSS\Sanitizer\StylesheetSanitizer;
    15 use Wikimedia\CSS\Util;
    1615
    1716class Hook_Action {
    1817
    19     /**
    20      * @var Singleton The reference the *Singleton* instance of this class
    21      */
    22     public static $instance;
    23 
    24     /**
    25      * this class initialize function
    26      *
    27      * @return void
    28      */
    29     public function init() {
    30         add_action('elementor/element/common/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2);
    31         add_action('elementor/element/section/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2);
    32         add_action('elementor/element/column/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2);
    33 
    34         add_action('elementor/element/container/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2);
    35 
    36         add_action('elementor/element/parse_css', [$this, 'add_post_css'], 10, 2);
    37         add_action('elementor/css-file/post/parse', [$this, 'add_page_settings_css']);
    38 
    39         add_action('elementor/frontend/after_enqueue_scripts', [$this, 'add_custom_css_for_editor']);
    40     }
    41 
    42     /**
    43      * register controls to elementor widget function
    44      *
    45      * @param Controls_Stack $element
    46      * @param [type] $section_id
    47      * @return void
    48      */
    49     public function register_controls(Controls_Stack $element, $section_id) {
    50 
    51         if (!current_user_can('edit_pages') && !current_user_can('unfiltered_html')) {
    52             return;
    53         }
    54 
    55         $element->start_controls_section(
    56             '_custom_css_f_ele',
    57             [
    58                 'label' => esc_html__('Custom CSS for Elementor', 'custom-css-for-elementor'),
    59                 'tab' => Controls_Manager::TAB_ADVANCED,
    60             ]
    61         );
    62 
    63         $element->start_controls_tabs(
    64             'style_tabs'
    65         );
    66 
    67         $element->start_controls_tab(
    68             '_custom_css_desktop',
    69             [
    70                 'label' => '<span class="eicon-device-desktop" title="' . esc_html__('Desktop', 'custom-css-for-elementor') . '"></span>',
    71             ]
    72         );
    73 
    74         $element->add_control(
    75             '_custom_css_f_ele_title_desktop',
    76             [
    77                 'label' => esc_html__('Custom CSS', 'custom-css-for-elementor'),
    78                 'type' => Controls_Manager::HEADING,
    79             ]
    80         );
    81 
    82         $element->add_control(
    83             '_custom_css_f_ele_css_desktop',
    84             [
    85                 'label' => esc_html__('Custom CSS', 'custom-css-for-elementor'),
    86                 'type' => Controls_Manager::CODE,
    87                 'language' => 'css',
    88                 'render_type' => 'ui',
    89                 'show_label' => false,
    90                 'separator' => 'none',
    91             ]
    92         );
    93 
    94         $element->end_controls_tab();
    95 
    96         $element->start_controls_tab(
    97             '_custom_css_tablet',
    98             [
    99                 'label' => '<span class="eicon-device-tablet" title="' . esc_html__('Tablet', 'custom-css-for-elementor') . '"></span>',
    100             ]
    101         );
    102 
    103         $element->add_control(
    104             '_custom_css_f_ele_title_tablet',
    105             [
    106                 'label' => esc_html__('Custom CSS (Tablet)', 'custom-css-for-elementor'),
    107                 'type' => Controls_Manager::HEADING,
    108             ]
    109         );
    110 
    111         $element->add_control(
    112             '_custom_css_f_ele_css_tablet',
    113             [
    114                 'type' => Controls_Manager::CODE,
    115                 'label' => esc_html__('Custom CSS (Tablet)', 'custom-css-for-elementor'),
    116                 'language' => 'css',
    117                 'render_type' => 'ui',
    118                 'show_label' => false,
    119                 'separator' => 'none',
    120             ]
    121         );
    122 
    123         $element->end_controls_tab();
    124 
    125 
    126         $element->start_controls_tab(
    127             '_custom_css_mobile',
    128             [
    129                 'label' => '<span class="eicon-device-mobile" title="' . esc_html__('Mobile', 'custom-css-for-elementor') . '"></span>',
    130             ]
    131         );
    132 
    133         $element->add_control(
    134             '_custom_css_f_ele_title_mobile',
    135             [
    136                 'label' => esc_html__('Custom CSS (Mobile)', 'custom-css-for-elementor'),
    137                 'type' => Controls_Manager::HEADING,
    138             ]
    139         );
    140 
    141         $element->add_control(
    142             '_custom_css_f_ele_css_mobile',
    143             [
    144                 'type' => Controls_Manager::CODE,
    145                 'label' => esc_html__('Custom CSS (Mobile)', 'custom-css-for-elementor'),
    146                 'language' => 'css',
    147                 'render_type' => 'ui',
    148                 'show_label' => false,
    149                 'separator' => 'none',
    150             ]
    151         );
    152 
    153         $element->end_controls_tab();
    154         $element->end_controls_tabs();
    155 
    156         $element->add_control(
    157             '_custom_css_f_ele_description',
    158             [
    159                 'raw' => esc_html__('Use "selector" to target wrapper element. Examples:<br>selector {color: red;} // For main element<br>selector .child-element {margin: 10px;} // For child element<br>.my-class {text-align: center;} // Or use any custom selector', 'custom-css-for-elementor'),
    160                 'type' => Controls_Manager::RAW_HTML,
    161                 'content_classes' => 'elementor-descriptor',
    162             ]
    163         );
    164 
    165         $element->add_control(
    166             '_custom_css_f_ele_notice',
    167             [
    168                 'type' => Controls_Manager::RAW_HTML,
    169                 'raw' => esc_html__('If the CSS is not reflecting in the editor panel or frontend, you need to write a more specific CSS selector.', 'custom-css-for-elementor'),
    170                 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
    171             ]
    172         );
    173 
    174         $element->end_controls_section();
    175     }
    176 
    177     /**
    178      * add custom css function to post function
    179      *
    180      * @param [type] $post_css
    181      * @param [type] $element
    182      * @return void
    183      */
    184     public function add_post_css($post_css, $element) {
    185         if ($post_css instanceof Dynamic_CSS) {
    186             return;
    187         }
    188 
    189         $element_settings = $element->get_settings();
    190 
    191         $sanitize_css = $this->parse_css_to_remove_injecting_code($element_settings, $post_css->get_element_unique_selector($element));
    192 
    193         $post_css->get_stylesheet()->add_raw_css($sanitize_css);
    194     }
    195 
    196     /**
    197      * add custom css function to page function
    198      *
    199      * @param [type] $post_css
    200      * @return void
    201      */
    202     public function add_page_settings_css($post_css) {
    203 
    204         $document = Elementor_Plugin::instance()->documents->get($post_css->get_post_id());
    205 
    206         $element_settings = $document->get_settings();
    207 
    208         $sanitize_css = $this->parse_css_to_remove_injecting_code($element_settings, $document->get_css_wrapper_selector());
    209 
    210         $post_css->get_stylesheet()->add_raw_css($sanitize_css);
    211     }
    212 
    213     /**
    214      * validate css and sanitize css for avoiding injection of malicious code function
    215      *
    216      * @param [type] $raw_css
    217      * @return void
    218      */
    219     public function parse_css_to_remove_injecting_code($element_settings, $unique_selector) {
    220 
    221         $custom_css = '';
    222 
    223         if (empty($element_settings['_custom_css_f_ele_css_desktop']) && empty($element_settings['_custom_css_f_ele_css_tablet']) && empty($element_settings['_custom_css_f_ele_css_mobile'])) {
    224             return;
    225         }
    226 
    227         $custom_css_desktop = trim($element_settings['_custom_css_f_ele_css_desktop']);
    228         $custom_css_tablet = trim($element_settings['_custom_css_f_ele_css_tablet']);
    229         $custom_css_mobile = trim($element_settings['_custom_css_f_ele_css_mobile']);
    230 
    231         if (empty($custom_css_desktop) && empty($custom_css_tablet) && empty($custom_css_mobile)) {
    232             return;
    233         }
    234 
    235         $custom_css .= ((!empty($custom_css_desktop)) ? $custom_css_desktop : "");
    236         $custom_css .= ((!empty($custom_css_tablet)) ? " @media (max-width: 768px) { " . $custom_css_tablet . "}" : "");
    237         $custom_css .= ((!empty($custom_css_mobile)) ? " @media (max-width: 425px) { " . $custom_css_mobile . "}" : "");
    238 
    239         if (empty($custom_css)) {
    240             return;
    241         }
    242 
    243         $custom_css = str_replace('selector', $unique_selector, $custom_css);
    244 
    245         $remove_tags_css = wp_kses($custom_css, []);
    246         $parser = Parser::newFromString($remove_tags_css);
    247         $parsed_css = $parser->parseStylesheet();
    248 
    249         $sanitizer = StylesheetSanitizer::newDefault();
    250         $sanitized_css = $sanitizer->sanitize($parsed_css);
    251         $minified_css = Util::stringify($sanitized_css, ['minify' => true]);
    252 
    253         return $minified_css;
    254     }
    255 
    256     public function get_script_depends() {
    257         return ['editor-css-script'];
    258     }
    259 
    260     public function add_custom_css_for_editor() {
    261         wp_enqueue_script(
    262             'purify',
    263             CUSTOM_CSS_FELE_PLUGIN_URL . 'assets/js/purify.min.js',
    264             [],
    265             '3.0.6',
    266             true
    267         );
    268 
    269         wp_enqueue_script(
    270             'editor-css-script',
    271             CUSTOM_CSS_FELE_PLUGIN_URL . 'assets/js/editor-css-script.js',
    272             ['elementor-frontend', 'purify'],
    273             CUSTOM_CSS_FELE_VERSION,
    274             true
    275         );
    276 
    277         wp_localize_script(
    278             'editor-css-script',
    279             'modelData',
    280             array(
    281                 'postID' => get_the_ID()
    282             )
    283         );
    284     }
    285 
    286     /**
    287      * Returns the *Singleton* instance of this class.
    288      *
    289      * @return Singleton The *Singleton* instance.
    290      */
    291     public static function instance() {
    292         if (null === self::$instance) {
    293             self::$instance = new self();
    294         }
    295         return self::$instance;
    296     }
     18    /**
     19     * @var Singleton The reference the *Singleton* instance of this class
     20     */
     21    public static $instance;
     22    public $default_breakpoints;
     23
     24    /**
     25     * this class initialize function
     26     *
     27     * @return void
     28     */
     29    public function init() {
     30
     31        $this->default_breakpoints = [
     32            'tablet' => 768,
     33            'mobile' => 425
     34        ];
     35
     36        add_action( 'elementor/element/common/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2 );
     37        add_action( 'elementor/element/section/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2 );
     38        add_action( 'elementor/element/column/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2 );
     39
     40        add_action( 'elementor/element/container/_section_responsive/after_section_end', [$this, 'register_controls'], 10, 2 );
     41
     42        add_action( 'elementor/element/parse_css', [$this, 'add_post_css'], 10, 2 );
     43        add_action( 'elementor/css-file/post/parse', [$this, 'add_page_settings_css'] );
     44
     45        add_action( 'elementor/frontend/after_enqueue_scripts', [$this, 'add_custom_css_for_editor'] );
     46    }
     47
     48    /**
     49     * register controls to elementor widget function
     50     *
     51     * @param Controls_Stack $element
     52     * @param [type] $section_id
     53     * @return void
     54     */
     55    public function register_controls( Controls_Stack $element, $section_id ) {
     56
     57        if ( ! current_user_can( 'edit_pages' ) && ! current_user_can( 'unfiltered_html' ) ) {
     58            return;
     59        }
     60
     61        $element->start_controls_section(
     62            '_custom_css_f_ele',
     63            [
     64                'label' => esc_html__( 'Custom CSS for Elementor', 'custom-css-for-elementor' ),
     65                'tab'   => Controls_Manager::TAB_ADVANCED
     66            ]
     67        );
     68
     69        $element->start_controls_tabs(
     70            'style_tabs'
     71        );
     72
     73        $element->start_controls_tab(
     74            '_custom_css_desktop',
     75            [
     76                'label' => '<span class="eicon-device-desktop" title="' . esc_html__( 'Desktop', 'custom-css-for-elementor' ) . '"></span>'
     77            ]
     78        );
     79
     80        $element->add_control(
     81            '_custom_css_f_ele_title_desktop',
     82            [
     83                'label' => esc_html__( 'Custom CSS', 'custom-css-for-elementor' ),
     84                'type'  => Controls_Manager::HEADING
     85            ]
     86        );
     87
     88        $element->add_control(
     89            '_custom_css_f_ele_css_desktop',
     90            [
     91                'label'       => esc_html__( 'Custom CSS', 'custom-css-for-elementor' ),
     92                'type'        => Controls_Manager::CODE,
     93                'language'    => 'css',
     94                'render_type' => 'ui',
     95                'show_label'  => false,
     96                'separator'   => 'none'
     97            ]
     98        );
     99
     100        $element->end_controls_tab();
     101
     102        $element->start_controls_tab(
     103            '_custom_css_tablet',
     104            [
     105                'label' => '<span class="eicon-device-tablet" title="' . esc_html__( 'Tablet', 'custom-css-for-elementor' ) . '"></span>'
     106            ]
     107        );
     108
     109        $element->add_control(
     110            '_custom_css_f_ele_title_tablet',
     111            [
     112                'label' => esc_html__( 'Custom CSS (Tablet)', 'custom-css-for-elementor' ),
     113                'type'  => Controls_Manager::HEADING
     114            ]
     115        );
     116
     117        $element->add_control(
     118            '_custom_css_f_ele_css_tablet',
     119            [
     120                'type'        => Controls_Manager::CODE,
     121                'label'       => esc_html__( 'Custom CSS (Tablet)', 'custom-css-for-elementor' ),
     122                'language'    => 'css',
     123                'render_type' => 'ui',
     124                'show_label'  => false,
     125                'separator'   => 'none'
     126            ]
     127        );
     128
     129        $element->end_controls_tab();
     130
     131        $element->start_controls_tab(
     132            '_custom_css_mobile',
     133            [
     134                'label' => '<span class="eicon-device-mobile" title="' . esc_html__( 'Mobile', 'custom-css-for-elementor' ) . '"></span>'
     135            ]
     136        );
     137
     138        $element->add_control(
     139            '_custom_css_f_ele_title_mobile',
     140            [
     141                'label' => esc_html__( 'Custom CSS (Mobile)', 'custom-css-for-elementor' ),
     142                'type'  => Controls_Manager::HEADING
     143            ]
     144        );
     145
     146        $element->add_control(
     147            '_custom_css_f_ele_css_mobile',
     148            [
     149                'type'        => Controls_Manager::CODE,
     150                'label'       => esc_html__( 'Custom CSS (Mobile)', 'custom-css-for-elementor' ),
     151                'language'    => 'css',
     152                'render_type' => 'ui',
     153                'show_label'  => false,
     154                'separator'   => 'none'
     155            ]
     156        );
     157
     158        $element->end_controls_tab();
     159        $element->end_controls_tabs();
     160
     161        $element->add_control(
     162            '_custom_css_f_ele_description',
     163            [
     164                'raw'             => esc_html__( 'Use "selector" to target wrapper element. Examples:<br>selector {color: red;} // For main element<br>selector .child-element {margin: 10px;} // For child element<br>.my-class {text-align: center;} // Or use any custom selector', 'custom-css-for-elementor' ),
     165                'type'            => Controls_Manager::RAW_HTML,
     166                'content_classes' => 'elementor-descriptor'
     167            ]
     168        );
     169
     170        $element->add_control(
     171            '_custom_css_f_ele_notice',
     172            [
     173                'type'            => Controls_Manager::RAW_HTML,
     174                'raw'             => esc_html__( 'If the CSS is not reflecting in the editor panel or frontend, you need to write a more specific CSS selector.', 'custom-css-for-elementor' ),
     175                'content_classes' => 'elementor-panel-alert elementor-panel-alert-info'
     176            ]
     177        );
     178
     179        $element->end_controls_section();
     180    }
     181
     182    /**
     183     * add custom css function to post function
     184     *
     185     * @param [type] $post_css
     186     * @param [type] $element
     187     * @return void
     188     */
     189    public function add_post_css( $post_css, $element ) {
     190        if ( $post_css instanceof Dynamic_CSS ) {
     191            return;
     192        }
     193
     194        $element_settings = $element->get_settings();
     195
     196        $sanitize_css = $this->parse_css_to_remove_injecting_code( $element_settings, $post_css->get_element_unique_selector( $element ) );
     197
     198        $post_css->get_stylesheet()->add_raw_css( $sanitize_css );
     199    }
     200
     201    /**
     202     * add custom css function to page function
     203     *
     204     * @param [type] $post_css
     205     * @return void
     206     */
     207    public function add_page_settings_css( $post_css ) {
     208
     209        $document = Elementor_Plugin::instance()->documents->get( $post_css->get_post_id() );
     210
     211        $element_settings = $document->get_settings();
     212
     213        $sanitize_css = $this->parse_css_to_remove_injecting_code( $element_settings, $document->get_css_wrapper_selector() );
     214
     215        $post_css->get_stylesheet()->add_raw_css( $sanitize_css );
     216    }
     217
     218    /**
     219     * validate css and sanitize css for avoiding injection of malicious code function
     220     *
     221     * @param [type] $raw_css
     222     * @return void
     223     */
     224    public function parse_css_to_remove_injecting_code( $element_settings, $unique_selector ) {
     225
     226        $custom_css = '';
     227
     228        if ( empty( $element_settings['_custom_css_f_ele_css_desktop'] ) && empty( $element_settings['_custom_css_f_ele_css_tablet'] ) && empty( $element_settings['_custom_css_f_ele_css_mobile'] ) ) {
     229            return;
     230        }
     231
     232        $custom_css_desktop = trim( $element_settings['_custom_css_f_ele_css_desktop'] );
     233        $custom_css_tablet  = trim( $element_settings['_custom_css_f_ele_css_tablet'] );
     234        $custom_css_mobile  = trim( $element_settings['_custom_css_f_ele_css_mobile'] );
     235
     236        if ( empty( $custom_css_desktop ) && empty( $custom_css_tablet ) && empty( $custom_css_mobile ) ) {
     237            return;
     238        }
     239
     240        $this->default_breakpoints = apply_filters( 'custom_css_for_elementor_breakpoints', $this->default_breakpoints );
     241
     242        $custom_css .= ( ( ! empty( $custom_css_desktop ) ) ? $custom_css_desktop : '' );
     243        $custom_css .= ( ( ! empty( $custom_css_tablet ) ) ? ' @media (max-width: ' . $this->default_breakpoints['tablet'] . 'px) { ' . $custom_css_tablet . '}' : '' );
     244        $custom_css .= ( ( ! empty( $custom_css_mobile ) ) ? ' @media (max-width: ' . $this->default_breakpoints['mobile'] . 'px) { ' . $custom_css_mobile . '}' : '' );
     245
     246        if ( empty( $custom_css ) ) {
     247            return;
     248        }
     249
     250        $custom_css = str_replace( 'selector', $unique_selector, $custom_css );
     251
     252        $remove_tags_css = wp_kses( $custom_css, [] );
     253        $parser          = Parser::newFromString( $remove_tags_css );
     254        $parsed_css      = $parser->parseStylesheet();
     255
     256        $sanitizer     = StylesheetSanitizer::newDefault();
     257        $sanitized_css = $sanitizer->sanitize( $parsed_css );
     258        $minified_css  = Util::stringify( $sanitized_css, ['minify' => true] );
     259
     260        return $minified_css;
     261    }
     262
     263    public function get_script_depends() {
     264        return ['editor-css-script'];
     265    }
     266
     267    public function add_custom_css_for_editor() {
     268        wp_enqueue_script(
     269            'purify',
     270            CUSTOM_CSS_FELE_PLUGIN_URL . 'assets/js/purify.min.js',
     271            [],
     272            '3.0.6',
     273            true
     274        );
     275
     276        wp_enqueue_script(
     277            'editor-css-script',
     278            CUSTOM_CSS_FELE_PLUGIN_URL . 'assets/js/editor-css-script.js',
     279            ['elementor-frontend', 'purify'],
     280            CUSTOM_CSS_FELE_VERSION,
     281            true
     282        );
     283
     284        $this->default_breakpoints = apply_filters( 'custom_css_for_elementor_breakpoints', $this->default_breakpoints );
     285
     286        wp_localize_script(
     287            'editor-css-script',
     288            'modelData',
     289            [
     290                'postID'      => get_the_ID(),
     291                'breakpoints' => $this->default_breakpoints
     292            ]
     293        );
     294    }
     295
     296    /**
     297     * Returns the *Singleton* instance of this class.
     298     *
     299     * @return Singleton The *Singleton* instance.
     300     */
     301    public static function instance() {
     302        if ( null === self::$instance ) {
     303            self::$instance = new self();
     304        }
     305
     306        return self::$instance;
     307    }
    297308}
  • custom-css-for-elementor/trunk/plugin.php

    r2979212 r3202104  
    44
    55// If this file is called directly, abort.
    6 defined('ABSPATH') || exit;
     6defined( 'ABSPATH' ) || exit;
    77
    88/**
     
    1111 */
    1212final class Plugin {
    13     /**
    14     * @var Singleton The reference the *Singleton* instance of this class
    15     */
    16     public static $instance;
     13    /**
     14    * @var Singleton The reference the *Singleton* instance of this class
     15    */
     16    public static $instance;
    1717
    18     /**
    19     * elementor required version
    20     */
    21     const CCFE_MINIMUM_ELE_VER = '3.9.0';
     18    /**
     19    * elementor required version
     20    */
     21    const CCFE_MINIMUM_ELE_VER = '3.9.0';
    2222
    23     /**
    24     * php required version
    25     */
    26     const CCFE_MINIMUM_PHP_VER = '5.6';
     23    /**
     24    * php required version
     25    */
     26    const CCFE_MINIMUM_PHP_VER = '5.6';
    2727
    28     /**
    29     * class constructor function
    30     */
    31     public function __construct() {
    32         $this->define_constants();
    33     }
     28    /**
     29    * class constructor function
     30    */
     31    public function __construct() {
     32        $this->define_constants();
     33    }
    3434
    35     /**
    36     * constent declare function
    37     *
    38     * @return void
    39     */
    40     public function define_constants() {
    41         define('CUSTOM_CSS_FELE_VERSION', '2.0.0');
    42         define('CUSTOM_CSS_FELE_PACKAGE', 'free');
    43         define('CUSTOM_CSS_FELE_PLUGIN_URL', plugin_dir_url(__FILE__));
    44         define('CUSTOM_CSS_FELE_PLUGIN_DIR', plugin_dir_path(__FILE__));
    45     }
     35    /**
     36    * constent declare function
     37    *
     38    * @return void
     39    */
     40    public function define_constants() {
     41        define( 'CUSTOM_CSS_FELE_VERSION', '2.1.0' );
     42        define( 'CUSTOM_CSS_FELE_PACKAGE', 'free' );
     43        define( 'CUSTOM_CSS_FELE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     44        define( 'CUSTOM_CSS_FELE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     45    }
    4646
    47     /**
    48     * init function of plugin
    49     *
    50     * @return void
    51     */
    52     public function init() {
     47    /**
     48    * init function of plugin
     49    *
     50    * @return void
     51    */
     52    public function init() {
    5353
    54         // Check if Elementor installed and activated
    55         if (!did_action('elementor/loaded')) {
    56             add_action('admin_notices', [$this, 'admin_notice_missing_main_plugin']);
    57             return;
    58         }
     54        // Check if Elementor installed and activated
     55        if ( ! did_action( 'elementor/loaded' ) ) {
     56            add_action( 'admin_notices', [$this, 'admin_notice_missing_main_plugin'] );
    5957
    60         // Check for required Elementor version
    61         if (!version_compare(ELEMENTOR_VERSION, self::CCFE_MINIMUM_ELE_VER, '>=')) {
    62             add_action('admin_notices', [$this, 'admin_notice_minimum_elementor_version']);
    63             return;
    64         }
     58            return;
     59        }
    6560
    66         // Check for required PHP version
    67         if (version_compare(PHP_VERSION, self::CCFE_MINIMUM_PHP_VER, '<')) {
    68             add_action('admin_notices', [$this, 'admin_notice_minimum_php_version']);
    69             return;
    70         }
     61        // Check for required Elementor version
     62        if ( ! version_compare( ELEMENTOR_VERSION, self::CCFE_MINIMUM_ELE_VER, '>=' ) ) {
     63            add_action( 'admin_notices', [$this, 'admin_notice_minimum_elementor_version'] );
    7164
    72         if (!class_exists('Custom_Css_FEle\Inc\Hook_Action')) {
    73             include_once CUSTOM_CSS_FELE_PLUGIN_DIR . 'inc/hook-action.php';
    74         }
     65            return;
     66        }
    7567
    76         Inc\Hook_Action::instance()->init();
    77     }
     68        // Check for required PHP version
     69        if ( version_compare( PHP_VERSION, self::CCFE_MINIMUM_PHP_VER, '<' ) ) {
     70            add_action( 'admin_notices', [$this, 'admin_notice_minimum_php_version'] );
    7871
    79     /**
    80      * admin notice for missing depended plugin function
    81      *
    82      * @return void
    83      */
    84     public function admin_notice_missing_main_plugin() {
     72            return;
     73        }
    8574
    86         if (file_exists(WP_PLUGIN_DIR . '/elementor/elementor.php')) {
    87             $notice_title = esc_html__('Activate Elementor', 'custom-css-for-elementor');
    88             $notice_url = wp_nonce_url('plugins.php?action=activate&plugin=elementor/elementor.php&plugin_status=all&paged=1', 'activate-plugin_elementor/elementor.php');
    89         } else {
    90             $notice_title = esc_html__('Install Elementor', 'custom-css-for-elementor');
    91             $notice_url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=elementor'), 'install-plugin_elementor');
    92         }
     75        if ( ! class_exists( 'Custom_Css_FEle\Inc\Hook_Action' ) ) {
     76            include_once CUSTOM_CSS_FELE_PLUGIN_DIR . 'inc/hook-action.php';
     77        }
    9378
    94         $message = sprintf(
    95             /* translators: 1: Plugin name 2: Elementor */
    96             esc_html__('"%1$s" requires "%2$s" to be installed and activated. %3$s', 'custom-css-for-elementor'),
    97             '<strong>' . esc_html__('Custom CSS for Elementor', 'custom-css-for-elementor') . '</strong>',
    98             '<strong>' . esc_html__('Elementor', 'custom-css-for-elementor') . '</strong>',
    99             '<a href="' . esc_url($notice_url) . '">' . $notice_title . '</a>'
    100         );
     79        Inc\Hook_Action::instance()->init();
     80    }
    10181
    102         printf('<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message);
    103     }
     82    /**
     83     * admin notice for missing depended plugin function
     84     *
     85     * @return void
     86     */
     87    public function admin_notice_missing_main_plugin() {
    10488
    105     /**
    106      * admin notice for minimum version required plugin function
    107      *
    108      * @return void
    109      */
    110     public function admin_notice_minimum_elementor_version() {
     89        if ( file_exists( WP_PLUGIN_DIR . '/elementor/elementor.php' ) ) {
     90            $notice_title = esc_html__( 'Activate Elementor', 'custom-css-for-elementor' );
     91            $notice_url   = wp_nonce_url( 'plugins.php?action=activate&plugin=elementor/elementor.php&plugin_status=all&paged=1', 'activate-plugin_elementor/elementor.php' );
     92        } else {
     93            $notice_title = esc_html__( 'Install Elementor', 'custom-css-for-elementor' );
     94            $notice_url   = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
     95        }
    11196
    112         $message = sprintf(
    113             /* translators: 1: Plugin name 2: Elementor 3: Required Elementor version */
    114             esc_html__('"%1$s" requires "%2$s" version %3$s or greater.', 'custom-css-for-elementor'),
    115             '<strong>' . esc_html__('Custom CSS for Elementor', 'custom-css-for-elementor') . '</strong>',
    116             '<strong>' . esc_html__('Elementor', 'custom-css-for-elementor') . '</strong>',
    117             self::CCFE_MINIMUM_ELE_VER
    118         );
     97        $message = sprintf(
     98            /* translators: 1: Plugin name 2: Required on 3: Required version*/
     99            esc_html__( '"%1$s" requires "%2$s" to be installed and activated. %3$s', 'custom-css-for-elementor' ),
     100            '<strong>' . esc_html__( 'Custom CSS for Elementor', 'custom-css-for-elementor' ) . '</strong>',
     101            '<strong>' . esc_html__( 'Elementor', 'custom-css-for-elementor' ) . '</strong>',
     102            '<a href="' . esc_url( $notice_url ) . '">' . $notice_title . '</a>'
     103        );
    119104
    120         printf('<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message);
    121     }
     105        printf( '<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message );
     106    }
    122107
    123     /**
    124      * admin notice for minimum version php required function
    125     *
    126     * @return void
    127     */
    128     public function admin_notice_minimum_php_version() {
     108    /**
     109     * admin notice for minimum version required plugin function
     110    *
     111    * @return void
     112    */
     113    public function admin_notice_minimum_elementor_version() {
    129114
    130         $message = sprintf(
    131             /* translators: 1: Plugin name 2: PHP 3: Required PHP version */
    132             esc_html__('"%1$s" requires "%2$s" version %3$s or greater.', 'custom-css-for-elementor'),
    133             '<strong>' . esc_html__('Custom CSS for Elementor', 'custom-css-for-elementor') . '</strong>',
    134             '<strong>' . esc_html__('PHP', 'custom-css-for-elementor') . '</strong>',
    135             self::CCFE_MINIMUM_PHP_VER
    136         );
     115        $message = sprintf(
     116            /* translators: 1: Plugin name 2: Required on 3: Required version */
     117            esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'custom-css-for-elementor' ),
     118            '<strong>' . esc_html__( 'Custom CSS for Elementor', 'custom-css-for-elementor' ) . '</strong>',
     119            '<strong>' . esc_html__( 'Elementor', 'custom-css-for-elementor' ) . '</strong>',
     120            self::CCFE_MINIMUM_ELE_VER
     121        );
    137122
    138         printf('<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message);
    139     }
     123        printf( '<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message );
     124    }
    140125
    141     /**
    142      * Returns the *Singleton* instance of this class.
    143      *
    144      * @return Singleton The *Singleton* instance.
    145      */
    146     public static function instance() {
    147         if (null === self::$instance) {
    148             self::$instance = new self();
    149         }
    150         return self::$instance;
    151     }
     126    /**
     127     * admin notice for minimum version php required function
     128     *
     129     * @return void
     130     */
     131    public function admin_notice_minimum_php_version() {
     132
     133        $message = sprintf(
     134            /* translators: 1: Plugin name 2: Required on 3: Required version */
     135            esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'custom-css-for-elementor' ),
     136            '<strong>' . esc_html__( 'Custom CSS for Elementor', 'custom-css-for-elementor' ) . '</strong>',
     137            '<strong>' . esc_html__( 'PHP', 'custom-css-for-elementor' ) . '</strong>',
     138            self::CCFE_MINIMUM_PHP_VER
     139        );
     140
     141        printf( '<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message );
     142    }
     143
     144    /**
     145     * Returns the *Singleton* instance of this class.
     146     *
     147     * @return Singleton The *Singleton* instance.
     148     */
     149    public static function instance() {
     150        if ( null === self::$instance ) {
     151            self::$instance = new self();
     152        }
     153
     154        return self::$instance;
     155    }
    152156}
  • custom-css-for-elementor/trunk/readme.txt

    r2979212 r3202104  
    11=== Custom CSS for Elementor ===
     2Plugin Name: Custom CSS for Elementor
     3Version: 2.1.0
     4Author: Sayedul Sayem
     5Author URI: https://sayedulsayem.com/
    26Contributors: sayedulsayem, ikamal, gtarafdarr
    37Tags: elementor, css, custom css, responsive css, elementor addons
    48Requires at least: 5.0
    5 Tested up to: 6.3.2
    6 Requires PHP: 5.6
    7 Stable tag: 2.0.0
     9Tested up to: 6.7
     10Requires PHP: 7.4
     11Stable tag: 2.1.0
    812License: GPL v3 or later
    913License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    5761* It works with any Elementor widget and other third-party Elementor addons widgets too.
    5862
     63### 💻 How to Change Breakpoints in WordPress
     64To modify breakpoints for tablet and mobile devices in WordPress, you can add custom code to your theme's `functions.php` file. Breakpoints determine when your website layout switches between different screen sizes, ensuring optimal display across devices.
     65
     66#### Changing Tablet Breakpoint
     67To adjust the breakpoint for tablets, follow these steps:
     68
     691. Open your WordPress theme's `functions.php` file.
     702. Add the following PHP code snippet:
     71
     72```php
     73add_filter( 'custom_css_for_elementor_breakpoints' , function( $default_breakpoints ) {
     74    $default_breakpoints['tablet'] = 768; // change this value
     75    return $default_breakpoints;
     76}, 20, 1);
     77```
     783. Save the file.
     79
     80#### Changing Mobile Breakpoint
     81To customize the breakpoint for mobile devices, use the following instructions:
     82
     831. Navigate to your theme's `functions.php` file.
     842. Insert the following PHP code:
     85
     86```php
     87add_filter( 'custom_css_for_elementor_breakpoints' , function( $default_breakpoints ) {
     88    $default_breakpoints['mobile'] = 425; // change this value
     89    return $default_breakpoints;
     90}, 20, 1);
     91```
     923. Save the changes.
     93
     94By adjusting these breakpoints, you can fine-tune your website's responsiveness and ensure a seamless viewing experience across various devices.
     95
    5996
    6097### **PRIVACY POLICY**
     
    104141== Changelog ==
    105142
     143= 2.1.0 =
     144
     145- New: Filter added for changing breakpoints.
     146
    106147= 2.0.0 =
    107148
  • custom-css-for-elementor/trunk/vendor/autoload.php

    r2979212 r3202104  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit89ceebd147ade89d01e60cb732f065bf::getLoader();
     25return ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9::getLoader();
  • custom-css-for-elementor/trunk/vendor/composer/autoload_real.php

    r2979212 r3202104  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit89ceebd147ade89d01e60cb732f065bf
     5class ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit89ceebd147ade89d01e60cb732f065bf', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit89ceebd147ade89d01e60cb732f065bf', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::getInitializer($loader));
    3333
    3434        $loader->register(true);
    3535
    36         $filesToLoad = \Composer\Autoload\ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::$files;
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$files;
    3737        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
    3838            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • custom-css-for-elementor/trunk/vendor/composer/autoload_static.php

    r2979212 r3202104  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit89ceebd147ade89d01e60cb732f065bf
     7class ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9
    88{
    99    public static $files = array (
     
    4040    {
    4141        return \Closure::bind(function () use ($loader) {
    42             $loader->prefixLengthsPsr4 = ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::$prefixLengthsPsr4;
    43             $loader->prefixDirsPsr4 = ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::$prefixDirsPsr4;
    44             $loader->classMap = ComposerStaticInit89ceebd147ade89d01e60cb732f065bf::$classMap;
     42            $loader->prefixLengthsPsr4 = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$prefixLengthsPsr4;
     43            $loader->prefixDirsPsr4 = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$prefixDirsPsr4;
     44            $loader->classMap = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$classMap;
    4545
    4646        }, null, ClassLoader::class);
  • custom-css-for-elementor/trunk/vendor/composer/installed.json

    r2979212 r3202104  
    168168        }
    169169    ],
    170     "dev": true,
     170    "dev": false,
    171171    "dev-package-names": []
    172172}
  • custom-css-for-elementor/trunk/vendor/composer/installed.php

    r2979212 r3202104  
    11<?php return array(
    22    'root' => array(
    3         'name' => '__root__',
     3        'name' => 'sayedulsayem/custom-css-for-elementor',
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'a6aae11540b676b742465a618c7174ef4c1c89b6',
    7         'type' => 'library',
     6        'reference' => 'bbd25cb5ee020f2758bb911f1ce0563dfbf0e50e',
     7        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
    99        'aliases' => array(),
    10         'dev' => true,
     10        'dev' => false,
    1111    ),
    1212    'versions' => array(
    13         '__root__' => array(
     13        'sayedulsayem/custom-css-for-elementor' => array(
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => 'a6aae11540b676b742465a618c7174ef4c1c89b6',
    17             'type' => 'library',
     16            'reference' => 'bbd25cb5ee020f2758bb911f1ce0563dfbf0e50e',
     17            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
    1919            'aliases' => array(),
Note: See TracChangeset for help on using the changeset viewer.