Changeset 3417895
- Timestamp:
- 12/12/2025 05:14:21 AM (2 months ago)
- Location:
- daily-slider
- Files:
-
- 40 added
- 7 edited
-
assets/screenshot-10.png (added)
-
assets/screenshot-11.png (added)
-
assets/screenshot-12.png (added)
-
assets/screenshot-8.png (modified) (previous)
-
assets/screenshot-9.png (added)
-
tags/2.3.0 (added)
-
tags/2.3.0/admin (added)
-
tags/2.3.0/admin/dashboard.php (added)
-
tags/2.3.0/admin/welcome-page.php (added)
-
tags/2.3.0/admin/widget-manager.php (added)
-
tags/2.3.0/assets (added)
-
tags/2.3.0/assets/css (added)
-
tags/2.3.0/assets/css/common.css (added)
-
tags/2.3.0/assets/css/vendor (added)
-
tags/2.3.0/assets/css/widgets (added)
-
tags/2.3.0/assets/css/widgets/eldorado.css (added)
-
tags/2.3.0/assets/css/widgets/marqee.css (added)
-
tags/2.3.0/assets/css/widgets/marquee.css (added)
-
tags/2.3.0/assets/css/widgets/pixel.css (added)
-
tags/2.3.0/assets/css/widgets/review-carousel.css (added)
-
tags/2.3.0/assets/images (added)
-
tags/2.3.0/assets/images/item-1.svg (added)
-
tags/2.3.0/assets/images/item-2.svg (added)
-
tags/2.3.0/assets/images/item-3.svg (added)
-
tags/2.3.0/assets/js (added)
-
tags/2.3.0/assets/js/widgets (added)
-
tags/2.3.0/assets/js/widgets/eldorado.js (added)
-
tags/2.3.0/assets/js/widgets/marquee.js (added)
-
tags/2.3.0/assets/js/widgets/pixel.js (added)
-
tags/2.3.0/assets/js/widgets/review-carousel.js (added)
-
tags/2.3.0/daily-slider.php (added)
-
tags/2.3.0/readme.txt (added)
-
tags/2.3.0/widgets (added)
-
tags/2.3.0/widgets/eldorado (added)
-
tags/2.3.0/widgets/eldorado/eldorado.php (added)
-
tags/2.3.0/widgets/marquee (added)
-
tags/2.3.0/widgets/marquee/marquee.php (added)
-
tags/2.3.0/widgets/pixel (added)
-
tags/2.3.0/widgets/pixel/pixel.php (added)
-
tags/2.3.0/widgets/review-carousel (added)
-
tags/2.3.0/widgets/review-carousel/review-carousel.php (added)
-
trunk/admin/widget-manager.php (modified) (1 diff)
-
trunk/assets/css/widgets/marquee.css (modified) (5 diffs)
-
trunk/assets/js/widgets/marquee.js (modified) (10 diffs)
-
trunk/daily-slider.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/widgets/marquee/marquee.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
daily-slider/trunk/admin/widget-manager.php
r3412300 r3417895 58 58 self::add_widget('marquee', [ 59 59 'name' => __('Marquee Slider', 'daily-slider'), 60 'description' => __('Smooth scrolling marquee for logos, testimonials, and continuous content loops .', 'daily-slider'),60 'description' => __('Smooth scrolling marquee for logos, testimonials, and continuous content loops with horizontal and vertical scrolling options.', 'daily-slider'), 61 61 'icon' => 'dashicons-editor-code', 62 62 'category' => 'current', 63 63 'status' => 'active', 64 64 'features' => [ 65 __('Horizontal & vertical scrolling', 'daily-slider'), 65 66 __('Continuous scrolling', 'daily-slider'), 66 67 __('Logo showcase', 'daily-slider'), 67 __('Speed control', 'daily-slider') 68 __('Speed control', 'daily-slider'), 69 __('Pause on hover', 'daily-slider'), 70 __('Edge masking effects', 'daily-slider') 68 71 ] 69 72 ]); -
daily-slider/trunk/assets/css/widgets/marquee.css
r3351312 r3417895 6 6 overflow: hidden; 7 7 position: relative; 8 } 9 10 /* Vertical Scroll Container */ 11 .daily-slider-marquee-slider.vertical-scroll { 12 height: 300px; /* Default height */ 13 width: 100%; 8 14 } 9 15 … … 25 31 } 26 32 33 .daily-slider-marquee-mask-yes .daily-slider-marquee-slider.vertical-scroll { 34 mask-image: linear-gradient( 35 to bottom, 36 transparent, 37 #000 var(--mask-smoothness), 38 #000 calc(100% - var(--mask-smoothness)), 39 transparent 40 ); 41 -webkit-mask-image: linear-gradient( 42 to bottom, 43 transparent, 44 #000 var(--mask-smoothness), 45 #000 calc(100% - var(--mask-smoothness)), 46 transparent 47 ); 48 } 49 27 50 /* Track */ 28 51 .daily-slider-marquee-slider .daily-slider-marquee-slider__track { … … 37 60 } 38 61 62 /* Vertical Track */ 63 .daily-slider-marquee-slider.vertical-scroll 64 .daily-slider-marquee-slider__track { 65 flex-direction: column; 66 height: 100%; 67 white-space: normal; 68 } 69 39 70 /* Content */ 40 71 .daily-slider-marquee-slider .daily-slider-marquee-slider__content { … … 42 73 gap: var(--item-gap, 12px); 43 74 flex-shrink: 0; 75 } 76 77 /* Vertical Content */ 78 .daily-slider-marquee-slider.vertical-scroll 79 .daily-slider-marquee-slider__content { 80 flex-direction: column; 81 display: flex; 82 height: auto; 83 white-space: normal; 44 84 } 45 85 … … 51 91 transition: all 0.3s ease; 52 92 white-space: nowrap; 93 } 94 95 /* Vertical Items */ 96 .daily-slider-marquee-slider.vertical-scroll 97 .daily-slider-marquee-slider__item-box { 98 display: flex; 99 white-space: normal; 100 width: 100%; 101 justify-content: flex-start; 53 102 } 54 103 -
daily-slider/trunk/assets/js/widgets/marquee.js
r3351312 r3417895 5 5 constructor(element) { 6 6 this.widget = element; 7 7 8 8 try { 9 this.settings = JSON.parse(this.widget.dataset.settings || '{}');9 this.settings = JSON.parse(this.widget.dataset.settings || "{}"); 10 10 } catch (error) { 11 console.error( 'Failed to parse marquee settings:', error);11 console.error("Failed to parse marquee settings:", error); 12 12 this.settings = { 13 direction: 'left',13 direction: "left", 14 14 speed: 30, 15 pauseOnHover: true 15 pauseOnHover: true, 16 scrollAxis: "horizontal", 16 17 }; 17 18 } 18 19 19 20 this.track = element.querySelector(".daily-slider-marquee-slider__track"); 20 this.content = element.querySelector(".daily-slider-marquee-slider__content"); 21 21 this.content = element.querySelector( 22 ".daily-slider-marquee-slider__content" 23 ); 24 22 25 if (!this.track || !this.content) { 23 console.error( 'Marquee elements not found');26 console.error("Marquee elements not found"); 24 27 return; 25 28 } 26 29 27 30 this.isInitialized = false; 28 this.uniqueId = "daily-slider-marquee-" + Math.random().toString(36).substr(2, 9); 31 this.uniqueId = 32 "daily-slider-marquee-" + Math.random().toString(36).substr(2, 9); 29 33 this.widget.setAttribute("data-marquee-id", this.uniqueId); 30 34 … … 38 42 } 39 43 40 calculateDuration(content Width) {44 calculateDuration(contentSize) { 41 45 // Base speed is pixels per second (adjust this value to control the base speed) 42 46 const baseSpeed = 100; // pixels per second 43 // Calculate duration based on content widthand desired speed44 const duration = content Width/ baseSpeed;47 // Calculate duration based on content size and desired speed 48 const duration = contentSize / baseSpeed; 45 49 // Use the user's speed setting as a multiplier (higher number = slower) 46 50 return duration * (this.settings.speed / 30); … … 57 61 58 62 initMarquee() { 59 // Calculate content width 60 const contentWidth = this.content.offsetWidth; 61 const duration = this.calculateDuration(contentWidth); 63 // Calculate content size based on scroll axis 64 const isVertical = this.settings.scrollAxis === "vertical"; 65 const contentSize = isVertical 66 ? this.content.offsetHeight 67 : this.content.offsetWidth; 68 const duration = this.calculateDuration(contentSize); 62 69 63 70 // Create single clone for smooth animation … … 68 75 // Add animation styles 69 76 const style = document.createElement("style"); 70 const direction = 71 this.settings.direction === "right" ? "translateX" : "translateX(-"; 72 const startPosition = 73 this.settings.direction === "right" ? `-${contentWidth}px` : "0"; 74 const endPosition = 75 this.settings.direction === "right" ? "0" : `-${contentWidth}px`; 77 78 let startPosition, endPosition; 79 80 if (isVertical) { 81 // Vertical animation 82 if (this.settings.direction === "down") { 83 startPosition = `-${contentSize}px`; 84 endPosition = "0"; 85 } else { 86 startPosition = "0"; 87 endPosition = `-${contentSize}px`; 88 } 89 } else { 90 // Horizontal animation (existing) 91 if (this.settings.direction === "right") { 92 startPosition = `-${contentSize}px`; 93 endPosition = "0"; 94 } else { 95 startPosition = "0"; 96 endPosition = `-${contentSize}px`; 97 } 98 } 99 100 const transformProperty = isVertical ? "translateY" : "translateX"; 76 101 77 102 style.textContent = ` 78 [data-marquee-id="${this.uniqueId}"] .daily-slider-marquee-slider__track { 103 [data-marquee-id="${ 104 this.uniqueId 105 }"] .daily-slider-marquee-slider__track { 79 106 display: flex; 80 animation: daily-slider-marquee-${this.uniqueId} ${duration}s linear infinite; 107 ${isVertical ? "flex-direction: column;" : ""} 108 animation: daily-slider-marquee-${ 109 this.uniqueId 110 } ${duration}s linear infinite; 81 111 animation-play-state: running; 82 112 } 83 113 @keyframes daily-slider-marquee-${this.uniqueId} { 84 from { transform: translateX(${startPosition}); }85 to { transform: translateX(${endPosition}); }114 from { transform: ${transformProperty}(${startPosition}); } 115 to { transform: ${transformProperty}(${endPosition}); } 86 116 } 87 [data-marquee-id="${this.uniqueId}"] .daily-slider-marquee-slider__content { 117 [data-marquee-id="${ 118 this.uniqueId 119 }"] .daily-slider-marquee-slider__content { 88 120 flex-shrink: 0; 89 121 display: flex; 122 ${isVertical ? "flex-direction: column;" : ""} 90 123 align-items: center; 91 124 gap: var(--content-gap, 1rem); … … 118 151 clearTimeout(resizeTimeout); 119 152 resizeTimeout = setTimeout(() => { 120 const newContentWidth = this.content.offsetWidth; 121 const newDuration = this.calculateDuration(newContentWidth); 122 const newStartPosition = 123 this.settings.direction === "right" ? `-${newContentWidth}px` : "0"; 124 const newEndPosition = 125 this.settings.direction === "right" ? "0" : `-${newContentWidth}px`; 153 const isVertical = this.settings.scrollAxis === "vertical"; 154 const newContentSize = isVertical 155 ? this.content.offsetHeight 156 : this.content.offsetWidth; 157 const newDuration = this.calculateDuration(newContentSize); 158 159 let newStartPosition, newEndPosition; 160 161 if (isVertical) { 162 if (this.settings.direction === "down") { 163 newStartPosition = `-${newContentSize}px`; 164 newEndPosition = "0"; 165 } else { 166 newStartPosition = "0"; 167 newEndPosition = `-${newContentSize}px`; 168 } 169 } else { 170 if (this.settings.direction === "right") { 171 newStartPosition = `-${newContentSize}px`; 172 newEndPosition = "0"; 173 } else { 174 newStartPosition = "0"; 175 newEndPosition = `-${newContentSize}px`; 176 } 177 } 178 179 const transformProperty = isVertical ? "translateY" : "translateX"; 126 180 127 181 // Update animation duration … … 130 184 const newKeyframes = ` 131 185 @keyframes daily-slider-marquee-${this.uniqueId} { 132 from { transform: translateX(${newStartPosition}); }133 to { transform: translateX(${newEndPosition}); }186 from { transform: ${transformProperty}(${newStartPosition}); } 187 to { transform: ${transformProperty}(${newEndPosition}); } 134 188 } 135 189 `; … … 150 204 return; 151 205 } 152 206 153 207 try { 154 208 new widgetDailySlider($marqueeWidget[0]); 155 209 } catch (error) { 156 console.error( 'Marquee Slider Error:', error);210 console.error("Marquee Slider Error:", error); 157 211 } 158 212 }; 159 213 160 214 // Initialize in Elementor editor 161 if (typeof elementorFrontend !== 'undefined' && elementorFrontend.isEditMode()) { 215 if ( 216 typeof elementorFrontend !== "undefined" && 217 elementorFrontend.isEditMode() 218 ) { 162 219 // Make sure hooks are available before trying to use them 163 220 if (elementorFrontend.hooks) { … … 166 223 MarqueeHandler 167 224 ); 168 225 169 226 // Also initialize for widgets already in the DOM 170 $(document).ready(function () {171 $(".elementor-widget-daily-slider-marquee").each(function () {227 $(document).ready(function () { 228 $(".elementor-widget-daily-slider-marquee").each(function () { 172 229 MarqueeHandler($(this), $); 173 230 }); … … 175 232 } else { 176 233 // If hooks aren't available yet, wait for them 177 $(window).on("elementor/frontend/init", function () {234 $(window).on("elementor/frontend/init", function () { 178 235 elementorFrontend.hooks.addAction( 179 236 "frontend/element_ready/daily-slider-marquee.default", … … 191 248 ); 192 249 }); 193 250 194 251 // Fallback initialization for non-Elementor themes 195 $(document).ready(function () {252 $(document).ready(function () { 196 253 // Only run this if we're not in Elementor 197 if (typeof elementorFrontend === 'undefined' || !elementorFrontend.isEditMode()) { 198 $(".daily-slider-marquee-slider").each(function() { 254 if ( 255 typeof elementorFrontend === "undefined" || 256 !elementorFrontend.isEditMode() 257 ) { 258 $(".daily-slider-marquee-slider").each(function () { 199 259 try { 200 260 new widgetDailySlider(this); 201 261 } catch (error) { 202 console.error( 'Marquee Slider Error:', error);262 console.error("Marquee Slider Error:", error); 203 263 } 204 264 }); -
daily-slider/trunk/daily-slider.php
r3412300 r3417895 3 3 * Plugin Name: Daily Slider 4 4 * Description: Enhance Elementor with customizable hero sliders, review carousels, and portfolio showcases, featuring responsive design, animations, and hover effects. 5 * Version: 2. 2.05 * Version: 2.3.0 6 6 * Author: wpcoder75 7 7 * Author URI: https://github.com/asikwp75 … … 19 19 20 20 class DailySliderPlugin { 21 const VERSION = '2. 2.0';21 const VERSION = '2.3.0'; 22 22 const MINIMUM_ELEMENTOR_VERSION = '3.26.0'; 23 23 const MINIMUM_PHP_VERSION = '7.4'; -
daily-slider/trunk/readme.txt
r3412300 r3417895 1 1 === Daily Slider - Addons for Elementor === 2 2 Contributors: wpcoder75 3 Tags: elementor , slider, carousel, marquee, hero-slider3 Tags: elementor addons, content slider, image slider, marquee, layer Slider 4 4 Requires at least: 5.0 5 Tested up to: 6. 86 Stable Tag: 2. 2.05 Tested up to: 6.9 6 Stable Tag: 2.3.0 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 P owerful Elementor addon with customizable hero sliders, review carousels, and portfolio showcases featuring responsive design and smooth animations.11 Professional Elementor slider addon with hero sliders, testimonial carousels, image galleries, and animated marquee widgets. Mobile-responsive with advanced customization options. 12 12 13 13 == Description == 14 14 15 DailySlider is a powerful Elementor addon that adds feature-rich slider and carousel widgets to create stunning hero sections, testimonials, and portfolios with ease.15 **Daily Slider** is the ultimate WordPress slider plugin for Elementor page builder that transforms your website with stunning visual elements. Create professional hero sections, testimonial carousels, portfolio galleries, and animated marquee displays with zero coding required. 16 16 17 **DailySlider** is a versatile Elementor addon plugin that allows you to create stunning sliders, carousels, and showcases on your website. Whether you're looking to add a hero section, a testimonial carousel, or a portfolio gallery, DailySlider offers a set of highly customizable and responsive widgets that integrate seamlessly with Elementor. Enhance your website's visual appeal with smooth animations and engaging hover effects for a dynamic user experience. 17 **Perfect for WordPress developers, designers, and business owners** who want to build engaging websites that convert visitors into customers. Our slider widgets are mobile-first, SEO-optimized, and performance-focused to ensure fast loading times across all devices. 18 19 ### Why Choose Daily Slider? 20 21 **4 Premium Slider Widgets** - Hero sliders, testimonial carousels, image galleries, and marquee animations 22 **Mobile-First Design** - Fully responsive on desktop, tablet, and mobile devices 23 **Performance Optimized** - Fast loading with conditional asset loading 24 **SEO Friendly** - Clean HTML markup and semantic structure 25 **Easy Customization** - Visual controls for colors, typography, spacing, and animations 26 **Professional Templates** - Ready-to-use designs for quick implementation 27 **Regular Updates** - Compatible with latest WordPress and Elementor versions 18 28 19 29 20 30 21 ### Key Features: 22 - **Fully responsive design** ensuring your sliders look great on all devices (desktop, tablet, mobile) 23 - **Pixel Widget (Hero Slider)**: Create full-screen, attention-grabbing hero sliders perfect for showcasing high-quality images. 24 - **Review Carousel Widget (Testimonial Carousel)**: Display customer reviews and testimonials in an interactive carousel format. 25 - **Eldorado Widget (Image Carousel)**: Showcase portfolio items or images in a stylish and sleek carousel layout. 26 - **Marquee Slider Widget**: Create smooth scrolling marquee effects for displaying logos, testimonials, or any content in a continuous loop. 27 - **Customization options** for text, images, spacing, colors, and typography. 28 - **Seamless integration with Elementor's drag-and-drop editor** for easy design. 31 ### Complete Slider Solution for WordPress: 29 32 30 This plugin is perfect for creating stunning sliders that elevate your website's aesthetic and functionality with minimal effort.33 **Pixel Hero Slider** - Create stunning full-screen hero sections with parallax effects, custom animations, and call-to-action buttons. Perfect for landing pages and homepage headers. 31 34 32 == Widgets == 35 **Review Carousel Widget** - Showcase customer testimonials and reviews with star ratings, author photos, and social proof elements to boost conversions and build trust. 33 36 34 - **Pixel (Hero Slider)** 35 - A full-screen hero slider widget designed to display your most important content in an eye-catching manner. 36 - Ideal for showcasing high-quality images or videos with smooth animations. 37 **Eldorado Image Gallery** - Display portfolio projects, product galleries, and photography collections with hover effects, lightbox integration, and grid layouts. 37 38 38 - **Review Carousel (Testimonial Carousel)** 39 - Display customer testimonials in a dynamic carousel layout. 40 - Helps you highlight positive reviews and build trust with potential customers. 39 **Marquee Slider Widget** - Create eye-catching scrolling animations for logos, announcements, news tickers, and promotional content with horizontal and vertical scrolling options. 41 40 42 - **Eldorado (Image Carousel)** 43 - An elegant image carousel widget designed for portfolio showcases, photography galleries, or any image-based content. 41 **Advanced Customization** - Visual style controls for typography, colors, spacing, borders, shadows, and responsive breakpoints without touching code. 44 42 45 - **Marquee Slider** 46 - A smooth scrolling marquee widget perfect for displaying logos, testimonials, announcements, or any content in a continuous loop. 47 - Features customizable speed, direction, pause on hover, and edge masking effects. 43 **Performance Features** - Conditional asset loading, lazy loading images, optimized animations, and minimal CSS/JS footprint for faster page speeds. 44 45 ### Perfect for: 46 - **Business Websites** - Showcase services, testimonials, and company achievements 47 - **Portfolio Sites** - Display creative work, projects, and case studies 48 - **E-commerce Stores** - Feature products, customer reviews, and promotional banners 49 - **Agencies & Freelancers** - Create client presentations and service showcases 50 - **Blogs & Media** - Highlight featured content and author testimonials 51 52 **Get started in minutes** with our intuitive drag-and-drop interface and transform your WordPress website into a conversion-focused, professional online presence. 53 54 == Premium Slider Widgets == 55 56 **Pixel Hero Slider** 57 - Full-screen responsive hero sections with parallax scrolling effects 58 - Custom call-to-action buttons with conversion tracking 59 - Background video support and image optimization 60 - Perfect for landing pages, homepages, and sales pages 61 62 **Review & Testimonial Carousel** 63 - Customer testimonial slider with star ratings and photos 64 - Social proof widgets to increase trust and conversions 65 - Schema markup for SEO benefits and rich snippets 66 - Ideal for service businesses and e-commerce stores 67 68 **Eldorado Image Gallery** 69 - Portfolio and product image carousels with lightbox 70 - Masonry grid layouts and hover animation effects 71 - Category filtering and lazy loading for performance 72 - Great for photographers, designers, and online stores 73 74 **Marquee Slider (NEW)** 75 - Horizontal and vertical scrolling text/logo animations 76 - News ticker, brand showcase, and announcement bars 77 - Customizable speed, direction, and pause-on-hover features 78 - Perfect for promotions, partnerships, and dynamic content 48 79 49 80 == Installation == … … 56 87 == Frequently Asked Questions == 57 88 58 = Can I use these widgets on mobile devices? =59 Yes , all widgets are **fully responsive** and optimized for mobile, tablet, and desktop devices. You can customize how they look on each device for a seamless experience.89 = Is Daily Slider compatible with all WordPress themes? = 90 Yes! Daily Slider works with any WordPress theme that supports Elementor page builder. Our widgets are designed to seamlessly integrate with your existing design. 60 91 61 = Does this plugin require Elementor? =62 Yes, this plugin is an **Elementor extension** and works only with the **Elementor page builder**. Make sure Elementor is installed and activated before using this plugin.92 = Can I use these slider widgets on mobile devices? = 93 Absolutely! All slider widgets are **mobile-first responsive** and optimized for desktop, tablet, and mobile devices. You can customize layouts for each device breakpoint. 63 94 64 = Can I customize the animations and effects? = 65 Yes, the plugin provides options to customize **animations**, **hover effects**, and **transitions** for all widgets, allowing you to create unique and interactive content. 95 = Does this plugin require Elementor Pro? = 96 No, Daily Slider works with the free version of Elementor. However, you need **Elementor page builder** installed and activated to use our slider widgets. 97 98 = Will these sliders slow down my website? = 99 No! Our sliders are performance-optimized with conditional asset loading, meaning only the CSS/JS for active widgets will load. This ensures fast page speeds and better SEO rankings. 100 101 = Can I customize the slider animations and effects? = 102 Yes! The plugin provides extensive customization options including **animations**, **hover effects**, **transitions**, **colors**, **typography**, and **responsive settings** - all through Elementor's visual interface. 103 104 = Do you provide customer support? = 105 Yes! We provide comprehensive documentation and support for all Daily Slider features. Check our GitHub repository for updates and community support. 66 106 67 107 … … 69 109 70 110 == Changelog == 111 112 ### = 2.3.0 [12th December 2025] = 113 114 * Added: Vertical scrolling option to Marquee Slider widget — now supports both horizontal and vertical scroll directions. 115 * Added: Vertical direction control (up/down) for vertical marquee animations. 116 * Added: Vertical height control for customizing container height in vertical mode. 117 * Enhanced: Marquee Slider edge masking now works for both horizontal and vertical scrolling. 118 * Improved: Animation performance and responsiveness for vertical scrolling mode. 119 * Updated: JavaScript animation engine to support dynamic axis switching and direction control. 71 120 72 121 ### = 2.2.0 [5th December 2025] = -
daily-slider/trunk/widgets/marquee/marquee.php
r3345410 r3417895 73 73 74 74 $this->add_control( 75 'show_title', 76 [ 77 'label' => __('Show Title', 'daily-slider'), 78 'type' => Controls_Manager::SWITCHER, 79 'label_on' => __('Show', 'daily-slider'), 80 'label_off' => __('Hide', 'daily-slider'), 81 'return_value' => 'yes', 82 'default' => 'yes', 83 ] 84 ); 85 86 $this->add_control( 75 87 'marquee_item_direction', 76 88 [ … … 229 241 230 242 $this->add_control( 243 'scroll_axis', 244 [ 245 'label' => __('Scroll Axis', 'daily-slider'), 246 'type' => Controls_Manager::CHOOSE, 247 'default' => 'horizontal', 248 'options' => [ 249 'horizontal' => [ 250 'title' => __('Horizontal', 'daily-slider'), 251 'icon' => 'eicon-navigation-horizontal', 252 ], 253 'vertical' => [ 254 'title' => __('Vertical', 'daily-slider'), 255 'icon' => 'eicon-navigation-vertical', 256 ], 257 ], 258 'toggle' => false, 259 ] 260 ); 261 262 $this->add_control( 231 263 'pause_on_hover', 232 264 [ … … 257 289 ], 258 290 'toggle' => false, 291 'condition' => [ 292 'scroll_axis' => 'horizontal', 293 ], 294 ] 295 ); 296 297 $this->add_control( 298 'vertical_direction', 299 [ 300 'label' => __('Vertical Direction', 'daily-slider'), 301 'type' => Controls_Manager::CHOOSE, 302 'default' => 'up', 303 'options' => [ 304 'up' => [ 305 'title' => __('Up', 'daily-slider'), 306 'icon' => 'eicon-v-align-top', 307 ], 308 'down' => [ 309 'title' => __('Down', 'daily-slider'), 310 'icon' => 'eicon-v-align-bottom', 311 ], 312 ], 313 'toggle' => false, 314 'condition' => [ 315 'scroll_axis' => 'vertical', 316 ], 259 317 ] 260 318 ); … … 294 352 'size' => 50, 295 353 ], 296 'selectors' => [ 297 '{{WRAPPER}} .daily-slider-marquee-slider__content' => 'gap: {{SIZE}}{{UNIT}};', 298 '{{WRAPPER}} .daily-slider-marquee-slider__track' => 'gap: {{SIZE}}{{UNIT}};', 299 ], 300 'separator' => 'before', 354 'selectors' => [ 355 '{{WRAPPER}} .daily-slider-marquee-slider__content' => 'gap: {{SIZE}}{{UNIT}};', 356 '{{WRAPPER}} .daily-slider-marquee-slider__track' => 'gap: {{SIZE}}{{UNIT}};', 357 ], 358 'separator' => 'before', 359 ] 360 ); 361 362 $this->add_responsive_control( 363 'vertical_height', 364 [ 365 'label' => esc_html__('Vertical Height', 'daily-slider'), 366 'type' => Controls_Manager::SLIDER, 367 'size_units' => ['px', 'vh'], 368 'range' => [ 369 'px' => [ 370 'min' => 100, 371 'max' => 1000, 372 ], 373 'vh' => [ 374 'min' => 10, 375 'max' => 100, 376 ], 377 ], 378 'default' => [ 379 'size' => 300, 380 'unit' => 'px', 381 ], 382 'selectors' => [ 383 '{{WRAPPER}} .daily-slider-marquee-slider.vertical-scroll' => 'height: {{SIZE}}{{UNIT}};', 384 ], 385 'condition' => [ 386 'scroll_axis' => 'vertical', 387 ], 301 388 ] 302 389 ); … … 490 577 'label' => __('Title', 'daily-slider'), 491 578 'tab' => Controls_Manager::TAB_STYLE, 579 'condition' => [ 580 'show_title' => 'yes', 581 ], 492 582 ] 493 583 ); … … 910 1000 } 911 1001 } 912 $this->render_title($item['title']); 1002 1003 if ($settings['show_title'] === 'yes') { 1004 $this->render_title($item['title']); 1005 } 913 1006 } 914 1007 … … 928 1021 } 929 1022 1023 $scroll_axis = $settings['scroll_axis'] ?? 'horizontal'; 1024 $marquee_classes = ['daily-slider-marquee-slider']; 1025 1026 if ($scroll_axis === 'vertical') { 1027 $marquee_classes[] = 'vertical-scroll'; 1028 } 1029 930 1030 $this->add_render_attribute('marquee-slider', [ 931 'class' => 'daily-slider-marquee-slider',1031 'class' => $marquee_classes, 932 1032 'data-settings' => wp_json_encode([ 933 'direction' => $s ettings['marquee_direction'],1033 'direction' => $scroll_axis === 'vertical' ? ($settings['vertical_direction'] ?? 'up') : $settings['marquee_direction'], 934 1034 'speed' => absint($settings['marquee_speed']['size']), 935 'pauseOnHover' => $settings['pause_on_hover'] === 'yes' 1035 'pauseOnHover' => $settings['pause_on_hover'] === 'yes', 1036 'scrollAxis' => $scroll_axis 936 1037 ]) 937 1038 ]);
Note: See TracChangeset
for help on using the changeset viewer.