Releases: xwp/whimsical-promo
Release list
1.3
1.2
1.1
Exit-intent promos can now reach mobile readers. Exit intent is a cursor gesture - it has never fired on a phone - so an exit-intent promo gains an opt-in checkbox, "Also trigger on mobile when reaching the end of the content", which opens the card once the end of the article scrolls up past a line at 90% of the viewport height. Which element counts as "the article" is a new plugin-wide setting under Promos → Settings → Content selectors: a comma-separated list tried in order, defaulting to .entry-content, .post-content, article, main, so it works on general theme as-is and can be pointed somewhere more precise per site.
1.0
Editor-managed promo cards — newsletter sign-ups, app pitches, any CTA - rendered at a theme hook inside posts or on desktop exit intent. Copy, design and targeting all live in the block editor, so changes ship without a deployment.
Core
- Promo post type with block-editor bodies and a Promo Settings meta box. Drafts, pending and scheduled promos never render; deactivating the plugin is a complete kill switch.
- Two placements -
Inlineat any theme action hook,Exit intentin the footer on cursor-leave (desktop only). - Chaining. Promos sharing a hook form a chain ordered by Page Attributes Order. The first promo the visitor hasn't already interacted with wins; the rest stay hidden. Unticking "stop showing once interacted" makes a promo a permanent fallback.
- Frequency cookies -
whim_seen_<slug>, lifetime configurable per promo (default 30 days). Exit-intent promos spend on open; inline promos spend only on click or submit.
Design
- Three bundled styles —
basic-1(clean, default),editorial-insert(paper, print asterism, sonar ping),prime-time(broadcast gradient, glass ring, lens bloom). Register more viawhimsical_promo_styles. - Three-layer CSS —
promo-base.cssfor structure only, then the style's sheet scoped to#whim-promo-<id>, then per-promo colour/shape overrides. - Per-promo stylesheets served at
/?whim_promo_css=<id>&whim_ver=<hash>withmax-age=31536000, immutable. The hash fingerprints the CSS, so saving a promo changes the URL and nothing needs purging. Bundled templates are minified; author-written custom CSS passes through untouched. Sheets never block first paint. - Automatic body styling. Plain editor markup gets designed: headings become display type, the first paragraph becomes the lead, a paragraph holding only a link becomes the button, lists get accent star markers, shortcode forms get styled fields. Includes a Google "preferred source" chip whose multicolour G is an inline
data:URI - no external request, CSP-safe.