Changeset 3202104
- Timestamp:
- 12/04/2024 07:05:45 AM (16 months ago)
- Location:
- custom-css-for-elementor
- Files:
-
- 22 edited
- 1 copied
-
tags/2.1.0 (copied) (copied from custom-css-for-elementor/trunk)
-
tags/2.1.0/assets/js/editor-css-script.js (modified) (1 diff)
-
tags/2.1.0/custom-css-for-elementor.php (modified) (3 diffs)
-
tags/2.1.0/i18n/custom-css-for-elementor.pot (modified) (5 diffs)
-
tags/2.1.0/inc/hook-action.php (modified) (1 diff)
-
tags/2.1.0/plugin.php (modified) (2 diffs)
-
tags/2.1.0/readme.txt (modified) (3 diffs)
-
tags/2.1.0/vendor/autoload.php (modified) (1 diff)
-
tags/2.1.0/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/2.1.0/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/2.1.0/vendor/composer/installed.json (modified) (1 diff)
-
tags/2.1.0/vendor/composer/installed.php (modified) (1 diff)
-
trunk/assets/js/editor-css-script.js (modified) (1 diff)
-
trunk/custom-css-for-elementor.php (modified) (3 diffs)
-
trunk/i18n/custom-css-for-elementor.pot (modified) (5 diffs)
-
trunk/inc/hook-action.php (modified) (1 diff)
-
trunk/plugin.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.json (modified) (1 diff)
-
trunk/vendor/composer/installed.php (modified) (1 diff)
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 = '';1 jQuery( window ).on( 'elementor/frontend/init', function () { 2 function addCustomCss ( css, context ) { 3 if ( !context ) { 4 return; 5 } 6 var customCss = ''; 7 7 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' ); 12 12 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 + '}' : ''; 16 16 17 if (!customCss) {18 return;19 }17 if ( !customCss ) { 18 return; 19 } 20 20 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' ); 22 22 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 } 26 26 27 if (customCss) {28 css += customCss.replaceAll('selector', selector);29 }27 if ( customCss ) { 28 css += customCss.replaceAll( 'selector', selector ); 29 } 30 30 31 return DOMPurify.sanitize(css, { CSS: true });32 }31 return DOMPurify.sanitize( css, { CSS: true } ); 32 } 33 33 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 3 3 * Plugin Name: Custom CSS for Elementor 4 4 * 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 8 10 * Author URI: https://sayedulsayem.com/ 9 11 * Text Domain: custom-css-for-elementor … … 11 13 * License: GPL v3 or later 12 14 * License URI: https://www.gnu.org/licenses/gpl-3.0.html 13 * Elementor tested up to: 3. 1614 * Elementor Pro tested up to: 3. 1615 * Elementor tested up to: 3.25 16 * Elementor Pro tested up to: 3.25 15 17 */ 16 18 17 18 19 // If this file is called directly, abort. 19 defined( 'ABSPATH') || exit;20 defined( 'ABSPATH' ) || exit; 20 21 21 22 // include the autoloader file … … 28 29 * load plugin after initialize wordpress core 29 30 */ 30 add_action( 'plugins_loaded', function () {31 Custom_Css_FEle\Plugin::instance()->init();32 } );31 add_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) 202 3 sayedulsayem1 # Copyright (C) 2024 Sayedul Sayem 2 2 # This file is distributed under the GPL v3 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Custom CSS for Elementor 2. 0.0\n"5 "Project-Id-Version: Custom CSS for Elementor 2.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/custom-css-for-elementor\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-10-15T14:06:07+00:00\n"12 "POT-Creation-Date: 2024-12-04T06:43:33+00:00\n" 13 13 "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" 15 15 "X-Domain: custom-css-for-elementor\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: inc/hook-action.php:58 18 #: custom-css-for-elementor.php 19 #: inc/hook-action.php:65 19 20 #: plugin.php:97 20 21 #: plugin.php:115 … … 24 25 25 26 #. Plugin URI of the plugin 27 #: custom-css-for-elementor.php 26 28 msgid "https://wordpress.org/plugins/custom-css-for-elementor/" 27 29 msgstr "" 28 30 29 31 #. Description of the plugin 32 #: custom-css-for-elementor.php 30 33 msgid "A lightweight plugin that open an option to add custom CSS code for each device (desktop, tablets, mobiles) by elementor widgets." 31 34 msgstr "" 32 35 33 36 #. Author of the plugin 34 msgid "sayedulsayem" 37 #: custom-css-for-elementor.php 38 msgid "Sayedul Sayem" 35 39 msgstr "" 36 40 37 41 #. Author URI of the plugin 42 #: custom-css-for-elementor.php 38 43 msgid "https://sayedulsayem.com/" 39 44 msgstr "" 40 45 41 #: inc/hook-action.php:7 046 #: inc/hook-action.php:77 42 47 msgid "Desktop" 43 48 msgstr "" 44 49 45 #: inc/hook-action.php: 7746 #: inc/hook-action.php: 8550 #: inc/hook-action.php:84 51 #: inc/hook-action.php:92 47 52 msgid "Custom CSS" 48 53 msgstr "" 49 54 50 #: inc/hook-action.php: 9955 #: inc/hook-action.php:106 51 56 msgid "Tablet" 52 57 msgstr "" 53 58 54 #: inc/hook-action.php:1 0655 #: inc/hook-action.php:1 1559 #: inc/hook-action.php:113 60 #: inc/hook-action.php:122 56 61 msgid "Custom CSS (Tablet)" 57 62 msgstr "" 58 63 59 #: inc/hook-action.php:1 2964 #: inc/hook-action.php:136 60 65 msgid "Mobile" 61 66 msgstr "" 62 67 63 #: inc/hook-action.php:1 3664 #: inc/hook-action.php:1 4568 #: inc/hook-action.php:143 69 #: inc/hook-action.php:152 65 70 msgid "Custom CSS (Mobile)" 66 71 msgstr "" 67 72 68 #: inc/hook-action.php:1 5973 #: inc/hook-action.php:166 69 74 msgid "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" 70 75 msgstr "" 71 76 72 #: inc/hook-action.php:1 6977 #: inc/hook-action.php:176 73 78 msgid "If the CSS is not reflecting in the editor panel or frontend, you need to write a more specific CSS selector." 74 79 msgstr "" … … 82 87 msgstr "" 83 88 84 #. translators: 1: Plugin name 2: Elementor89 #. translators: 1: Plugin name 2: Required on 3: Required version 85 90 #: plugin.php:96 86 91 msgid "\"%1$s\" requires \"%2$s\" to be installed and activated. %3$s" … … 92 97 msgstr "" 93 98 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 96 100 #: plugin.php:114 97 101 #: plugin.php:132 -
custom-css-for-elementor/tags/2.1.0/inc/hook-action.php
r2979212 r3202104 4 4 5 5 // If this file is called directly, abort. 6 defined('ABSPATH') || exit; 7 6 defined( 'ABSPATH' ) || exit; 7 8 use Wikimedia\CSS\Util; 9 use Elementor\Controls_Stack; 8 10 use Elementor\Controls_Manager; 9 use Elementor\Controls_Stack; 11 use Wikimedia\CSS\Parser\Parser; 12 use Elementor\Plugin as Elementor_Plugin; 10 13 use Elementor\Core\DynamicTags\Dynamic_CSS; 11 use Elementor\Plugin as Elementor_Plugin;12 13 use Wikimedia\CSS\Parser\Parser;14 14 use Wikimedia\CSS\Sanitizer\StylesheetSanitizer; 15 use Wikimedia\CSS\Util;16 15 17 16 class Hook_Action { 18 17 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 } 297 308 } -
custom-css-for-elementor/tags/2.1.0/plugin.php
r2979212 r3202104 4 4 5 5 // If this file is called directly, abort. 6 defined( 'ABSPATH') || exit;6 defined( 'ABSPATH' ) || exit; 7 7 8 8 /** … … 11 11 */ 12 12 final class Plugin { 13 /**14 * @var Singleton The reference the *Singleton* instance of this class15 */16 public static $instance;13 /** 14 * @var Singleton The reference the *Singleton* instance of this class 15 */ 16 public static $instance; 17 17 18 /**19 * elementor required version20 */21 const CCFE_MINIMUM_ELE_VER = '3.9.0';18 /** 19 * elementor required version 20 */ 21 const CCFE_MINIMUM_ELE_VER = '3.9.0'; 22 22 23 /**24 * php required version25 */26 const CCFE_MINIMUM_PHP_VER = '5.6';23 /** 24 * php required version 25 */ 26 const CCFE_MINIMUM_PHP_VER = '5.6'; 27 27 28 /**29 * class constructor function30 */31 public function __construct() {32 $this->define_constants();33 }28 /** 29 * class constructor function 30 */ 31 public function __construct() { 32 $this->define_constants(); 33 } 34 34 35 /**36 * constent declare function37 *38 * @return void39 */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 } 46 46 47 /**48 * init function of plugin49 *50 * @return void51 */52 public function init() {47 /** 48 * init function of plugin 49 * 50 * @return void 51 */ 52 public function init() { 53 53 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'] ); 59 57 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 } 65 60 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'] ); 71 64 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 } 75 67 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'] ); 78 71 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 } 85 74 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 } 93 78 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 } 101 81 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() { 104 88 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 } 111 96 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 ); 119 104 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 } 122 107 123 /**124 * admin notice for minimum version php requiredfunction125 *126 * @return void127 */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() { 129 114 130 $message = sprintf(131 /* translators: 1: Plugin name 2: PHP 3: Required PHPversion */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_VER136 );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 ); 137 122 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 } 140 125 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 } 152 156 } -
custom-css-for-elementor/tags/2.1.0/readme.txt
r2979212 r3202104 1 1 === Custom CSS for Elementor === 2 Plugin Name: Custom CSS for Elementor 3 Version: 2.1.0 4 Author: Sayedul Sayem 5 Author URI: https://sayedulsayem.com/ 2 6 Contributors: sayedulsayem, ikamal, gtarafdarr 3 7 Tags: elementor, css, custom css, responsive css, elementor addons 4 8 Requires at least: 5.0 5 Tested up to: 6. 3.26 Requires PHP: 5.67 Stable tag: 2. 0.09 Tested up to: 6.7 10 Requires PHP: 7.4 11 Stable tag: 2.1.0 8 12 License: GPL v3 or later 9 13 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 57 61 * It works with any Elementor widget and other third-party Elementor addons widgets too. 58 62 63 ### 💻 How to Change Breakpoints in WordPress 64 To 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 67 To adjust the breakpoint for tablets, follow these steps: 68 69 1. Open your WordPress theme's `functions.php` file. 70 2. Add the following PHP code snippet: 71 72 ```php 73 add_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 ``` 78 3. Save the file. 79 80 #### Changing Mobile Breakpoint 81 To customize the breakpoint for mobile devices, use the following instructions: 82 83 1. Navigate to your theme's `functions.php` file. 84 2. Insert the following PHP code: 85 86 ```php 87 add_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 ``` 92 3. Save the changes. 93 94 By adjusting these breakpoints, you can fine-tune your website's responsiveness and ensure a seamless viewing experience across various devices. 95 59 96 60 97 ### **PRIVACY POLICY** … … 104 141 == Changelog == 105 142 143 = 2.1.0 = 144 145 - New: Filter added for changing breakpoints. 146 106 147 = 2.0.0 = 107 148 -
custom-css-for-elementor/tags/2.1.0/vendor/autoload.php
r2979212 r3202104 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 89ceebd147ade89d01e60cb732f065bf::getLoader();25 return ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9::getLoader(); -
custom-css-for-elementor/tags/2.1.0/vendor/composer/autoload_real.php
r2979212 r3202104 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 89ceebd147ade89d01e60cb732f065bf5 class ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 89ceebd147ade89d01e60cb732f065bf', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 89ceebd147ade89d01e60cb732f065bf', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::getInitializer($loader)); 33 33 34 34 $loader->register(true); 35 35 36 $filesToLoad = \Composer\Autoload\ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::$files;36 $filesToLoad = \Composer\Autoload\ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$files; 37 37 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 38 38 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
custom-css-for-elementor/tags/2.1.0/vendor/composer/autoload_static.php
r2979212 r3202104 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf7 class ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9 8 8 { 9 9 public static $files = array ( … … 40 40 { 41 41 return \Closure::bind(function () use ($loader) { 42 $loader->prefixLengthsPsr4 = ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::$prefixLengthsPsr4;43 $loader->prefixDirsPsr4 = ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::$prefixDirsPsr4;44 $loader->classMap = ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::$classMap;42 $loader->prefixLengthsPsr4 = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$prefixLengthsPsr4; 43 $loader->prefixDirsPsr4 = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$prefixDirsPsr4; 44 $loader->classMap = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$classMap; 45 45 46 46 }, null, ClassLoader::class); -
custom-css-for-elementor/tags/2.1.0/vendor/composer/installed.json
r2979212 r3202104 168 168 } 169 169 ], 170 "dev": true,170 "dev": false, 171 171 "dev-package-names": [] 172 172 } -
custom-css-for-elementor/tags/2.1.0/vendor/composer/installed.php
r2979212 r3202104 1 1 <?php return array( 2 2 'root' => array( 3 'name' => ' __root__',3 'name' => 'sayedulsayem/custom-css-for-elementor', 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' a6aae11540b676b742465a618c7174ef4c1c89b6',7 'type' => ' library',6 'reference' => 'bbd25cb5ee020f2758bb911f1ce0563dfbf0e50e', 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', 9 9 'aliases' => array(), 10 'dev' => true,10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 ' __root__' => array(13 'sayedulsayem/custom-css-for-elementor' => array( 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' a6aae11540b676b742465a618c7174ef4c1c89b6',17 'type' => ' library',16 'reference' => 'bbd25cb5ee020f2758bb911f1ce0563dfbf0e50e', 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', 19 19 '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 = '';1 jQuery( window ).on( 'elementor/frontend/init', function () { 2 function addCustomCss ( css, context ) { 3 if ( !context ) { 4 return; 5 } 6 var customCss = ''; 7 7 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' ); 12 12 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 + '}' : ''; 16 16 17 if (!customCss) {18 return;19 }17 if ( !customCss ) { 18 return; 19 } 20 20 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' ); 22 22 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 } 26 26 27 if (customCss) {28 css += customCss.replaceAll('selector', selector);29 }27 if ( customCss ) { 28 css += customCss.replaceAll( 'selector', selector ); 29 } 30 30 31 return DOMPurify.sanitize(css, { CSS: true });32 }31 return DOMPurify.sanitize( css, { CSS: true } ); 32 } 33 33 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 3 3 * Plugin Name: Custom CSS for Elementor 4 4 * 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 8 10 * Author URI: https://sayedulsayem.com/ 9 11 * Text Domain: custom-css-for-elementor … … 11 13 * License: GPL v3 or later 12 14 * License URI: https://www.gnu.org/licenses/gpl-3.0.html 13 * Elementor tested up to: 3. 1614 * Elementor Pro tested up to: 3. 1615 * Elementor tested up to: 3.25 16 * Elementor Pro tested up to: 3.25 15 17 */ 16 18 17 18 19 // If this file is called directly, abort. 19 defined( 'ABSPATH') || exit;20 defined( 'ABSPATH' ) || exit; 20 21 21 22 // include the autoloader file … … 28 29 * load plugin after initialize wordpress core 29 30 */ 30 add_action( 'plugins_loaded', function () {31 Custom_Css_FEle\Plugin::instance()->init();32 } );31 add_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) 202 3 sayedulsayem1 # Copyright (C) 2024 Sayedul Sayem 2 2 # This file is distributed under the GPL v3 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Custom CSS for Elementor 2. 0.0\n"5 "Project-Id-Version: Custom CSS for Elementor 2.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/custom-css-for-elementor\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-10-15T14:06:07+00:00\n"12 "POT-Creation-Date: 2024-12-04T06:43:33+00:00\n" 13 13 "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" 15 15 "X-Domain: custom-css-for-elementor\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: inc/hook-action.php:58 18 #: custom-css-for-elementor.php 19 #: inc/hook-action.php:65 19 20 #: plugin.php:97 20 21 #: plugin.php:115 … … 24 25 25 26 #. Plugin URI of the plugin 27 #: custom-css-for-elementor.php 26 28 msgid "https://wordpress.org/plugins/custom-css-for-elementor/" 27 29 msgstr "" 28 30 29 31 #. Description of the plugin 32 #: custom-css-for-elementor.php 30 33 msgid "A lightweight plugin that open an option to add custom CSS code for each device (desktop, tablets, mobiles) by elementor widgets." 31 34 msgstr "" 32 35 33 36 #. Author of the plugin 34 msgid "sayedulsayem" 37 #: custom-css-for-elementor.php 38 msgid "Sayedul Sayem" 35 39 msgstr "" 36 40 37 41 #. Author URI of the plugin 42 #: custom-css-for-elementor.php 38 43 msgid "https://sayedulsayem.com/" 39 44 msgstr "" 40 45 41 #: inc/hook-action.php:7 046 #: inc/hook-action.php:77 42 47 msgid "Desktop" 43 48 msgstr "" 44 49 45 #: inc/hook-action.php: 7746 #: inc/hook-action.php: 8550 #: inc/hook-action.php:84 51 #: inc/hook-action.php:92 47 52 msgid "Custom CSS" 48 53 msgstr "" 49 54 50 #: inc/hook-action.php: 9955 #: inc/hook-action.php:106 51 56 msgid "Tablet" 52 57 msgstr "" 53 58 54 #: inc/hook-action.php:1 0655 #: inc/hook-action.php:1 1559 #: inc/hook-action.php:113 60 #: inc/hook-action.php:122 56 61 msgid "Custom CSS (Tablet)" 57 62 msgstr "" 58 63 59 #: inc/hook-action.php:1 2964 #: inc/hook-action.php:136 60 65 msgid "Mobile" 61 66 msgstr "" 62 67 63 #: inc/hook-action.php:1 3664 #: inc/hook-action.php:1 4568 #: inc/hook-action.php:143 69 #: inc/hook-action.php:152 65 70 msgid "Custom CSS (Mobile)" 66 71 msgstr "" 67 72 68 #: inc/hook-action.php:1 5973 #: inc/hook-action.php:166 69 74 msgid "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" 70 75 msgstr "" 71 76 72 #: inc/hook-action.php:1 6977 #: inc/hook-action.php:176 73 78 msgid "If the CSS is not reflecting in the editor panel or frontend, you need to write a more specific CSS selector." 74 79 msgstr "" … … 82 87 msgstr "" 83 88 84 #. translators: 1: Plugin name 2: Elementor89 #. translators: 1: Plugin name 2: Required on 3: Required version 85 90 #: plugin.php:96 86 91 msgid "\"%1$s\" requires \"%2$s\" to be installed and activated. %3$s" … … 92 97 msgstr "" 93 98 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 96 100 #: plugin.php:114 97 101 #: plugin.php:132 -
custom-css-for-elementor/trunk/inc/hook-action.php
r2979212 r3202104 4 4 5 5 // If this file is called directly, abort. 6 defined('ABSPATH') || exit; 7 6 defined( 'ABSPATH' ) || exit; 7 8 use Wikimedia\CSS\Util; 9 use Elementor\Controls_Stack; 8 10 use Elementor\Controls_Manager; 9 use Elementor\Controls_Stack; 11 use Wikimedia\CSS\Parser\Parser; 12 use Elementor\Plugin as Elementor_Plugin; 10 13 use Elementor\Core\DynamicTags\Dynamic_CSS; 11 use Elementor\Plugin as Elementor_Plugin;12 13 use Wikimedia\CSS\Parser\Parser;14 14 use Wikimedia\CSS\Sanitizer\StylesheetSanitizer; 15 use Wikimedia\CSS\Util;16 15 17 16 class Hook_Action { 18 17 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 } 297 308 } -
custom-css-for-elementor/trunk/plugin.php
r2979212 r3202104 4 4 5 5 // If this file is called directly, abort. 6 defined( 'ABSPATH') || exit;6 defined( 'ABSPATH' ) || exit; 7 7 8 8 /** … … 11 11 */ 12 12 final class Plugin { 13 /**14 * @var Singleton The reference the *Singleton* instance of this class15 */16 public static $instance;13 /** 14 * @var Singleton The reference the *Singleton* instance of this class 15 */ 16 public static $instance; 17 17 18 /**19 * elementor required version20 */21 const CCFE_MINIMUM_ELE_VER = '3.9.0';18 /** 19 * elementor required version 20 */ 21 const CCFE_MINIMUM_ELE_VER = '3.9.0'; 22 22 23 /**24 * php required version25 */26 const CCFE_MINIMUM_PHP_VER = '5.6';23 /** 24 * php required version 25 */ 26 const CCFE_MINIMUM_PHP_VER = '5.6'; 27 27 28 /**29 * class constructor function30 */31 public function __construct() {32 $this->define_constants();33 }28 /** 29 * class constructor function 30 */ 31 public function __construct() { 32 $this->define_constants(); 33 } 34 34 35 /**36 * constent declare function37 *38 * @return void39 */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 } 46 46 47 /**48 * init function of plugin49 *50 * @return void51 */52 public function init() {47 /** 48 * init function of plugin 49 * 50 * @return void 51 */ 52 public function init() { 53 53 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'] ); 59 57 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 } 65 60 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'] ); 71 64 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 } 75 67 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'] ); 78 71 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 } 85 74 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 } 93 78 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 } 101 81 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() { 104 88 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 } 111 96 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 ); 119 104 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 } 122 107 123 /**124 * admin notice for minimum version php requiredfunction125 *126 * @return void127 */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() { 129 114 130 $message = sprintf(131 /* translators: 1: Plugin name 2: PHP 3: Required PHPversion */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_VER136 );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 ); 137 122 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 } 140 125 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 } 152 156 } -
custom-css-for-elementor/trunk/readme.txt
r2979212 r3202104 1 1 === Custom CSS for Elementor === 2 Plugin Name: Custom CSS for Elementor 3 Version: 2.1.0 4 Author: Sayedul Sayem 5 Author URI: https://sayedulsayem.com/ 2 6 Contributors: sayedulsayem, ikamal, gtarafdarr 3 7 Tags: elementor, css, custom css, responsive css, elementor addons 4 8 Requires at least: 5.0 5 Tested up to: 6. 3.26 Requires PHP: 5.67 Stable tag: 2. 0.09 Tested up to: 6.7 10 Requires PHP: 7.4 11 Stable tag: 2.1.0 8 12 License: GPL v3 or later 9 13 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 57 61 * It works with any Elementor widget and other third-party Elementor addons widgets too. 58 62 63 ### 💻 How to Change Breakpoints in WordPress 64 To 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 67 To adjust the breakpoint for tablets, follow these steps: 68 69 1. Open your WordPress theme's `functions.php` file. 70 2. Add the following PHP code snippet: 71 72 ```php 73 add_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 ``` 78 3. Save the file. 79 80 #### Changing Mobile Breakpoint 81 To customize the breakpoint for mobile devices, use the following instructions: 82 83 1. Navigate to your theme's `functions.php` file. 84 2. Insert the following PHP code: 85 86 ```php 87 add_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 ``` 92 3. Save the changes. 93 94 By adjusting these breakpoints, you can fine-tune your website's responsiveness and ensure a seamless viewing experience across various devices. 95 59 96 60 97 ### **PRIVACY POLICY** … … 104 141 == Changelog == 105 142 143 = 2.1.0 = 144 145 - New: Filter added for changing breakpoints. 146 106 147 = 2.0.0 = 107 148 -
custom-css-for-elementor/trunk/vendor/autoload.php
r2979212 r3202104 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 89ceebd147ade89d01e60cb732f065bf::getLoader();25 return ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9::getLoader(); -
custom-css-for-elementor/trunk/vendor/composer/autoload_real.php
r2979212 r3202104 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 89ceebd147ade89d01e60cb732f065bf5 class ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 89ceebd147ade89d01e60cb732f065bf', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 89ceebd147ade89d01e60cb732f065bf', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInita9d747e7eee2bdf6c2dc9ef1b07691e9', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::getInitializer($loader)); 33 33 34 34 $loader->register(true); 35 35 36 $filesToLoad = \Composer\Autoload\ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::$files;36 $filesToLoad = \Composer\Autoload\ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$files; 37 37 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 38 38 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
custom-css-for-elementor/trunk/vendor/composer/autoload_static.php
r2979212 r3202104 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf7 class ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9 8 8 { 9 9 public static $files = array ( … … 40 40 { 41 41 return \Closure::bind(function () use ($loader) { 42 $loader->prefixLengthsPsr4 = ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::$prefixLengthsPsr4;43 $loader->prefixDirsPsr4 = ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::$prefixDirsPsr4;44 $loader->classMap = ComposerStaticInit 89ceebd147ade89d01e60cb732f065bf::$classMap;42 $loader->prefixLengthsPsr4 = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$prefixLengthsPsr4; 43 $loader->prefixDirsPsr4 = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$prefixDirsPsr4; 44 $loader->classMap = ComposerStaticInita9d747e7eee2bdf6c2dc9ef1b07691e9::$classMap; 45 45 46 46 }, null, ClassLoader::class); -
custom-css-for-elementor/trunk/vendor/composer/installed.json
r2979212 r3202104 168 168 } 169 169 ], 170 "dev": true,170 "dev": false, 171 171 "dev-package-names": [] 172 172 } -
custom-css-for-elementor/trunk/vendor/composer/installed.php
r2979212 r3202104 1 1 <?php return array( 2 2 'root' => array( 3 'name' => ' __root__',3 'name' => 'sayedulsayem/custom-css-for-elementor', 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' a6aae11540b676b742465a618c7174ef4c1c89b6',7 'type' => ' library',6 'reference' => 'bbd25cb5ee020f2758bb911f1ce0563dfbf0e50e', 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', 9 9 'aliases' => array(), 10 'dev' => true,10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 ' __root__' => array(13 'sayedulsayem/custom-css-for-elementor' => array( 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' a6aae11540b676b742465a618c7174ef4c1c89b6',17 'type' => ' library',16 'reference' => 'bbd25cb5ee020f2758bb911f1ce0563dfbf0e50e', 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', 19 19 'aliases' => array(),
Note: See TracChangeset
for help on using the changeset viewer.