Repository navigation
Releases: Clear-pH/clear-pop
Release list
v1.9.0
- New: Expiration Date setting (Display Triggers box). On the chosen date (midnight, site time) the popup stops displaying and is moved to Draft. A scheduled WP-Cron event handles it on time, and a check on each page load catches anything cron missed. Publishing it again brings it back.
v1.8.2 — close-button focus-ring fix
Fix
Close button no longer shows a stray focus ring when a popup is opened by mouse. The circular "border" that appeared once the lazy-loaded body arrived and the modal grew to full height was actually the close button's :focus-visible outline — the modal focused the close button on open, and the layout shift made the browser re-evaluate :focus-visible and paint the ring (it vanished on the next interaction).
modal.js: on open, focus now moves to the labeled dialog container (role="dialog",tabindex="-1") — the recommended ARIA pattern, so screen readers still announce the dialog — instead of the close button. The close button's keyboard focus ring is preserved (it only shows when a keyboard user Tabs to it).modal.css: suppresses the programmatically-focused dialog container's own default outline (it is not Tab-reachable, so no keyboard affordance is lost).
No other behavior changes.
v1.8.1 — cache-safe popup lazy-load + close-button border fix
Fixes
Cache-safe popup lazy-load. The AJAX popup-body endpoint (clearpop_content) no longer requires a nonce. Popup bodies are public, cacheable content — a per-user nonce baked into a full-page-cached document expires (~24h) and then 403s every visitor site-wide ("Sorry — this content could not be loaded"), and a stale wordpress_logged_in cookie poisons wp_get_session_token() so even logged-out visitors fail verification. The request is now validated by confirming it targets a published hsp_popup (unpublished/non-popup ids still 404).
Close-button border honors the setting. When "Add Border to Close Button" is off, the close button now forces border: none !important. The button is a <button>, so a theme's global button styling (e.g. Salient's rounded / see-through border) could paint a ring the setting was meant to suppress. Scoped via :not(.hsp-popup-close-border) so the opt-in border still works when checked.
No changes to accessibility (dialog roles / focus management) or other behavior.
v1.8.0 — Lazy-load popups + dialog focus management
Applies to all sites using clear-pop (auto-update via the plugin updater).
Lazy-load: popup bodies now load over AJAX on first open (with a spinner) instead of printing into the page at load. This keeps heavy markup — and any embedded Gravity Form whose element IDs would otherwise duplicate an inline copy of the same form — out of the initial DOM, fixing duplicate-ID accessibility/validation errors. The footer still renders the body once (discarded) to keep Gravity Forms/Salient asset enqueue unchanged. AJAX render force-registers WPBakery shortcodes (admin-ajax runs as is_admin()).
Dialog accessibility: the popup container now has role=dialog / aria-modal / aria-label; focus moves into the dialog on open, is trapped while open, returns to the trigger on close, and the rest of the page is marked inert + aria-hidden.
v1.7.0 — Responsive close button & popup padding
Responsive controls (1.7.0)
- Close Button Width — separate Desktop / Tablet (≤1024px) / Mobile (≤767px) values; blank inherits the desktop value.
- Popup Padding — optional Tablet (≤1024px) and Mobile (≤767px) px overrides that win over the desktop padding mode at those breakpoints; blank inherits.
- Padding and close-button width now render via a per-popup scoped
<style>block (#hsp-popup-<id>) instead of inline styles, so responsive media-query overrides apply reliably.
Also includes previously-unreleased 1.6.4 work
- Fixed close button / overlay-click / ESC not binding on auto-triggered popups (init bailed when no on-page click-trigger existed).
- Added "Custom (set amount)" Popup Padding option.
- Added "Testing — Every refresh" cookie duration option (bypasses cookies entirely).
- Close-button focus ring changed to
:focus-visible(no ring on mouse click).
Installed sites update automatically via the plugin update checker.
v1.6.0
Popup customization + image fix.
- Popup Background Color setting (inherits the Salient theme background when left blank)
- Close Button Offset (top/right/bottom/left) to nudge the button off the edges
- Close Button Color picker (overrides the Light/Dark style)
- Color pickers now show the Salient theme palette as swatches
- Fix: images inside popups now respect the Salient element's Custom Max Width (popups render outside
#ajax-content-wrap, so base image sizing is re-established inside the popup) - Fix: Close Button Offset inputs no longer overflow the settings metabox
v1.5.1
Bug Fix
- Fix click-triggered popups blocked after first dismissal — The renderer's cookie check prevented popup HTML from being output for any popup previously closed. This broke click-triggered popups (timeline triggers, menu triggers) since the DOM element wasn't on the page. Auto-triggered popups (timed, scroll, exit intent) are unaffected — their cookie logic is handled client-side by triggers.js.
v1.5.0
What's New
- Page targeting: Choose to display popup on all pages or select specific pages only
- Cookie fix: Cookie is now set client-side immediately when popup is closed, instead of relying on an AJAX call that could fail if the user navigates away quickly
- Cookies changed to non-httpOnly so both JavaScript and PHP can read them for reliable trigger checks
Upgrade
Update via the WordPress plugin update notice, or download clear-pop.zip below.
Clear Pop v1.4.1
Bug Fix
- Fixed close button X icon not scaling with custom button width - SVG now uses percentage-based sizing (60%) to scale proportionally with the button
Clear Pop v1.4.0
New Features
- Custom Modal Width - Added "Custom" option to Modal Width dropdown with value input and unit selector (px, vw, %)
- Close Button Width - New field to set close button width (20-100px, height auto with 1:1 aspect ratio)
- Slug-Based Trigger Class - New trigger class option using popup slug (e.g.,
hsp-popup-trigger-my-popup) in addition to ID-based class
Changes
- Renamed "Modal Size" to "Modal Width" for clarity
- Changed height option from "Fixed" to "Custom" for consistency
- Backward compatible with existing popups using "fixed" height mode
Files Changed
includes/class-metabox.php- New fields and save logicincludes/class-modal-renderer.php- Custom width/height renderingassets/js/modal.js- Slug-based trigger supportassets/css/modal.css- Custom width class