A lightweight, dev-centric solution for WordPress. Prioritizes page speed by deferring modal rendering to the footer and utilizing a clean, shortcode-driven architecture.
Version 2.1.0 Developer Docs View on WordPress.orgThe Smartupworld Video Modal Plugin is a lightweight, dev-centric solution for WordPress. Unlike standard embed tools, this plugin prioritizes page speed by deferring modal rendering to the footer and utilizing a clean, shortcode-driven architecture. Ideal for technical SEO and high-performance business sites.
Register and trigger video modals using the [video_modal] shortcode. Use the following attributes to customize behavior:
| Attribute | Default | Description |
|---|---|---|
url |
(Required) | Path to MP4 or external video source. |
button |
Watch Video | The text label for the trigger button. |
class |
(None) | Custom CSS classes for button styling. |
[video_modal url="https://mysite.com/video.mp4" button="Watch Story" class="swb-btn-primary"]
To prevent browser caching during development, the plugin includes a SMARTUPWORLD_DEV_MODE toggle. This appends dynamic timestamps to all enqueued assets.
Assets load with random version numbers. Ideal for rapid CSS/JS debugging.
Assets load with fixed versioning for optimal CDN caching.
assets/style.css for UI themes.assets/script.js for autoplay logic.Modal not opening? Confirm wp_footer() is present in your theme template.
Video not loading? Verify the url points to a valid file or supported external source.
Spacing issues? We use shortcode_unautop(), but check for theme-level Paragraph filter conflicts.
No. The modal markup is rendered in the footer and only triggered on click, so it has zero impact on initial page load or LCP.
Yes. The url attribute accepts any valid MP4 path or supported external video source.
Each shortcode generates a unique ID automatically to prevent conflicts.
SMARTUPWORLD_DEV_MODE cache toggle.[video_modal].