Skip to content

Releases: xwp/whimsical-promo

1.3

Choose a tag to compare

@mehigh mehigh released this 13 Aug 15:14

Modernize JS. Small touch-ups.

1.2

1.2

Choose a tag to compare

@mehigh mehigh released this 06 Aug 18:38

Add support for exit intents for "show this one first", 15-minute quiet period

1.1

1.1

Choose a tag to compare

@mehigh mehigh released this 06 Aug 15:13

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

1.0

Choose a tag to compare

@mehigh mehigh released this 04 Aug 17:20

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 - Inline at any theme action hook, Exit intent in 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 stylesbasic-1 (clean, default), editorial-insert (paper, print asterism, sonar ping), prime-time (broadcast gradient, glass ring, lens bloom). Register more via whimsical_promo_styles.
  • Three-layer CSSpromo-base.css for 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> with max-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.