Changeset 3302155
- Timestamp:
- 05/28/2025 11:12:23 AM (10 months ago)
- Location:
- borderless
- Files:
-
- 208 added
- 5 edited
-
tags/1.7.2 (added)
-
tags/1.7.2/assets (added)
-
tags/1.7.2/assets/fonts (added)
-
tags/1.7.2/assets/fonts/bootstrap-icons.woff (added)
-
tags/1.7.2/assets/fonts/bootstrap-icons.woff2 (added)
-
tags/1.7.2/assets/fonts/borderless-icon-font.svg (added)
-
tags/1.7.2/assets/fonts/borderless-icon-font.ttf (added)
-
tags/1.7.2/assets/fonts/borderless-icon-font.woff (added)
-
tags/1.7.2/assets/img (added)
-
tags/1.7.2/assets/img/borderless.svg (added)
-
tags/1.7.2/assets/img/library.svg (added)
-
tags/1.7.2/assets/img/post-type.svg (added)
-
tags/1.7.2/assets/lib (added)
-
tags/1.7.2/assets/lib/appear.js (added)
-
tags/1.7.2/assets/lib/countto.js (added)
-
tags/1.7.2/assets/lib/flickity (added)
-
tags/1.7.2/assets/lib/flickity/flickity-as-nav-for.js (added)
-
tags/1.7.2/assets/lib/flickity/flickity-fade.css (added)
-
tags/1.7.2/assets/lib/flickity/flickity-fade.js (added)
-
tags/1.7.2/assets/lib/flickity/flickity-fullscreen.css (added)
-
tags/1.7.2/assets/lib/flickity/flickity-fullscreen.js (added)
-
tags/1.7.2/assets/lib/flickity/flickity.css (added)
-
tags/1.7.2/assets/lib/flickity/flickity.js (added)
-
tags/1.7.2/assets/lib/images-loaded.js (added)
-
tags/1.7.2/assets/lib/isotope.js (added)
-
tags/1.7.2/assets/lib/marquee.js (added)
-
tags/1.7.2/assets/lib/progressbar.js (added)
-
tags/1.7.2/assets/lib/typewriterjs.js (added)
-
tags/1.7.2/assets/scripts (added)
-
tags/1.7.2/assets/scripts/bootstrap.js (added)
-
tags/1.7.2/assets/scripts/borderless-elementor.min.js (added)
-
tags/1.7.2/assets/scripts/borderless-wpbakery.min.js (added)
-
tags/1.7.2/assets/scripts/borderless.js (added)
-
tags/1.7.2/assets/scripts/borderless.min.js (added)
-
tags/1.7.2/assets/scripts/library.js (added)
-
tags/1.7.2/assets/styles (added)
-
tags/1.7.2/assets/styles/bootstrap-icons.css (added)
-
tags/1.7.2/assets/styles/bootstrap.css (added)
-
tags/1.7.2/assets/styles/borderless-icon-font.css (added)
-
tags/1.7.2/assets/styles/borderless.css (added)
-
tags/1.7.2/assets/styles/borderless.min.css (added)
-
tags/1.7.2/assets/styles/dashboard.css (added)
-
tags/1.7.2/assets/styles/dashboard.min.css (added)
-
tags/1.7.2/assets/styles/elementor (added)
-
tags/1.7.2/assets/styles/elementor.css (added)
-
tags/1.7.2/assets/styles/elementor.min.css (added)
-
tags/1.7.2/assets/styles/elementor/elementor-widget-animated-text.css (added)
-
tags/1.7.2/assets/styles/elementor/elementor-widget-hero.css (added)
-
tags/1.7.2/assets/styles/elementor/elementor-widget-info-box.css (added)
-
tags/1.7.2/assets/styles/elementor/elementor-widget-marquee-text.css (added)
-
tags/1.7.2/assets/styles/elementor/elementor-widget-portfolio.css (added)
-
tags/1.7.2/assets/styles/elementor/elementor-widget-pricing-table.css (added)
-
tags/1.7.2/assets/styles/elementor/elementor-widget-slider.css (added)
-
tags/1.7.2/assets/styles/elementor/elementor-widget-split-hero.css (added)
-
tags/1.7.2/assets/styles/library.css (added)
-
tags/1.7.2/assets/styles/wpbakery (added)
-
tags/1.7.2/assets/styles/wpbakery.css (added)
-
tags/1.7.2/assets/styles/wpbakery.min.css (added)
-
tags/1.7.2/assets/styles/wpbakery/wpbakery-icon-fonts.css (added)
-
tags/1.7.2/borderless.php (added)
-
tags/1.7.2/includes (added)
-
tags/1.7.2/includes/class-borderless-loader.php (added)
-
tags/1.7.2/includes/class-borderless-public.php (added)
-
tags/1.7.2/includes/class-borderless.php (added)
-
tags/1.7.2/includes/custom-post-types (added)
-
tags/1.7.2/includes/custom-post-types/custom-post-types.php (added)
-
tags/1.7.2/includes/custom-post-types/templates.php (added)
-
tags/1.7.2/includes/helper.php (added)
-
tags/1.7.2/includes/icon-manager (added)
-
tags/1.7.2/includes/icon-manager/assets (added)
-
tags/1.7.2/includes/icon-manager/assets/css (added)
-
tags/1.7.2/includes/icon-manager/assets/css/icon-manager.css (added)
-
tags/1.7.2/includes/icon-manager/assets/css/icon-manager.min.css (added)
-
tags/1.7.2/includes/icon-manager/assets/css/icon-manager.scss (added)
-
tags/1.7.2/includes/icon-manager/assets/js (added)
-
tags/1.7.2/includes/icon-manager/assets/js/icon-manager.js (added)
-
tags/1.7.2/includes/icon-manager/assets/js/icon-manager.min.js (added)
-
tags/1.7.2/includes/icon-manager/icon-manager.php (added)
-
tags/1.7.2/includes/index.php (added)
-
tags/1.7.2/includes/library (added)
-
tags/1.7.2/includes/library/importer.php (added)
-
tags/1.7.2/includes/library/inc (added)
-
tags/1.7.2/includes/library/inc/BorderlessLibraryImporter.php (added)
-
tags/1.7.2/includes/library/inc/CustomizerImporter.php (added)
-
tags/1.7.2/includes/library/inc/CustomizerOption.php (added)
-
tags/1.7.2/includes/library/inc/Downloader.php (added)
-
tags/1.7.2/includes/library/inc/Helpers.php (added)
-
tags/1.7.2/includes/library/inc/ImportActions.php (added)
-
tags/1.7.2/includes/library/inc/Importer.php (added)
-
tags/1.7.2/includes/library/inc/Logger.php (added)
-
tags/1.7.2/includes/library/inc/PluginInstaller.php (added)
-
tags/1.7.2/includes/library/inc/PluginInstallerSkin.php (added)
-
tags/1.7.2/includes/library/inc/PluginInstallerSkinSilent.php (added)
-
tags/1.7.2/includes/library/inc/ReduxImporter.php (added)
-
tags/1.7.2/includes/library/inc/ViewHelpers.php (added)
-
tags/1.7.2/includes/library/inc/WPCLICommands.php (added)
-
tags/1.7.2/includes/library/inc/WXRImporter.php (added)
-
tags/1.7.2/includes/library/inc/WidgetImporter.php (added)
-
tags/1.7.2/includes/library/templates (added)
-
tags/1.7.2/includes/library/templates/borderless-templates-after.php (added)
-
tags/1.7.2/includes/library/templates/borderless-templates.php (added)
-
tags/1.7.2/includes/library/templates/classic-templates-after.php (added)
-
tags/1.7.2/includes/library/templates/classic-templates-plugins.php (added)
-
tags/1.7.2/includes/library/templates/classic-templates.php (added)
-
tags/1.7.2/includes/library/templates/templates.php (added)
-
tags/1.7.2/includes/library/vendor (added)
-
tags/1.7.2/includes/library/vendor/autoload.php (added)
-
tags/1.7.2/includes/library/vendor/awesomemotive (added)
-
tags/1.7.2/includes/library/vendor/awesomemotive/wp-content-importer-v2 (added)
-
tags/1.7.2/includes/library/vendor/awesomemotive/wp-content-importer-v2/src (added)
-
tags/1.7.2/includes/library/vendor/awesomemotive/wp-content-importer-v2/src/Importer.php (added)
-
tags/1.7.2/includes/library/vendor/awesomemotive/wp-content-importer-v2/src/WPImporterLogger.php (added)
-
tags/1.7.2/includes/library/vendor/awesomemotive/wp-content-importer-v2/src/WPImporterLoggerCLI.php (added)
-
tags/1.7.2/includes/library/vendor/awesomemotive/wp-content-importer-v2/src/WXRImportInfo.php (added)
-
tags/1.7.2/includes/library/vendor/awesomemotive/wp-content-importer-v2/src/WXRImporter.php (added)
-
tags/1.7.2/includes/library/vendor/composer (added)
-
tags/1.7.2/includes/library/vendor/composer/ClassLoader.php (added)
-
tags/1.7.2/includes/library/vendor/composer/autoload_classmap.php (added)
-
tags/1.7.2/includes/library/vendor/composer/autoload_namespaces.php (added)
-
tags/1.7.2/includes/library/vendor/composer/autoload_psr4.php (added)
-
tags/1.7.2/includes/library/vendor/composer/autoload_real.php (added)
-
tags/1.7.2/includes/library/vendor/composer/autoload_static.php (added)
-
tags/1.7.2/includes/library/views (added)
-
tags/1.7.2/includes/library/views/import.php (added)
-
tags/1.7.2/includes/library/views/install-plugins.php (added)
-
tags/1.7.2/includes/library/views/plugin-page.php (added)
-
tags/1.7.2/includes/templates (added)
-
tags/1.7.2/includes/templates/dashboard.php (added)
-
tags/1.7.2/includes/templates/license.php (added)
-
tags/1.7.2/includes/templates/system-info.php (added)
-
tags/1.7.2/languages (added)
-
tags/1.7.2/languages/borderless.pot (added)
-
tags/1.7.2/license.txt (added)
-
tags/1.7.2/modules (added)
-
tags/1.7.2/modules/block-editor (added)
-
tags/1.7.2/modules/block-editor/contact-information (added)
-
tags/1.7.2/modules/block-editor/contact-information/contact-information-frontend.css (added)
-
tags/1.7.2/modules/block-editor/contact-information/contact-information.css (added)
-
tags/1.7.2/modules/block-editor/contact-information/contact-information.js (added)
-
tags/1.7.2/modules/block-editor/contact-information/contact-information.php (added)
-
tags/1.7.2/modules/block-editor/social-icons (added)
-
tags/1.7.2/modules/block-editor/social-icons/social-icons-backend.css (added)
-
tags/1.7.2/modules/block-editor/social-icons/social-icons-frontend.css (added)
-
tags/1.7.2/modules/block-editor/social-icons/social-icons.js (added)
-
tags/1.7.2/modules/block-editor/social-icons/social-icons.php (added)
-
tags/1.7.2/modules/block-editor/spacer (added)
-
tags/1.7.2/modules/block-editor/spacer/spacer-backend.css (added)
-
tags/1.7.2/modules/block-editor/spacer/spacer.js (added)
-
tags/1.7.2/modules/block-editor/spacer/spacer.php (added)
-
tags/1.7.2/modules/elementor (added)
-
tags/1.7.2/modules/elementor/assets.php (added)
-
tags/1.7.2/modules/elementor/elementor.php (added)
-
tags/1.7.2/modules/elementor/helper.php (added)
-
tags/1.7.2/modules/elementor/widgets (added)
-
tags/1.7.2/modules/elementor/widgets/animated-text.php (added)
-
tags/1.7.2/modules/elementor/widgets/circular-progress-bar.php (added)
-
tags/1.7.2/modules/elementor/widgets/contact-form-7.php (added)
-
tags/1.7.2/modules/elementor/widgets/hero.php (added)
-
tags/1.7.2/modules/elementor/widgets/info-box.php (added)
-
tags/1.7.2/modules/elementor/widgets/marquee-text.php (added)
-
tags/1.7.2/modules/elementor/widgets/portfolio.php (added)
-
tags/1.7.2/modules/elementor/widgets/pricing-table.php (added)
-
tags/1.7.2/modules/elementor/widgets/progress-bar.php (added)
-
tags/1.7.2/modules/elementor/widgets/semi-circular-progress-bar.php (added)
-
tags/1.7.2/modules/elementor/widgets/slider.php (added)
-
tags/1.7.2/modules/elementor/widgets/split-hero.php (added)
-
tags/1.7.2/modules/elementor/widgets/team-member.php (added)
-
tags/1.7.2/modules/elementor/widgets/testimonial.php (added)
-
tags/1.7.2/modules/related-posts (added)
-
tags/1.7.2/modules/related-posts/related-posts.php (added)
-
tags/1.7.2/modules/wpbakery (added)
-
tags/1.7.2/modules/wpbakery/custom-default-elements.php (added)
-
tags/1.7.2/modules/wpbakery/elements (added)
-
tags/1.7.2/modules/wpbakery/elements/alert.php (added)
-
tags/1.7.2/modules/wpbakery/elements/circular-progress-bar.php (added)
-
tags/1.7.2/modules/wpbakery/elements/counter.php (added)
-
tags/1.7.2/modules/wpbakery/elements/icon-group.php (added)
-
tags/1.7.2/modules/wpbakery/elements/icon.php (added)
-
tags/1.7.2/modules/wpbakery/elements/infobox.php (added)
-
tags/1.7.2/modules/wpbakery/elements/list-group.php (added)
-
tags/1.7.2/modules/wpbakery/elements/modal.php (added)
-
tags/1.7.2/modules/wpbakery/elements/pricing.php (added)
-
tags/1.7.2/modules/wpbakery/elements/progress-bar.php (added)
-
tags/1.7.2/modules/wpbakery/elements/semi-circular-progress-bar.php (added)
-
tags/1.7.2/modules/wpbakery/elements/team-member.php (added)
-
tags/1.7.2/modules/wpbakery/elements/testimonial.php (added)
-
tags/1.7.2/modules/wpbakery/images (added)
-
tags/1.7.2/modules/wpbakery/images/alert.png (added)
-
tags/1.7.2/modules/wpbakery/images/circular-progress-bar.png (added)
-
tags/1.7.2/modules/wpbakery/images/counter.png (added)
-
tags/1.7.2/modules/wpbakery/images/icon-group.png (added)
-
tags/1.7.2/modules/wpbakery/images/icon.png (added)
-
tags/1.7.2/modules/wpbakery/images/infobox.png (added)
-
tags/1.7.2/modules/wpbakery/images/list-group.png (added)
-
tags/1.7.2/modules/wpbakery/images/list-item.png (added)
-
tags/1.7.2/modules/wpbakery/images/modal.png (added)
-
tags/1.7.2/modules/wpbakery/images/pricing.png (added)
-
tags/1.7.2/modules/wpbakery/images/progress-bar.png (added)
-
tags/1.7.2/modules/wpbakery/images/semi-circular-progress-bar.png (added)
-
tags/1.7.2/modules/wpbakery/images/svg.png (added)
-
tags/1.7.2/modules/wpbakery/images/team-member.png (added)
-
tags/1.7.2/modules/wpbakery/images/testimonial-section.png (added)
-
tags/1.7.2/modules/wpbakery/images/testimonial.png (added)
-
tags/1.7.2/modules/wpbakery/lean-map.php (added)
-
tags/1.7.2/modules/wpbakery/paramns (added)
-
tags/1.7.2/modules/wpbakery/paramns/icon-manager-param.php (added)
-
tags/1.7.2/modules/wpbakery/wpbakery.php (added)
-
tags/1.7.2/readme.txt (added)
-
trunk/borderless.php (modified) (2 diffs)
-
trunk/modules/elementor/widgets/circular-progress-bar.php (modified) (7 diffs)
-
trunk/modules/elementor/widgets/progress-bar.php (modified) (8 diffs)
-
trunk/modules/elementor/widgets/semi-circular-progress-bar.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
borderless/trunk/borderless.php
r3267283 r3302155 5 5 Plugin URI: https://visualmodo.com/borderless/ 6 6 Description: One service packed with powerful tools to help you reach your purposes. 7 Version: 1.7. 17 Version: 1.7.2 8 8 Author: Visualmodo 9 9 Author URI: https://visualmodo.com … … 21 21 /*-----------------------------------------------------------------------------------*/ 22 22 23 define( 'BORDERLESS__VERSION', '1.7. 1' );23 define( 'BORDERLESS__VERSION', '1.7.2' ); 24 24 define( 'BORDERLESS__DIR', plugin_dir_path( __FILE__ ) ); 25 25 define( 'BORDERLESS__URL', plugins_url( '/', __FILE__ ) ); -
borderless/trunk/modules/elementor/widgets/circular-progress-bar.php
r3132733 r3302155 30 30 } 31 31 32 public function get_keywords() 33 { 32 public function get_keywords() { 34 33 return [ 35 34 'circular progress bar', … … 43 42 } 44 43 45 public function get_custom_help_url() 46 { 44 public function get_custom_help_url() { 47 45 return 'https://wpborderless.com/'; 48 46 } 49 47 50 48 public function get_style_depends() { 51 return 52 [ 53 'borderless-elementor-style' 54 ]; 49 return [ 'borderless-elementor-style' ]; 55 50 } 56 51 57 52 public function get_script_depends() { 58 return 59 [ 60 'borderless-elementor-appear-script', 61 'borderless-elementor-progressbar-script' 62 ]; 53 return [ 54 'borderless-elementor-appear-script', 55 'borderless-elementor-progressbar-script' 56 ]; 63 57 } 64 58 65 59 protected function _register_controls() { 66 67 68 60 /*-----------------------------------------------------------------------------------*/ 69 61 /* *. Layout 70 62 /*-----------------------------------------------------------------------------------*/ 71 72 63 $this->start_controls_section( 73 64 'borderless_section_circular_progress_bar_layout', 74 65 [ 75 66 'label' => esc_html__( 'Layout', 'borderless' ), 76 'tab' => Controls_Manager::TAB_CONTENT,67 'tab' => Controls_Manager::TAB_CONTENT, 77 68 ] 78 69 ); … … 81 72 'borderless_circular_progress_bar_title', 82 73 [ 83 'label' => esc_html__( 'Title', 'borderless'), 84 'type' => Controls_Manager::TEXT, 85 'dynamic' => [ 86 'active' => true, 87 ], 74 'label' => esc_html__( 'Title', 'borderless'), 75 'type' => Controls_Manager::TEXT, 76 'dynamic' => [ 'active' => true ], 88 77 ] 89 78 ); … … 92 81 'borderless_circular_progress_bar_counter_value', 93 82 [ 94 'label' => esc_html__( 'Counter Value', 'borderless'),95 'type' => Controls_Manager::SLIDER,83 'label' => esc_html__( 'Counter Value', 'borderless'), 84 'type' => Controls_Manager::SLIDER, 96 85 'size_units' => ['%'], 97 'range'=> [98 '%' => [86 'range' => [ 87 '%' => [ 99 88 'min' => 1, 100 89 'max' => 100, 101 90 ], 102 91 ], 103 'default' => [92 'default' => [ 104 93 'unit' => '%', 105 94 'size' => 50, 106 95 ], 107 'separator' => 'before',96 'separator' => 'before', 108 97 ] 109 98 ); … … 112 101 'borderless_circular_progress_bar_animation_duration', 113 102 [ 114 'label' => __('Animation Duration', 'borderless'),115 'type' => Controls_Manager::SLIDER,103 'label' => __( 'Animation Duration', 'borderless' ), 104 'type' => Controls_Manager::SLIDER, 116 105 'size_units' => ['px'], 117 'range' => [106 'range' => [ 118 107 'px' => [ 119 'min' => 1000,120 'max' => 10000,108 'min' => 1000, 109 'max' => 10000, 121 110 'step' => 100, 122 111 ], 123 112 ], 124 'default' => [113 'default' => [ 125 114 'unit' => 'px', 126 115 'size' => 1500, 127 116 ], 128 'separator' => 'before',117 'separator' => 'before', 129 118 ] 130 119 ); … … 133 122 134 123 135 /*-----------------------------------------------------------------------------------*/ 136 /* *. Layout - Style 137 /*-----------------------------------------------------------------------------------*/ 138 139 $this->start_controls_section( 140 'borderless_section_circular_progress_bar_styles_general', 141 [ 142 'label' => esc_html__( 'General', 'borderless'), 143 'tab' => Controls_Manager::TAB_STYLE 144 ] 145 ); 146 147 $this->add_control( 148 'borderless_circular_progress_bar_alignment', 149 [ 150 'label' => __('Alignment', 'borderless'), 151 'type' => \Elementor\Controls_Manager::CHOOSE, 152 'options' => [ 153 'borderless-circular-progress-bar-alignment-left' => [ 154 'title' => __('Left', 'borderless'), 155 'icon' => 'fa fa-align-left', 156 ], 157 'borderless-circular-progress-bar-alignment-center' => [ 158 'title' => __('Center', 'borderless'), 159 'icon' => 'fa fa-align-center', 160 ], 161 'borderless-circular-progress-bar-alignment-right' => [ 162 'title' => __('Right', 'borderless'), 163 'icon' => 'fa fa-align-right', 164 ], 165 ], 166 'default' => 'borderless-circular-progress-bar-alignment-center', 167 ] 168 ); 169 170 $this->add_control( 171 'borderless_circular_progress_bar_size', 172 [ 173 'label' => __('Size', 'borderless'), 174 'type' => Controls_Manager::SLIDER, 175 'size_units' => ['px'], 176 'range' => [ 177 'px' => [ 178 'min' => 50, 179 'max' => 500, 180 'step' => 1, 181 ], 182 ], 183 'default' => [ 184 'unit' => 'px', 185 'size' => 200, 186 ], 187 'selectors' => [ 188 '{{WRAPPER}} .borderless-elementor-circular-progress-bar' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', 189 ], 190 'separator' => 'before', 191 ] 192 ); 193 194 $this->add_control( 195 'borderless_circular_progress_bar_stroke_width', 196 [ 197 'label' => __('Stroke Width', 'borderless'), 198 'type' => Controls_Manager::SLIDER, 199 'size_units' => ['px'], 200 'range' => [ 201 'px' => [ 202 'min' => 0, 203 'max' => 100, 204 'step' => 1, 205 ], 206 ], 207 'default' => [ 208 'unit' => 'px', 209 'size' => 12, 210 ], 211 'separator' => 'before', 212 ] 213 ); 214 215 $this->add_control( 216 'borderless_circular_progress_bar_stroke_color_style', 217 [ 218 'label' => __( 'Stroke Color Style', 'borderless' ), 219 'type' => \Elementor\Controls_Manager::SELECT, 220 'default' => 'borderless-elementor-circular-progress-bar-stroke-solid-color', 221 'options' => [ 222 'borderless-elementor-circular-progress-bar-stroke-solid-color' => __( 'Solid', 'borderless' ), 223 'borderless-elementor-circular-progress-bar-stroke-gradient-color' => __( 'Gradient', 'borderless' ), 224 ], 225 ] 226 ); 227 228 $this->add_control( 229 'borderless_circular_progress_bar_stroke_color', 230 [ 231 'label' => __('Stroke Color', 'borderless'), 232 'type' => Controls_Manager::COLOR, 233 'default' => '#000', 234 'condition' => [ 235 'borderless_circular_progress_bar_stroke_color_style' => 'borderless-elementor-circular-progress-bar-stroke-solid-color', 236 ], 237 ] 238 ); 239 240 $this->add_control( 241 'borderless_circular_progress_bar_stroke_color_from', 242 [ 243 'label' => __('Stroke Color From', 'borderless'), 244 'type' => Controls_Manager::COLOR, 245 'default' => '#000', 246 'condition' => [ 247 'borderless_circular_progress_bar_stroke_color_style' => 'borderless-elementor-circular-progress-bar-stroke-gradient-color', 248 ], 249 ] 250 ); 251 252 $this->add_control( 253 'borderless_circular_progress_bar_stroke_color_to', 254 [ 255 'label' => __('Stroke Color To', 'borderless'), 256 'type' => Controls_Manager::COLOR, 257 'default' => '#000', 258 'condition' => [ 259 'borderless_circular_progress_bar_stroke_color_style' => 'borderless-elementor-circular-progress-bar-stroke-gradient-color', 260 ], 261 ] 262 ); 263 264 $this->add_control( 265 'borderless_circular_progress_bar_trail_width', 266 [ 267 'label' => __('Trail Width', 'borderless'), 268 'type' => Controls_Manager::SLIDER, 269 'size_units' => ['px'], 270 'range' => [ 271 'px' => [ 272 'min' => 0, 273 'max' => 100, 274 'step' => 1, 275 ], 276 ], 277 'default' => [ 278 'unit' => 'px', 279 'size' => 12, 280 ], 281 'separator' => 'before', 282 ] 283 ); 284 285 $this->add_control( 286 'borderless_circular_progress_bar_trail_color', 287 [ 288 'label' => __('Trail Color', 'borderless'), 289 'type' => Controls_Manager::COLOR, 290 'default' => '#eee', 291 ] 292 ); 293 294 $this->add_control( 295 'borderless_circular_progress_bar_shape', 296 [ 297 'label' => __( 'Shape', 'borderless' ), 298 'type' => \Elementor\Controls_Manager::SELECT, 299 'default' => 'borderless-elementor-circular-progress-bar--round', 300 'options' => [ 301 'borderless-elementor-circular-progress-bar--square' => __( 'Square', 'borderless' ), 302 'borderless-elementor-circular-progress-bar--round' => __( 'Round', 'borderless' ), 303 ], 304 'separator' => 'before', 305 ] 306 ); 307 308 $this->add_control( 309 'borderless_circular_progress_bar_background_color', 310 [ 311 'label' => __('Background Color', 'borderless'), 312 'type' => Controls_Manager::COLOR, 313 'default' => '#fff', 314 'selectors' => [ 315 '{{WRAPPER}} .borderless-elementor-circular-progress-bar' => 'background-color: {{VALUE}}', 316 ], 317 ] 318 ); 319 320 $this->add_group_control( 321 Group_Control_Box_Shadow::get_type(), 322 [ 323 'name' => 'borderless_circular_progress_bar_box_shadow', 324 'label' => __('Box Shadow', 'borderless'), 325 'selector' => '{{WRAPPER}} .borderless-elementor-circular-progress-bar', 326 'separator' => 'before', 327 ] 328 ); 329 330 $this->end_controls_section(); 331 332 /*-----------------------------------------------------------------------------------*/ 333 /* *. Typography - Style 334 /*-----------------------------------------------------------------------------------*/ 335 336 $this->start_controls_section( 337 'borderless_section_circular_progress_bar_typography', 338 [ 339 'label' => __('Typography', 'borderless'), 340 'tab' => Controls_Manager::TAB_STYLE, 341 ] 342 ); 343 344 $this->add_group_control( 345 Group_Control_Typography::get_type(), 346 [ 347 'name' => 'borderless_circular_progress_bar_title_typography', 348 'label' => __('Title', 'borderless'), 349 'global' => [ 350 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 351 ], 352 'selector' => '{{WRAPPER}} .borderless-elementor-circular-progress-bar .progressbar-text .borderless-elementor-circular-progress-bar-title', 353 ] 354 ); 355 356 $this->add_control( 357 'borderless_circular_progress_bar_title_color', 358 [ 359 'label' => __('Title Color', 'borderless'), 360 'type' => Controls_Manager::COLOR, 361 'default' => '', 362 'selectors' => [ 363 '{{WRAPPER}} .borderless-elementor-circular-progress-bar .progressbar-text .borderless-elementor-circular-progress-bar-title' => 'color: {{VALUE}}', 364 ], 365 'separator' => 'after', 366 ] 367 ); 368 369 $this->add_group_control( 370 Group_Control_Typography::get_type(), 371 [ 372 'name' => 'borderless_circular_progress_bar_counter_typography', 373 'label' => __('Counter', 'borderless'), 374 'global' => [ 375 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 376 ], 377 'selector' => '{{WRAPPER}} .borderless-elementor-circular-progress-bar .progressbar-text .borderless-elementor-circular-progress-bar-counter-value', 378 ] 379 ); 380 381 $this->add_control( 382 'borderless_circular_progress_bar_counter_color', 383 [ 384 'label' => __('Counter Color', 'borderless'), 385 'type' => Controls_Manager::COLOR, 386 'default' => '', 387 'separator' => 'after', 388 ] 389 ); 390 391 $this->add_group_control( 392 Group_Control_Typography::get_type(), 393 [ 394 'name' => 'borderless_circular_progress_bar_postfix_typography', 395 'label' => __('Postfix', 'borderless'), 396 'global' => [ 397 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 398 ], 399 'selector' => '{{WRAPPER}} .borderless-elementor-circular-progress-bar-counter-postfix', 400 ] 401 ); 402 403 $this->add_control( 404 'borderless_circular_progress_bar_postfix_color', 405 [ 406 'label' => __('Postfix Color', 'borderless'), 407 'type' => Controls_Manager::COLOR, 408 'default' => '', 409 'selectors' => [ 410 '{{WRAPPER}} .borderless-elementor-circular-progress-bar-counter-postfix' => 'color: {{VALUE}}', 411 ], 412 ] 413 ); 414 415 $this->end_controls_section(); 416 124 /*-----------------------------------------------------------------------------------*/ 125 /* *. Layout - Style 126 /*-----------------------------------------------------------------------------------*/ 127 $this->start_controls_section( 128 'borderless_section_circular_progress_bar_styles_general', 129 [ 130 'label' => esc_html__( 'General', 'borderless'), 131 'tab' => Controls_Manager::TAB_STYLE 132 ] 133 ); 134 135 $this->add_control( 136 'borderless_circular_progress_bar_alignment', 137 [ 138 'label' => __( 'Alignment', 'borderless' ), 139 'type' => Controls_Manager::CHOOSE, 140 'options' => [ 141 'borderless-circular-progress-bar-alignment-left' => [ 142 'title' => __( 'Left', 'borderless' ), 143 'icon' => 'fa fa-align-left', 144 ], 145 'borderless-circular-progress-bar-alignment-center' => [ 146 'title' => __( 'Center', 'borderless' ), 147 'icon' => 'fa fa-align-center', 148 ], 149 'borderless-circular-progress-bar-alignment-right' => [ 150 'title' => __( 'Right', 'borderless' ), 151 'icon' => 'fa fa-align-right', 152 ], 153 ], 154 'default' => 'borderless-circular-progress-bar-alignment-center', 155 ] 156 ); 157 158 $this->add_control( 159 'borderless_circular_progress_bar_size', 160 [ 161 'label' => __( 'Size', 'borderless' ), 162 'type' => Controls_Manager::SLIDER, 163 'size_units' => ['px'], 164 'range' => [ 165 'px' => [ 166 'min' => 50, 167 'max' => 500, 168 'step' => 1, 169 ], 170 ], 171 'default' => [ 172 'unit' => 'px', 173 'size' => 200, 174 ], 175 'selectors' => [ 176 '{{WRAPPER}} .borderless-elementor-circular-progress-bar' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', 177 ], 178 'separator' => 'before', 179 ] 180 ); 181 182 $this->add_control( 183 'borderless_circular_progress_bar_stroke_width', 184 [ 185 'label' => __( 'Stroke Width', 'borderless' ), 186 'type' => Controls_Manager::SLIDER, 187 'size_units' => ['px'], 188 'range' => [ 189 'px' => [ 190 'min' => 0, 191 'max' => 100, 192 'step' => 1, 193 ], 194 ], 195 'default' => [ 196 'unit' => 'px', 197 'size' => 12, 198 ], 199 'separator' => 'before', 200 ] 201 ); 202 203 $this->add_control( 204 'borderless_circular_progress_bar_stroke_color_style', 205 [ 206 'label' => __( 'Stroke Color Style', 'borderless' ), 207 'type' => Controls_Manager::SELECT, 208 'default' => 'borderless-elementor-circular-progress-bar-stroke-solid-color', 209 'options' => [ 210 'borderless-elementor-circular-progress-bar-stroke-solid-color' => __( 'Solid', 'borderless' ), 211 'borderless-elementor-circular-progress-bar-stroke-gradient-color' => __( 'Gradient', 'borderless' ), 212 ], 213 ] 214 ); 215 216 $this->add_control( 217 'borderless_circular_progress_bar_stroke_color', 218 [ 219 'label' => __( 'Stroke Color', 'borderless' ), 220 'type' => Controls_Manager::COLOR, 221 'default' => '#000', 222 'condition' => [ 223 'borderless_circular_progress_bar_stroke_color_style' => 'borderless-elementor-circular-progress-bar-stroke-solid-color', 224 ], 225 ] 226 ); 227 228 $this->add_control( 229 'borderless_circular_progress_bar_stroke_color_from', 230 [ 231 'label' => __( 'Stroke Color From', 'borderless' ), 232 'type' => Controls_Manager::COLOR, 233 'default' => '#000', 234 'condition' => [ 235 'borderless_circular_progress_bar_stroke_color_style' => 'borderless-elementor-circular-progress-bar-stroke-gradient-color', 236 ], 237 ] 238 ); 239 240 $this->add_control( 241 'borderless_circular_progress_bar_stroke_color_to', 242 [ 243 'label' => __( 'Stroke Color To', 'borderless' ), 244 'type' => Controls_Manager::COLOR, 245 'default' => '#000', 246 'condition' => [ 247 'borderless_circular_progress_bar_stroke_color_style' => 'borderless-elementor-circular-progress-bar-stroke-gradient-color', 248 ], 249 ] 250 ); 251 252 $this->add_control( 253 'borderless_circular_progress_bar_trail_width', 254 [ 255 'label' => __( 'Trail Width', 'borderless' ), 256 'type' => Controls_Manager::SLIDER, 257 'size_units' => ['px'], 258 'range' => [ 259 'px' => [ 260 'min' => 0, 261 'max' => 100, 262 'step' => 1, 263 ], 264 ], 265 'default' => [ 266 'unit' => 'px', 267 'size' => 12, 268 ], 269 'separator' => 'before', 270 ] 271 ); 272 273 $this->add_control( 274 'borderless_circular_progress_bar_trail_color', 275 [ 276 'label' => __( 'Trail Color', 'borderless' ), 277 'type' => Controls_Manager::COLOR, 278 'default' => '#eee', 279 ] 280 ); 281 282 $this->add_control( 283 'borderless_circular_progress_bar_shape', 284 [ 285 'label' => __( 'Shape', 'borderless' ), 286 'type' => Controls_Manager::SELECT, 287 'default' => 'borderless-elementor-circular-progress-bar--round', 288 'options' => [ 289 'borderless-elementor-circular-progress-bar--square' => __( 'Square', 'borderless' ), 290 'borderless-elementor-circular-progress-bar--round' => __( 'Round', 'borderless' ), 291 ], 292 'separator' => 'before', 293 ] 294 ); 295 296 $this->add_control( 297 'borderless_circular_progress_bar_background_color', 298 [ 299 'label' => __( 'Background Color', 'borderless' ), 300 'type' => Controls_Manager::COLOR, 301 'default' => '#fff', 302 'selectors' => [ 303 '{{WRAPPER}} .borderless-elementor-circular-progress-bar' => 'background-color: {{VALUE}}', 304 ], 305 ] 306 ); 307 308 $this->add_group_control( 309 Group_Control_Box_Shadow::get_type(), 310 [ 311 'name' => 'borderless_circular_progress_bar_box_shadow', 312 'label' => __( 'Box Shadow', 'borderless' ), 313 'selector' => '{{WRAPPER}} .borderless-elementor-circular-progress-bar', 314 'separator'=> 'before', 315 ] 316 ); 317 318 $this->end_controls_section(); 319 320 /*-----------------------------------------------------------------------------------*/ 321 /* *. Typography - Style 322 /*-----------------------------------------------------------------------------------*/ 323 $this->start_controls_section( 324 'borderless_section_circular_progress_bar_typography', 325 [ 326 'label' => __( 'Typography', 'borderless' ), 327 'tab' => Controls_Manager::TAB_STYLE, 328 ] 329 ); 330 331 $this->add_group_control( 332 Group_Control_Typography::get_type(), 333 [ 334 'name' => 'borderless_circular_progress_bar_title_typography', 335 'label' => __( 'Title', 'borderless' ), 336 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 337 'selector'=> '{{WRAPPER}} .borderless-elementor-circular-progress-bar .progressbar-text .borderless-elementor-circular-progress-bar-title', 338 ] 339 ); 340 341 $this->add_control( 342 'borderless_circular_progress_bar_title_color', 343 [ 344 'label' => __( 'Title Color', 'borderless' ), 345 'type' => Controls_Manager::COLOR, 346 'default' => '', 347 'selectors' => [ 348 '{{WRAPPER}} .borderless-elementor-circular-progress-bar .progressbar-text .borderless-elementor-circular-progress-bar-title' => 'color: {{VALUE}}', 349 ], 350 'separator'=> 'after', 351 ] 352 ); 353 354 $this->add_group_control( 355 Group_Control_Typography::get_type(), 356 [ 357 'name' => 'borderless_circular_progress_bar_counter_typography', 358 'label' => __( 'Counter', 'borderless' ), 359 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 360 'selector' => '{{WRAPPER}} .borderless-elementor-circular-progress-bar .progressbar-text .borderless-elementor-circular-progress-bar-counter-value', 361 ] 362 ); 363 364 $this->add_control( 365 'borderless_circular_progress_bar_counter_color', 366 [ 367 'label' => __( 'Counter Color', 'borderless' ), 368 'type' => Controls_Manager::COLOR, 369 'default' => '', 370 'separator'=> 'after', 371 ] 372 ); 373 374 $this->add_group_control( 375 Group_Control_Typography::get_type(), 376 [ 377 'name' => 'borderless_circular_progress_bar_postfix_typography', 378 'label' => __( 'Postfix', 'borderless' ), 379 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 380 'selector' => '{{WRAPPER}} .borderless-elementor-circular-progress-bar-counter-postfix', 381 ] 382 ); 383 384 $this->add_control( 385 'borderless_circular_progress_bar_postfix_color', 386 [ 387 'label' => __( 'Postfix Color', 'borderless' ), 388 'type' => Controls_Manager::COLOR, 389 'default' => '', 390 'selectors' => [ 391 '{{WRAPPER}} .borderless-elementor-circular-progress-bar-counter-postfix' => 'color: {{VALUE}}', 392 ], 393 ] 394 ); 395 396 $this->end_controls_section(); 417 397 } 418 398 … … 424 404 $settings = $this->get_settings_for_display(); 425 405 426 if ($settings['borderless_circular_progress_bar_stroke_color_style'] == 'borderless-elementor-circular-progress-bar-stroke-solid-color' ) { 427 $borderless_circular_progress_bar_stroke_color_style = 'stroke_color_mode="solid" stroke_color="'.esc_attr($settings['borderless_circular_progress_bar_stroke_color']).'"'; 428 406 // Sanitize and escape the Title field to prevent stored XSS 407 $raw_title = $settings['borderless_circular_progress_bar_title']; 408 $clean_title = sanitize_text_field( $raw_title ); 409 $safe_title = esc_js( $clean_title ); 410 411 if ( 'borderless-elementor-circular-progress-bar-stroke-solid-color' === $settings['borderless_circular_progress_bar_stroke_color_style'] ) { 412 $borderless_circular_progress_bar_stroke_color_style = 'stroke_color_mode="solid" stroke_color="' . esc_attr( $settings['borderless_circular_progress_bar_stroke_color'] ) . '"'; 429 413 } else { 430 $borderless_circular_progress_bar_stroke_color_style = 'stroke_color_mode="gradient" stroke_color="' .esc_attr($settings['borderless_circular_progress_bar_stroke_color']).'" stroke_color_from="'.esc_attr($settings['borderless_circular_progress_bar_stroke_color_from']).'" stroke_color_to="'.esc_attr($settings['borderless_circular_progress_bar_stroke_color_to']).'"';414 $borderless_circular_progress_bar_stroke_color_style = 'stroke_color_mode="gradient" stroke_color="' . esc_attr( $settings['borderless_circular_progress_bar_stroke_color'] ) . '" stroke_color_from="' . esc_attr( $settings['borderless_circular_progress_bar_stroke_color_from'] ) . '" stroke_color_to="' . esc_attr( $settings['borderless_circular_progress_bar_stroke_color_to'] ) . '"'; 431 415 } 432 416 433 echo'<div class="borderless-elementor-circular-progress-bar-widget '.esc_attr($settings['borderless_circular_progress_bar_alignment']).'"><div class="borderless-elementor-circular-progress-bar '.esc_attr($settings['borderless_circular_progress_bar_shape']).'" title="'.esc_attr($settings['borderless_circular_progress_bar_title']).'" counter_value="'.esc_attr($settings['borderless_circular_progress_bar_counter_value']['size']).'" '.$borderless_circular_progress_bar_stroke_color_style.' trail_color="'.esc_attr($settings['borderless_circular_progress_bar_trail_color']).'" counter_color="'.esc_attr($settings['borderless_circular_progress_bar_counter_color']).'" stroke_width="'.esc_attr($settings['borderless_circular_progress_bar_stroke_width']['size']).'" trail_width="'.esc_attr($settings['borderless_circular_progress_bar_trail_width']['size']).'" animation_duration="'.esc_attr($settings['borderless_circular_progress_bar_animation_duration']['size']).'"> 434 </div></div>'; 435 417 echo '<div class="borderless-elementor-circular-progress-bar-widget ' . esc_attr( $settings['borderless_circular_progress_bar_alignment'] ) . '"> 418 <div class="borderless-elementor-circular-progress-bar ' . esc_attr( $settings['borderless_circular_progress_bar_shape'] ) . '" 419 title="' . $safe_title . '" 420 counter_value="' . esc_attr( $settings['borderless_circular_progress_bar_counter_value']['size'] ) . '" 421 ' . $borderless_circular_progress_bar_stroke_color_style . ' 422 trail_color="' . esc_attr( $settings['borderless_circular_progress_bar_trail_color'] ) . '" 423 counter_color="' . esc_attr( $settings['borderless_circular_progress_bar_counter_color'] ) . '" 424 stroke_width="' . esc_attr( $settings['borderless_circular_progress_bar_stroke_width']['size'] ) . '" 425 trail_width="' . esc_attr( $settings['borderless_circular_progress_bar_trail_width']['size'] ) . '" 426 animation_duration="' . esc_attr( $settings['borderless_circular_progress_bar_animation_duration']['size'] ) . '"> 427 </div> 428 </div>'; 436 429 } 437 430 438 protected function _content_template() { 439 440 } 441 442 431 protected function _content_template() {} 443 432 } -
borderless/trunk/modules/elementor/widgets/progress-bar.php
r3132733 r3302155 19 19 20 20 public function get_title() { 21 return esc_html__( 'Progress Bar', 'borderless' );21 return esc_html__( 'Progress Bar', 'borderless' ); 22 22 } 23 23 … … 30 30 } 31 31 32 public function get_keywords() 33 { 32 public function get_keywords() { 34 33 return [ 35 34 'progress bar', … … 41 40 } 42 41 43 public function get_custom_help_url() 44 { 42 public function get_custom_help_url() { 45 43 return 'https://wpborderless.com/'; 46 44 } 47 45 48 46 public function get_style_depends() { 49 return 50 [ 51 'borderless-elementor-style' 52 ]; 47 return [ 'borderless-elementor-style' ]; 53 48 } 54 49 55 50 public function get_script_depends() { 56 return 57 [ 58 'borderless-elementor-appear-script', 59 'borderless-elementor-progressbar-script' 60 ]; 51 return [ 52 'borderless-elementor-appear-script', 53 'borderless-elementor-progressbar-script', 54 ]; 61 55 } 62 56 63 57 protected function _register_controls() { 64 58 65 66 59 /*-----------------------------------------------------------------------------------*/ 67 60 /* *. Layout 68 61 /*-----------------------------------------------------------------------------------*/ 69 70 62 $this->start_controls_section( 71 63 'borderless_elementor_section_progress_bar_layout', 72 64 [ 73 65 'label' => esc_html__( 'Layout', 'borderless' ), 74 'tab' => Controls_Manager::TAB_CONTENT,66 'tab' => Controls_Manager::TAB_CONTENT, 75 67 ] 76 68 ); … … 79 71 'borderless_elementor_progress_bar_title', 80 72 [ 81 'label' => esc_html__( 'Title', 'borderless'), 82 'type' => Controls_Manager::TEXT, 83 'dynamic' => [ 84 'active' => true, 85 ], 73 'label' => esc_html__( 'Title', 'borderless' ), 74 'type' => Controls_Manager::TEXT, 75 'dynamic' => [ 'active' => true ], 86 76 ] 87 77 ); … … 90 80 'borderless_elementor_progress_bar_counter_value', 91 81 [ 92 'label' => esc_html__( 'Counter Value', 'borderless'),93 'type' => Controls_Manager::SLIDER,94 'size_units' => [ '%'],95 'range'=> [96 '%' => [82 'label' => esc_html__( 'Counter Value', 'borderless' ), 83 'type' => Controls_Manager::SLIDER, 84 'size_units' => [ '%' ], 85 'range' => [ 86 '%' => [ 97 87 'min' => 1, 98 88 'max' => 100, 99 89 ], 100 90 ], 101 'default' => [91 'default' => [ 102 92 'unit' => '%', 103 93 'size' => 50, 104 94 ], 105 'separator' => 'before',95 'separator' => 'before', 106 96 ] 107 97 ); … … 110 100 'borderless_elementor_progress_bar_animation_duration', 111 101 [ 112 'label' => __('Animation Duration', 'borderless'),113 'type' => Controls_Manager::SLIDER,114 'size_units' => [ 'px'],115 'range' => [102 'label' => __( 'Animation Duration', 'borderless' ), 103 'type' => Controls_Manager::SLIDER, 104 'size_units' => [ 'px' ], 105 'range' => [ 116 106 'px' => [ 117 'min' => 1000,118 'max' => 10000,107 'min' => 1000, 108 'max' => 10000, 119 109 'step' => 100, 120 110 ], 121 111 ], 122 'default' => [112 'default' => [ 123 113 'unit' => 'px', 124 114 'size' => 1500, 125 115 ], 126 'separator' => 'before',116 'separator' => 'before', 127 117 ] 128 118 ); … … 131 121 132 122 133 /*-----------------------------------------------------------------------------------*/ 134 /* *. Layout - Style 135 /*-----------------------------------------------------------------------------------*/ 136 137 $this->start_controls_section( 138 'borderless_elementor_section_progress_bar_styles_general', 139 [ 140 'label' => esc_html__( 'General', 'borderless'), 141 'tab' => Controls_Manager::TAB_STYLE 142 ] 143 ); 144 145 $this->add_control( 146 'borderless_elementor_progress_bar_alignment', 147 [ 148 'label' => __('Alignment', 'borderless'), 149 'type' => \Elementor\Controls_Manager::CHOOSE, 150 'options' => [ 151 'borderless-elementor-progress-bar-alignment-left' => [ 152 'title' => __('Left', 'borderless'), 153 'icon' => 'fa fa-align-left', 154 ], 155 'borderless-elementor-progress-bar-alignment-center' => [ 156 'title' => __('Center', 'borderless'), 157 'icon' => 'fa fa-align-center', 158 ], 159 'borderless-elementor-progress-bar-alignment-right' => [ 160 'title' => __('Right', 'borderless'), 161 'icon' => 'fa fa-align-right', 162 ], 163 ], 164 'default' => 'borderless-elementor-progress-bar-alignment-center', 165 ] 166 ); 167 168 $this->add_control( 169 'borderless_elementor_progress_bar_size', 170 [ 171 'label' => __('Size', 'borderless'), 172 'type' => Controls_Manager::SLIDER, 173 'size_units' => ['%'], 174 'range' => [ 175 '%' => [ 176 'min' => 1, 177 'max' => 100, 178 'step' => 1, 179 ], 180 ], 181 'default' => [ 182 'unit' => '%', 183 'size' => 100, 184 ], 185 'selectors' => [ 186 '{{WRAPPER}} .borderless-elementor-progress-bar' => 'width: {{SIZE}}{{UNIT}};', 187 ], 188 'separator' => 'before', 189 ] 190 ); 191 192 $this->add_control( 193 'borderless_elementor_progress_bar_stroke_width', 194 [ 195 'label' => __('Stroke Width', 'borderless'), 196 'type' => Controls_Manager::SLIDER, 197 'size_units' => ['px'], 198 'range' => [ 199 'px' => [ 200 'min' => 0, 201 'max' => 100, 202 'step' => 1, 203 ], 204 ], 205 'default' => [ 206 'unit' => 'px', 207 'size' => 2, 208 ], 209 'separator' => 'before', 210 ] 211 ); 212 213 $this->add_control( 214 'borderless_elementor_progress_bar_stroke_color_style', 215 [ 216 'label' => __( 'Stroke Color Style', 'borderless' ), 217 'type' => \Elementor\Controls_Manager::SELECT, 218 'default' => 'borderless-elementor-progress-bar-stroke-solid-color', 219 'options' => [ 220 'borderless-elementor-progress-bar-stroke-solid-color' => __( 'Solid', 'borderless' ), 221 'borderless-elementor-progress-bar-stroke-gradient-color' => __( 'Gradient', 'borderless' ), 222 ], 223 ] 224 ); 225 226 $this->add_control( 227 'borderless_elementor_progress_bar_stroke_color', 228 [ 229 'label' => __('Stroke Color', 'borderless'), 230 'type' => Controls_Manager::COLOR, 231 'default' => '#000', 232 'condition' => [ 233 'borderless_elementor_progress_bar_stroke_color_style' => 'borderless-elementor-progress-bar-stroke-solid-color', 234 ], 235 ] 236 ); 237 238 $this->add_control( 239 'borderless_elementor_progress_bar_stroke_color_from', 240 [ 241 'label' => __('Stroke Color From', 'borderless'), 242 'type' => Controls_Manager::COLOR, 243 'default' => '#000', 244 'condition' => [ 245 'borderless_elementor_progress_bar_stroke_color_style' => 'borderless-elementor-progress-bar-stroke-gradient-color', 246 ], 247 ] 248 ); 249 250 $this->add_control( 251 'borderless_elementor_progress_bar_stroke_color_to', 252 [ 253 'label' => __('Stroke Color To', 'borderless'), 254 'type' => Controls_Manager::COLOR, 255 'default' => '#000', 256 'condition' => [ 257 'borderless_elementor_progress_bar_stroke_color_style' => 'borderless-elementor-progress-bar-stroke-gradient-color', 258 ], 259 ] 260 ); 261 262 $this->add_control( 263 'borderless_elementor_progress_bar_trail_width', 264 [ 265 'label' => __('Trail Width', 'borderless'), 266 'type' => Controls_Manager::SLIDER, 267 'size_units' => ['px'], 268 'range' => [ 269 'px' => [ 270 'min' => 0, 271 'max' => 100, 272 'step' => 1, 273 ], 274 ], 275 'default' => [ 276 'unit' => 'px', 277 'size' => 2, 278 ], 279 'separator' => 'before', 280 ] 281 ); 282 283 $this->add_control( 284 'borderless_elementor_progress_bar_trail_color', 285 [ 286 'label' => __('Trail Color', 'borderless'), 287 'type' => Controls_Manager::COLOR, 288 'default' => '#eee', 289 ] 290 ); 291 292 $this->add_control( 293 'borderless_elementor_progress_bar_background_color', 294 [ 295 'label' => __('Background Color', 'borderless'), 296 'type' => Controls_Manager::COLOR, 297 'default' => '#fff', 298 'selectors' => [ 299 '{{WRAPPER}} .borderless-elementor-progress-bar' => 'background-color: {{VALUE}}', 300 ], 301 'separator' => 'before', 302 ] 303 ); 304 305 $this->add_group_control( 306 Group_Control_Box_Shadow::get_type(), 307 [ 308 'name' => 'borderless_elementor_progress_bar_box_shadow', 309 'label' => __('Box Shadow', 'borderless'), 310 'selector' => '{{WRAPPER}} .borderless-elementor-progress-bar', 311 'separator' => 'before', 312 ] 313 ); 314 315 $this->end_controls_section(); 316 317 /*-----------------------------------------------------------------------------------*/ 318 /* *. Typography - Style 319 /*-----------------------------------------------------------------------------------*/ 320 321 $this->start_controls_section( 322 'borderless_section_circular_progress_bar_typography', 323 [ 324 'label' => __('Typography', 'borderless'), 325 'tab' => Controls_Manager::TAB_STYLE, 326 ] 327 ); 328 329 $this->add_group_control( 330 Group_Control_Typography::get_type(), 331 [ 332 'name' => 'borderless_elementor_progress_bar_title_typography', 333 'label' => __('Title', 'borderless'), 334 'global' => [ 335 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 336 ], 337 'selector' => '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-title', 338 ] 339 ); 340 341 $this->add_control( 342 'borderless_elementor_progress_bar_title_color', 343 [ 344 'label' => __('Title Color', 'borderless'), 345 'type' => Controls_Manager::COLOR, 346 'default' => '', 347 'selectors' => [ 348 '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-title' => 'color: {{VALUE}}', 349 ], 350 'separator' => 'after', 351 ] 352 ); 353 354 $this->add_group_control( 355 Group_Control_Typography::get_type(), 356 [ 357 'name' => 'borderless_elementor_progress_bar_counter_typography', 358 'label' => __('Counter', 'borderless'), 359 'global' => [ 360 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 361 ], 362 'selector' => '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-counter-value', 363 ] 364 ); 365 366 $this->add_control( 367 'borderless_elementor_progress_bar_counter_color', 368 [ 369 'label' => __('Counter Color', 'borderless'), 370 'type' => Controls_Manager::COLOR, 371 'default' => '', 372 'separator' => 'after', 373 ] 374 ); 375 376 $this->add_group_control( 377 Group_Control_Typography::get_type(), 378 [ 379 'name' => 'borderless_elementor_progress_bar_postfix_typography', 380 'label' => __('Postfix', 'borderless'), 381 'global' => [ 382 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 383 ], 384 'selector' => '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-counter-postfix', 385 ] 386 ); 387 388 $this->add_control( 389 'borderless_elementor_progress_bar_postfix_color', 390 [ 391 'label' => __('Postfix Color', 'borderless'), 392 'type' => Controls_Manager::COLOR, 393 'default' => '', 394 'selectors' => [ 395 '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-counter-postfix' => 'color: {{VALUE}}', 396 ], 397 ] 398 ); 399 400 $this->end_controls_section(); 401 123 /*-----------------------------------------------------------------------------------*/ 124 /* *. Layout - Style 125 /*-----------------------------------------------------------------------------------*/ 126 $this->start_controls_section( 127 'borderless_elementor_section_progress_bar_styles_general', 128 [ 129 'label' => esc_html__( 'General', 'borderless' ), 130 'tab' => Controls_Manager::TAB_STYLE, 131 ] 132 ); 133 134 $this->add_control( 135 'borderless_elementor_progress_bar_alignment', 136 [ 137 'label' => __( 'Alignment', 'borderless' ), 138 'type' => Controls_Manager::CHOOSE, 139 'options' => [ 140 'borderless-elementor-progress-bar-alignment-left' => [ 141 'title' => __( 'Left', 'borderless' ), 142 'icon' => 'fa fa-align-left', 143 ], 144 'borderless-elementor-progress-bar-alignment-center' => [ 145 'title' => __( 'Center', 'borderless' ), 146 'icon' => 'fa fa-align-center', 147 ], 148 'borderless-elementor-progress-bar-alignment-right' => [ 149 'title' => __( 'Right', 'borderless' ), 150 'icon' => 'fa fa-align-right', 151 ], 152 ], 153 'default' => 'borderless-elementor-progress-bar-alignment-center', 154 ] 155 ); 156 157 $this->add_control( 158 'borderless_elementor_progress_bar_size', 159 [ 160 'label' => __( 'Size', 'borderless' ), 161 'type' => Controls_Manager::SLIDER, 162 'size_units' => [ '%' ], 163 'range' => [ 164 '%' => [ 165 'min' => 1, 166 'max' => 100, 167 'step' => 1, 168 ], 169 ], 170 'default' => [ 171 'unit' => '%', 172 'size' => 100, 173 ], 174 'selectors' => [ 175 '{{WRAPPER}} .borderless-elementor-progress-bar' => 'width: {{SIZE}}{{UNIT}};', 176 ], 177 'separator' => 'before', 178 ] 179 ); 180 181 $this->add_control( 182 'borderless_elementor_progress_bar_stroke_width', 183 [ 184 'label' => __( 'Stroke Width', 'borderless' ), 185 'type' => Controls_Manager::SLIDER, 186 'size_units' => [ 'px' ], 187 'range' => [ 188 'px' => [ 189 'min' => 0, 190 'max' => 100, 191 'step' => 1, 192 ], 193 ], 194 'default' => [ 195 'unit' => 'px', 196 'size' => 2, 197 ], 198 'separator' => 'before', 199 ] 200 ); 201 202 $this->add_control( 203 'borderless_elementor_progress_bar_stroke_color_style', 204 [ 205 'label' => __( 'Stroke Color Style', 'borderless' ), 206 'type' => Controls_Manager::SELECT, 207 'default' => 'borderless-elementor-progress-bar-stroke-solid-color', 208 'options' => [ 209 'borderless-elementor-progress-bar-stroke-solid-color' => __( 'Solid', 'borderless' ), 210 'borderless-elementor-progress-bar-stroke-gradient-color' => __( 'Gradient', 'borderless' ), 211 ], 212 ] 213 ); 214 215 $this->add_control( 216 'borderless_elementor_progress_bar_stroke_color', 217 [ 218 'label' => __( 'Stroke Color', 'borderless' ), 219 'type' => Controls_Manager::COLOR, 220 'default' => '#000', 221 'condition' => [ 222 'borderless_elementor_progress_bar_stroke_color_style' => 'borderless-elementor-progress-bar-stroke-solid-color', 223 ], 224 ] 225 ); 226 227 $this->add_control( 228 'borderless_elementor_progress_bar_stroke_color_from', 229 [ 230 'label' => __( 'Stroke Color From', 'borderless' ), 231 'type' => Controls_Manager::COLOR, 232 'default' => '#000', 233 'condition' => [ 234 'borderless_elementor_progress_bar_stroke_color_style' => 'borderless-elementor-progress-bar-stroke-gradient-color', 235 ], 236 ] 237 ); 238 239 $this->add_control( 240 'borderless_elementor_progress_bar_stroke_color_to', 241 [ 242 'label' => __( 'Stroke Color To', 'borderless' ), 243 'type' => Controls_Manager::COLOR, 244 'default' => '#000', 245 'condition' => [ 246 'borderless_elementor_progress_bar_stroke_color_style' => 'borderless-elementor-progress-bar-stroke-gradient-color', 247 ], 248 ] 249 ); 250 251 $this->add_control( 252 'borderless_elementor_progress_bar_trail_width', 253 [ 254 'label' => __( 'Trail Width', 'borderless' ), 255 'type' => Controls_Manager::SLIDER, 256 'size_units' => [ 'px' ], 257 'range' => [ 258 'px' => [ 259 'min' => 0, 260 'max' => 100, 261 'step' => 1, 262 ], 263 ], 264 'default' => [ 265 'unit' => 'px', 266 'size' => 2, 267 ], 268 'separator' => 'before', 269 ] 270 ); 271 272 $this->add_control( 273 'borderless_elementor_progress_bar_trail_color', 274 [ 275 'label' => __( 'Trail Color', 'borderless' ), 276 'type' => Controls_Manager::COLOR, 277 'default' => '#eee', 278 ] 279 ); 280 281 $this->add_control( 282 'borderless_elementor_progress_bar_background_color', 283 [ 284 'label' => __( 'Background Color', 'borderless' ), 285 'type' => Controls_Manager::COLOR, 286 'default' => '#fff', 287 'selectors' => [ 288 '{{WRAPPER}} .borderless-elementor-progress-bar' => 'background-color: {{VALUE}}', 289 ], 290 'separator' => 'before', 291 ] 292 ); 293 294 $this->add_group_control( 295 Group_Control_Box_Shadow::get_type(), 296 [ 297 'name' => 'borderless_elementor_progress_bar_box_shadow', 298 'label' => __( 'Box Shadow', 'borderless' ), 299 'selector' => '{{WRAPPER}} .borderless-elementor-progress-bar', 300 'separator'=> 'before', 301 ] 302 ); 303 304 $this->end_controls_section(); 305 306 307 /*-----------------------------------------------------------------------------------*/ 308 /* *. Typography - Style 309 /*-----------------------------------------------------------------------------------*/ 310 $this->start_controls_section( 311 'borderless_section_circular_progress_bar_typography', 312 [ 313 'label' => __( 'Typography', 'borderless' ), 314 'tab' => Controls_Manager::TAB_STYLE, 315 ] 316 ); 317 318 $this->add_group_control( 319 Group_Control_Typography::get_type(), 320 [ 321 'name' => 'borderless_elementor_progress_bar_title_typography', 322 'label' => __( 'Title', 'borderless' ), 323 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 324 'selector'=> '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-title', 325 ] 326 ); 327 328 $this->add_control( 329 'borderless_elementor_progress_bar_title_color', 330 [ 331 'label' => __( 'Title Color', 'borderless' ), 332 'type' => Controls_Manager::COLOR, 333 'default' => '', 334 'selectors' => [ 335 '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-title' => 'color: {{VALUE}}', 336 ], 337 'separator'=> 'after', 338 ] 339 ); 340 341 $this->add_group_control( 342 Group_Control_Typography::get_type(), 343 [ 344 'name' => 'borderless_elementor_progress_bar_counter_typography', 345 'label' => __( 'Counter', 'borderless' ), 346 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 347 'selector' => '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-counter-value', 348 ] 349 ); 350 351 $this->add_control( 352 'borderless_elementor_progress_bar_counter_color', 353 [ 354 'label' => __( 'Counter Color', 'borderless' ), 355 'type' => Controls_Manager::COLOR, 356 'default' => '', 357 'separator'=> 'after', 358 ] 359 ); 360 361 $this->add_group_control( 362 Group_Control_Typography::get_type(), 363 [ 364 'name' => 'borderless_elementor_progress_bar_postfix_typography', 365 'label' => __( 'Postfix', 'borderless' ), 366 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 367 'selector' => '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-counter-postfix', 368 ] 369 ); 370 371 $this->add_control( 372 'borderless_elementor_progress_bar_postfix_color', 373 [ 374 'label' => __( 'Postfix Color', 'borderless' ), 375 'type' => Controls_Manager::COLOR, 376 'default' => '', 377 'selectors' => [ 378 '{{WRAPPER}} .borderless-elementor-progress-bar .progressbar-text div .borderless-elementor-progress-bar-counter-postfix' => 'color: {{VALUE}}', 379 ], 380 ] 381 ); 382 383 $this->end_controls_section(); 402 384 } 403 385 … … 405 387 /* *. Render 406 388 /*-----------------------------------------------------------------------------------*/ 407 408 389 protected function render() { 409 390 $settings = $this->get_settings_for_display(); 410 411 if ($settings['borderless_elementor_progress_bar_stroke_color_style'] == 'borderless-elementor-progress-bar-stroke-solid-color') { 412 $borderless_elementor_progress_bar_stroke_color_style = 'stroke_color_mode="solid" stroke_color="' . esc_attr($settings['borderless_elementor_progress_bar_stroke_color']) . '"'; 391 392 // Sanitize and escape the Title field to prevent stored XSS 393 $raw_title = $settings['borderless_elementor_progress_bar_title']; 394 $clean_title = sanitize_text_field( $raw_title ); 395 $safe_title = esc_js( $clean_title ); 396 397 if ( 'borderless-elementor-progress-bar-stroke-solid-color' === $settings['borderless_elementor_progress_bar_stroke_color_style'] ) { 398 $stroke_color_style = 'stroke_color_mode="solid" stroke_color="' . esc_attr( $settings['borderless_elementor_progress_bar_stroke_color'] ) . '"'; 413 399 } else { 414 $borderless_elementor_progress_bar_stroke_color_style = 'stroke_color_mode="gradient" stroke_color="' . esc_attr($settings['borderless_elementor_progress_bar_stroke_color']) . '" stroke_color_from="' . esc_attr($settings['borderless_elementor_progress_bar_stroke_color_from']) . '" stroke_color_to="' . esc_attr($settings['borderless_elementor_progress_bar_stroke_color_to']) . '"'; 400 $stroke_color_style = 'stroke_color_mode="gradient" ' 401 . 'stroke_color="' . esc_attr( $settings['borderless_elementor_progress_bar_stroke_color'] ) . '" ' 402 . 'stroke_color_from="' . esc_attr( $settings['borderless_elementor_progress_bar_stroke_color_from'] ) . '" ' 403 . 'stroke_color_to="' . esc_attr( $settings['borderless_elementor_progress_bar_stroke_color_to'] ) . '"'; 415 404 } 416 417 echo '<div class="borderless-elementor-progress-bar-widget ' . esc_attr($settings['borderless_elementor_progress_bar_alignment']) . '"><div class="borderless-elementor-progress-bar ' . esc_attr($settings['borderless_elementor_progress_bar_shape']) . '" title="' . esc_attr($settings['borderless_elementor_progress_bar_title']) . '" counter_value="' . esc_attr($settings['borderless_elementor_progress_bar_counter_value']['size']) . '" ' . $borderless_elementor_progress_bar_stroke_color_style . ' trail_color="' . esc_attr($settings['borderless_elementor_progress_bar_trail_color']) . '" counter_color="' . esc_attr($settings['borderless_elementor_progress_bar_counter_color']) . '" stroke_width="' . esc_attr($settings['borderless_elementor_progress_bar_stroke_width']['size']) . '" trail_width="' . esc_attr($settings['borderless_elementor_progress_bar_trail_width']['size']) . '" animation_duration="' . esc_attr($settings['borderless_elementor_progress_bar_animation_duration']['size']) . '"></div></div>'; 418 } 419 420 421 protected function _content_template() { 422 423 } 424 425 405 406 echo '<div class="borderless-elementor-progress-bar-widget ' . esc_attr( $settings['borderless_elementor_progress_bar_alignment'] ) . '"> 407 <div class="borderless-elementor-progress-bar ' . esc_attr( $settings['borderless_elementor_progress_bar_shape'] ) . '" 408 title="' . $safe_title . '" 409 counter_value="' . esc_attr( $settings['borderless_elementor_progress_bar_counter_value']['size'] ) . '" 410 ' . $stroke_color_style . ' 411 trail_color="' . esc_attr( $settings['borderless_elementor_progress_bar_trail_color'] ) . '" 412 counter_color="' . esc_attr( $settings['borderless_elementor_progress_bar_counter_color'] ) . '" 413 stroke_width="' . esc_attr( $settings['borderless_elementor_progress_bar_stroke_width']['size'] ) . '" 414 trail_width="' . esc_attr( $settings['borderless_elementor_progress_bar_trail_width']['size'] ) . '" 415 animation_duration="' . esc_attr( $settings['borderless_elementor_progress_bar_animation_duration']['size'] ) . '"> 416 </div> 417 </div>'; 418 } 419 420 protected function _content_template() {} 426 421 } -
borderless/trunk/modules/elementor/widgets/semi-circular-progress-bar.php
r3132733 r3302155 19 19 20 20 public function get_title() { 21 return esc_html__( 'Semi Circular Progress Bar', 'borderless' );21 return esc_html__( 'Semi Circular Progress Bar', 'borderless' ); 22 22 } 23 23 … … 30 30 } 31 31 32 public function get_keywords() 33 { 32 public function get_keywords() { 34 33 return [ 35 34 'semi circular progress bar', … … 39 38 'borderless semi circular progress bar', 40 39 'borderless progress bar', 41 'borderless bar' 40 'borderless bar', 42 41 ]; 43 42 } 44 43 45 public function get_custom_help_url() 46 { 44 public function get_custom_help_url() { 47 45 return 'https://wpborderless.com/'; 48 46 } 49 47 50 48 public function get_style_depends() { 51 return 52 [ 53 'borderless-elementor-style' 54 ]; 49 return [ 'borderless-elementor-style' ]; 55 50 } 56 51 57 52 public function get_script_depends() { 58 return 59 [ 60 'borderless-elementor-appear-script', 61 'borderless-elementor-progressbar-script' 62 ]; 53 return [ 54 'borderless-elementor-appear-script', 55 'borderless-elementor-progressbar-script', 56 ]; 63 57 } 64 58 65 59 protected function _register_controls() { 66 67 68 /*-----------------------------------------------------------------------------------*/ 69 /* *. Layout 70 /*-----------------------------------------------------------------------------------*/ 71 60 /* Layout */ 72 61 $this->start_controls_section( 73 62 'borderless_elementor_section_semi_circular_progress_bar_layout', 74 63 [ 75 64 'label' => esc_html__( 'Layout', 'borderless' ), 76 'tab' => Controls_Manager::TAB_CONTENT,65 'tab' => Controls_Manager::TAB_CONTENT, 77 66 ] 78 67 ); … … 81 70 'borderless_elementor_semi_circular_progress_bar_title', 82 71 [ 83 'label' => esc_html__( 'Title', 'borderless'), 84 'type' => Controls_Manager::TEXT, 85 'dynamic' => [ 86 'active' => true, 87 ], 72 'label' => esc_html__( 'Title', 'borderless' ), 73 'type' => Controls_Manager::TEXT, 74 'dynamic' => [ 'active' => true ], 88 75 ] 89 76 ); … … 92 79 'borderless_elementor_semi_circular_progress_bar_counter_value', 93 80 [ 94 'label' => esc_html__( 'Counter Value', 'borderless'),95 'type' => Controls_Manager::SLIDER,96 'size_units' => [ '%'],97 'range'=> [98 '%' => [81 'label' => esc_html__( 'Counter Value', 'borderless' ), 82 'type' => Controls_Manager::SLIDER, 83 'size_units' => [ '%' ], 84 'range' => [ 85 '%' => [ 99 86 'min' => 1, 100 87 'max' => 100, 101 88 ], 102 89 ], 103 'default' => [90 'default' => [ 104 91 'unit' => '%', 105 92 'size' => 50, 106 93 ], 107 'separator' => 'before',94 'separator' => 'before', 108 95 ] 109 96 ); … … 112 99 'borderless_elementor_semi_circular_progress_bar_animation_duration', 113 100 [ 114 'label' => __('Animation Duration', 'borderless'),115 'type' => Controls_Manager::SLIDER,116 'size_units' => [ 'px'],117 'range' => [101 'label' => __( 'Animation Duration', 'borderless' ), 102 'type' => Controls_Manager::SLIDER, 103 'size_units' => [ 'px' ], 104 'range' => [ 118 105 'px' => [ 119 'min' => 1000,120 'max' => 10000,106 'min' => 1000, 107 'max' => 10000, 121 108 'step' => 100, 122 109 ], 123 110 ], 124 'default' => [111 'default' => [ 125 112 'unit' => 'px', 126 113 'size' => 1500, 127 114 ], 128 'separator' => 'before',115 'separator' => 'before', 129 116 ] 130 117 ); … … 132 119 $this->end_controls_section(); 133 120 134 135 /*-----------------------------------------------------------------------------------*/ 136 /* *. Layout - Style 137 /*-----------------------------------------------------------------------------------*/ 138 139 $this->start_controls_section( 140 'borderless_elementor_section_semi_circular_progress_bar_styles_general', 141 [ 142 'label' => esc_html__( 'General', 'borderless'), 143 'tab' => Controls_Manager::TAB_STYLE 144 ] 145 ); 146 147 $this->add_control( 148 'borderless_elementor_semi_circular_progress_bar_alignment', 149 [ 150 'label' => __('Alignment', 'borderless'), 151 'type' => \Elementor\Controls_Manager::CHOOSE, 152 'options' => [ 153 'borderless-elementor-semi-circular-progress-bar-alignment-left' => [ 154 'title' => __('Left', 'borderless'), 155 'icon' => 'fa fa-align-left', 156 ], 157 'borderless-elementor-semi-circular-progress-bar-alignment-center' => [ 158 'title' => __('Center', 'borderless'), 159 'icon' => 'fa fa-align-center', 160 ], 161 'borderless-elementor-semi-circular-progress-bar-alignment-right' => [ 162 'title' => __('Right', 'borderless'), 163 'icon' => 'fa fa-align-right', 164 ], 165 ], 166 'default' => 'borderless-elementor-semi-circular-progress-bar-alignment-center', 167 ] 168 ); 169 170 $this->add_control( 171 'borderless_elementor_semi_circular_progress_bar_size', 172 [ 173 'label' => __('Size', 'borderless'), 174 'type' => Controls_Manager::SLIDER, 175 'size_units' => ['px'], 176 'range' => [ 177 'px' => [ 178 'min' => 50, 179 'max' => 500, 180 'step' => 1, 181 ], 182 ], 183 'default' => [ 184 'unit' => 'px', 185 'size' => 200, 186 ], 187 'selectors' => [ 188 '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar' => 'width: {{SIZE}}{{UNIT}}; height: calc({{SIZE}}{{UNIT}} / 2);', 189 ], 190 'separator' => 'before', 191 ] 192 ); 193 194 $this->add_control( 195 'borderless_elementor_semi_circular_progress_bar_stroke_width', 196 [ 197 'label' => __('Stroke Width', 'borderless'), 198 'type' => Controls_Manager::SLIDER, 199 'size_units' => ['px'], 200 'range' => [ 201 'px' => [ 202 'min' => 0, 203 'max' => 100, 204 'step' => 1, 205 ], 206 ], 207 'default' => [ 208 'unit' => 'px', 209 'size' => 12, 210 ], 211 'separator' => 'before', 212 ] 213 ); 214 215 $this->add_control( 216 'borderless_elementor_semi_circular_progress_bar_stroke_color_style', 217 [ 218 'label' => __( 'Stroke Color Style', 'borderless' ), 219 'type' => \Elementor\Controls_Manager::SELECT, 220 'default' => 'borderless-elementor-semi-circular-progress-bar-stroke-solid-color', 221 'options' => [ 222 'borderless-elementor-semi-circular-progress-bar-stroke-solid-color' => __( 'Solid', 'borderless' ), 223 'borderless-elementor-semi-circular-progress-bar-stroke-gradient-color' => __( 'Gradient', 'borderless' ), 224 ], 225 ] 226 ); 227 228 $this->add_control( 229 'borderless_elementor_semi_circular_progress_bar_stroke_color', 230 [ 231 'label' => __('Stroke Color', 'borderless'), 232 'type' => Controls_Manager::COLOR, 233 'default' => '#000', 234 'condition' => [ 235 'borderless_elementor_semi_circular_progress_bar_stroke_color_style' => 'borderless-elementor-semi-circular-progress-bar-stroke-solid-color', 236 ], 237 ] 238 ); 239 240 $this->add_control( 241 'borderless_elementor_semi_circular_progress_bar_stroke_color_from', 242 [ 243 'label' => __('Stroke Color From', 'borderless'), 244 'type' => Controls_Manager::COLOR, 245 'default' => '#000', 246 'condition' => [ 247 'borderless_elementor_semi_circular_progress_bar_stroke_color_style' => 'borderless-elementor-semi-circular-progress-bar-stroke-gradient-color', 248 ], 249 ] 250 ); 251 252 $this->add_control( 253 'borderless_elementor_semi_circular_progress_bar_stroke_color_to', 254 [ 255 'label' => __('Stroke Color To', 'borderless'), 256 'type' => Controls_Manager::COLOR, 257 'default' => '#000', 258 'condition' => [ 259 'borderless_elementor_semi_circular_progress_bar_stroke_color_style' => 'borderless-elementor-semi-circular-progress-bar-stroke-gradient-color', 260 ], 261 ] 262 ); 263 264 $this->add_control( 265 'borderless_elementor_semi_circular_progress_bar_trail_width', 266 [ 267 'label' => __('Trail Width', 'borderless'), 268 'type' => Controls_Manager::SLIDER, 269 'size_units' => ['px'], 270 'range' => [ 271 'px' => [ 272 'min' => 0, 273 'max' => 100, 274 'step' => 1, 275 ], 276 ], 277 'default' => [ 278 'unit' => 'px', 279 'size' => 12, 280 ], 281 'separator' => 'before', 282 ] 283 ); 284 285 $this->add_control( 286 'borderless_elementor_semi_circular_progress_bar_trail_color', 287 [ 288 'label' => __('Trail Color', 'borderless'), 289 'type' => Controls_Manager::COLOR, 290 'default' => '#eee', 291 ] 292 ); 293 294 $this->add_control( 295 'borderless_elementor_semi_circular_progress_bar_background_color', 296 [ 297 'label' => __('Background Color', 'borderless'), 298 'type' => Controls_Manager::COLOR, 299 'default' => '#fff', 300 'selectors' => [ 301 '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar' => 'background-color: {{VALUE}}', 302 ], 303 ] 304 ); 305 306 $this->end_controls_section(); 307 308 /*-----------------------------------------------------------------------------------*/ 309 /* *. Typography - Style 310 /*-----------------------------------------------------------------------------------*/ 311 312 $this->start_controls_section( 313 'borderless_section_circular_progress_bar_typography', 314 [ 315 'label' => __('Typography', 'borderless'), 316 'tab' => Controls_Manager::TAB_STYLE, 317 ] 318 ); 319 320 $this->add_group_control( 321 Group_Control_Typography::get_type(), 322 [ 323 'name' => 'borderless_elementor_semi_circular_progress_bar_title_typography', 324 'label' => __('Title', 'borderless'), 325 'global' => [ 326 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 327 ], 328 'selector' => '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar .progressbar-text .borderless-elementor-semi-circular-progress-bar-title', 329 ] 330 ); 331 332 $this->add_control( 333 'borderless_elementor_semi_circular_progress_bar_title_color', 334 [ 335 'label' => __('Title Color', 'borderless'), 336 'type' => Controls_Manager::COLOR, 337 'default' => '', 338 'selectors' => [ 339 '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar .progressbar-text .borderless-elementor-semi-circular-progress-bar-title' => 'color: {{VALUE}}', 340 ], 341 'separator' => 'after', 342 ] 343 ); 344 345 $this->add_group_control( 346 Group_Control_Typography::get_type(), 347 [ 348 'name' => 'borderless_elementor_semi_circular_progress_bar_counter_typography', 349 'label' => __('Counter', 'borderless'), 350 'global' => [ 351 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 352 ], 353 'selector' => '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar .progressbar-text .borderless-elementor-semi-circular-progress-bar-counter-value', 354 ] 355 ); 356 357 $this->add_control( 358 'borderless_elementor_semi_circular_progress_bar_counter_color', 359 [ 360 'label' => __('Counter Color', 'borderless'), 361 'type' => Controls_Manager::COLOR, 362 'default' => '', 363 'separator' => 'after', 364 ] 365 ); 366 367 $this->add_group_control( 368 Group_Control_Typography::get_type(), 369 [ 370 'name' => 'borderless_elementor_semi_circular_progress_bar_postfix_typography', 371 'label' => __('Postfix', 'borderless'), 372 'global' => [ 373 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, 374 ], 375 'selector' => '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar-counter-postfix', 376 ] 377 ); 378 379 $this->add_control( 380 'borderless_elementor_semi_circular_progress_bar_postfix_color', 381 [ 382 'label' => __('Postfix Color', 'borderless'), 383 'type' => Controls_Manager::COLOR, 384 'default' => '', 385 'selectors' => [ 386 '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar-counter-postfix' => 'color: {{VALUE}}', 387 ], 388 ] 389 ); 390 391 $this->end_controls_section(); 392 393 } 394 395 /*-----------------------------------------------------------------------------------*/ 396 /* *. Render 397 /*-----------------------------------------------------------------------------------*/ 398 121 /* Layout — Style */ 122 $this->start_controls_section( 123 'borderless_elementor_section_semi_circular_progress_bar_styles_general', 124 [ 125 'label' => esc_html__( 'General', 'borderless' ), 126 'tab' => Controls_Manager::TAB_STYLE, 127 ] 128 ); 129 130 $this->add_control( 131 'borderless_elementor_semi_circular_progress_bar_alignment', 132 [ 133 'label' => __( 'Alignment', 'borderless' ), 134 'type' => Controls_Manager::CHOOSE, 135 'options' => [ 136 'borderless-elementor-semi-circular-progress-bar-alignment-left' => [ 137 'title' => __( 'Left', 'borderless' ), 138 'icon' => 'fa fa-align-left', 139 ], 140 'borderless-elementor-semi-circular-progress-bar-alignment-center' => [ 141 'title' => __( 'Center', 'borderless' ), 142 'icon' => 'fa fa-align-center', 143 ], 144 'borderless-elementor-semi-circular-progress-bar-alignment-right' => [ 145 'title' => __( 'Right', 'borderless' ), 146 'icon' => 'fa fa-align-right', 147 ], 148 ], 149 'default' => 'borderless-elementor-semi-circular-progress-bar-alignment-center', 150 ] 151 ); 152 153 $this->add_control( 154 'borderless_elementor_semi_circular_progress_bar_size', 155 [ 156 'label' => __( 'Size', 'borderless' ), 157 'type' => Controls_Manager::SLIDER, 158 'size_units' => [ 'px' ], 159 'range' => [ 160 'px' => [ 161 'min' => 50, 162 'max' => 500, 163 'step' => 1, 164 ], 165 ], 166 'default' => [ 167 'unit' => 'px', 168 'size' => 200, 169 ], 170 'selectors' => [ 171 '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar' => 'width: {{SIZE}}{{UNIT}}; height: calc({{SIZE}}{{UNIT}} / 2);', 172 ], 173 'separator' => 'before', 174 ] 175 ); 176 177 $this->add_control( 178 'borderless_elementor_semi_circular_progress_bar_stroke_width', 179 [ 180 'label' => __( 'Stroke Width', 'borderless' ), 181 'type' => Controls_Manager::SLIDER, 182 'size_units' => [ 'px' ], 183 'range' => [ 184 'px' => [ 185 'min' => 0, 186 'max' => 100, 187 'step' => 1, 188 ], 189 ], 190 'default' => [ 191 'unit' => 'px', 192 'size' => 12, 193 ], 194 'separator' => 'before', 195 ] 196 ); 197 198 $this->add_control( 199 'borderless_elementor_semi_circular_progress_bar_stroke_color_style', 200 [ 201 'label' => __( 'Stroke Color Style', 'borderless' ), 202 'type' => Controls_Manager::SELECT, 203 'default' => 'borderless-elementor-semi-circular-progress-bar-stroke-solid-color', 204 'options' => [ 205 'borderless-elementor-semi-circular-progress-bar-stroke-solid-color' => __( 'Solid', 'borderless' ), 206 'borderless-elementor-semi-circular-progress-bar-stroke-gradient-color' => __( 'Gradient', 'borderless' ), 207 ], 208 ] 209 ); 210 211 $this->add_control( 212 'borderless_elementor_semi_circular_progress_bar_stroke_color', 213 [ 214 'label' => __( 'Stroke Color', 'borderless' ), 215 'type' => Controls_Manager::COLOR, 216 'default' => '#000', 217 'condition' => [ 218 'borderless_elementor_semi_circular_progress_bar_stroke_color_style' => 'borderless-elementor-semi-circular-progress-bar-stroke-solid-color', 219 ], 220 ] 221 ); 222 223 $this->add_control( 224 'borderless_elementor_semi_circular_progress_bar_stroke_color_from', 225 [ 226 'label' => __( 'Stroke Color From', 'borderless' ), 227 'type' => Controls_Manager::COLOR, 228 'default' => '#000', 229 'condition' => [ 230 'borderless_elementor_semi_circular_progress_bar_stroke_color_style' => 'borderless-elementor-semi-circular-progress-bar-stroke-gradient-color', 231 ], 232 ] 233 ); 234 235 $this->add_control( 236 'borderless_elementor_semi_circular_progress_bar_stroke_color_to', 237 [ 238 'label' => __( 'Stroke Color To', 'borderless' ), 239 'type' => Controls_Manager::COLOR, 240 'default' => '#000', 241 'condition' => [ 242 'borderless_elementor_semi_circular_progress_bar_stroke_color_style' => 'borderless-elementor-semi-circular-progress-bar-stroke-gradient-color', 243 ], 244 ] 245 ); 246 247 $this->add_control( 248 'borderless_elementor_semi_circular_progress_bar_trail_width', 249 [ 250 'label' => __( 'Trail Width', 'borderless' ), 251 'type' => Controls_Manager::SLIDER, 252 'size_units' => [ 'px' ], 253 'range' => [ 254 'px' => [ 255 'min' => 0, 256 'max' => 100, 257 'step' => 1, 258 ], 259 ], 260 'default' => [ 261 'unit' => 'px', 262 'size' => 12, 263 ], 264 'separator' => 'before', 265 ] 266 ); 267 268 $this->add_control( 269 'borderless_elementor_semi_circular_progress_bar_trail_color', 270 [ 271 'label' => __( 'Trail Color', 'borderless' ), 272 'type' => Controls_Manager::COLOR, 273 'default' => '#eee', 274 ] 275 ); 276 277 $this->add_control( 278 'borderless_elementor_semi_circular_progress_bar_background_color', 279 [ 280 'label' => __( 'Background Color', 'borderless' ), 281 'type' => Controls_Manager::COLOR, 282 'default' => '#fff', 283 'selectors' => [ 284 '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar' => 'background-color: {{VALUE}}', 285 ], 286 ] 287 ); 288 289 $this->end_controls_section(); 290 291 /* Typography — Style */ 292 $this->start_controls_section( 293 'borderless_section_circular_progress_bar_typography', 294 [ 295 'label' => __( 'Typography', 'borderless' ), 296 'tab' => Controls_Manager::TAB_STYLE, 297 ] 298 ); 299 300 $this->add_group_control( 301 Group_Control_Typography::get_type(), 302 [ 303 'name' => 'borderless_elementor_semi_circular_progress_bar_title_typography', 304 'label' => __( 'Title', 'borderless' ), 305 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 306 'selector'=> '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar .progressbar-text .borderless-elementor-semi-circular-progress-bar-title', 307 ] 308 ); 309 310 $this->add_control( 311 'borderless_elementor_semi_circular_progress_bar_title_color', 312 [ 313 'label' => __( 'Title Color', 'borderless' ), 314 'type' => Controls_Manager::COLOR, 315 'default' => '', 316 'selectors' => [ 317 '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar .progressbar-text .borderless-elementor-semi-circular-progress-bar-title' => 'color: {{VALUE}}', 318 ], 319 'separator'=> 'after', 320 ] 321 ); 322 323 $this->add_group_control( 324 Group_Control_Typography::get_type(), 325 [ 326 'name' => 'borderless_elementor_semi_circular_progress_bar_counter_typography', 327 'label' => __( 'Counter', 'borderless' ), 328 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 329 'selector' => '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar .progressbar-text .borderless-elementor-semi-circular-progress-bar-counter-value', 330 ] 331 ); 332 333 $this->add_control( 334 'borderless_elementor_semi_circular_progress_bar_counter_color', 335 [ 336 'label' => __( 'Counter Color', 'borderless' ), 337 'type' => Controls_Manager::COLOR, 338 'default' => '', 339 'separator'=> 'after', 340 ] 341 ); 342 343 $this->add_group_control( 344 Group_Control_Typography::get_type(), 345 [ 346 'name' => 'borderless_elementor_semi_circular_progress_bar_postfix_typography', 347 'label' => __( 'Postfix', 'borderless' ), 348 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 349 'selector' => '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar-counter-postfix', 350 ] 351 ); 352 353 $this->add_control( 354 'borderless_elementor_semi_circular_progress_bar_postfix_color', 355 [ 356 'label' => __( 'Postfix Color', 'borderless' ), 357 'type' => Controls_Manager::COLOR, 358 'default' => '', 359 'selectors' => [ 360 '{{WRAPPER}} .borderless-elementor-semi-circular-progress-bar-counter-postfix' => 'color: {{VALUE}}', 361 ], 362 ] 363 ); 364 365 $this->end_controls_section(); 366 } 367 368 /* Render */ 399 369 protected function render() { 400 370 $settings = $this->get_settings_for_display(); 401 402 // Aplicar escaping aos estilos de cores da barra de progresso 403 if ($settings['borderless_elementor_semi_circular_progress_bar_stroke_color_style'] == 'borderless-elementor-semi-circular-progress-bar-stroke-solid-color') { 404 $borderless_elementor_semi_circular_progress_bar_stroke_color_style = 'stroke_color_mode="solid" stroke_color="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_stroke_color']) . '"'; 371 372 // Sanitize & escape Title to prevent stored XSS 373 $raw_title = $settings['borderless_elementor_semi_circular_progress_bar_title']; 374 $clean_title = sanitize_text_field( $raw_title ); 375 $safe_title = esc_js( $clean_title ); 376 377 // Stroke color style 378 if ( 'borderless-elementor-semi-circular-progress-bar-stroke-solid-color' === $settings['borderless_elementor_semi_circular_progress_bar_stroke_color_style'] ) { 379 $stroke_color_style = 'stroke_color_mode="solid" stroke_color="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_stroke_color'] ) . '"'; 405 380 } else { 406 $borderless_elementor_semi_circular_progress_bar_stroke_color_style = 'stroke_color_mode="gradient" stroke_color="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_stroke_color']) . '" stroke_color_from="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_stroke_color_from']) . '" stroke_color_to="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_stroke_color_to']) . '"'; 381 $stroke_color_style = 'stroke_color_mode="gradient" ' 382 . 'stroke_color="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_stroke_color'] ) . '" ' 383 . 'stroke_color_from="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_stroke_color_from'] ) . '" ' 384 . 'stroke_color_to="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_stroke_color_to'] ) . '"'; 407 385 } 408 409 // Construção do HTML do widget com valores escapados 410 echo '<div class="borderless-elementor-semi-circular-progress-bar-widget ' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_alignment']) . '"><div class="borderless-elementor-semi-circular-progress-bar" title="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_title']) . '" counter_value="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_counter_value']['size']) . '" ' . $borderless_elementor_semi_circular_progress_bar_stroke_color_style . ' trail_color="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_trail_color']) . '" counter_color="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_counter_color']) . '" stroke_width="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_stroke_width']['size']) . '" trail_width="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_trail_width']['size']) . '" animation_duration="' . esc_attr($settings['borderless_elementor_semi_circular_progress_bar_animation_duration']['size']) . '"></div></div>'; 411 } 412 413 414 protected function _content_template() { 415 416 } 417 418 386 387 echo '<div class="borderless-elementor-semi-circular-progress-bar-widget ' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_alignment'] ) . '"> 388 <div class="borderless-elementor-semi-circular-progress-bar" 389 title="' . $safe_title . '" 390 counter_value="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_counter_value']['size'] ) . '" 391 ' . $stroke_color_style . ' 392 trail_color="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_trail_color'] ) . '" 393 counter_color="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_counter_color'] ) . '" 394 stroke_width="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_stroke_width']['size'] ) . '" 395 trail_width="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_trail_width']['size'] ) . '" 396 animation_duration="' . esc_attr( $settings['borderless_elementor_semi_circular_progress_bar_animation_duration']['size'] ) . '"> 397 </div> 398 </div>'; 399 } 400 401 protected function _content_template() {} 419 402 } -
borderless/trunk/readme.txt
r3267283 r3302155 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.7. 17 Stable tag: 1.7.2 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 82 82 == Changelog == 83 83 84 = 1.7.2 - May 28 2025 = 85 * Fixed - Progress Bar Vulnerability. 86 * Fixed - Circular Progress Bar Vulnerability. 87 * Fixed - Semicircular Progress Bar Vulnerability. 88 84 89 = 1.7.1 - Apr 05 2025 = 85 90 * Improvements - Elementor Widget - Info Box.
Note: See TracChangeset
for help on using the changeset viewer.