Skip to content

v1.11.0

Choose a tag to compare

@github-actions github-actions released this 26 Jun 15:28
· 670 commits to main since this release

Added — try_email / try_phone / term_email / term_phone

  • {{email}} and {{phone}} now have full try_ and term_ variants, generated from the shared modifier machinery — so a contact field gets the same first-available fallback chains and term-context resolution every other base tag already had.
    • try_email / try_phone build a fallback chain of up to 5 slots; the first slot that produces a value wins. Each slot resolves exactly as the standalone tag wouldtry_email returns a finished mailto: link per slot, try_phone a tel: link (with the same default-on link wrap, obfuscation, tel: rebuild, and validation as the base tag). This covers "personal email → team email → site-wide address" without stacking blocks and visibility conditions.
    • A site-field slot is supported on try_email / try_phone — site is the canonical contact fallback (personal address, then the site-wide one). A slot set to src:site reads the wp_options / ACF-options value, not current-post meta. (The other try_* tags still don't offer a site slot; that work is deferred per tag family.)
    • term_email / term_phone read a contact field off a taxonomy term (the term itself, or a related post via src:ref). They do not offer a src:site source — a rooting modifier surfaces term-distinct data, and a site read is entity-blind (it would just duplicate {{email src:site}}). For a site-wide contact read use the base tag or a try_email/try_phone site slot. The src dropdown omits site on every term_* tag; a hand-typed src:site resolves empty at the frontend and shows an invalid-combo warning in the editor preview (⚠ Site source not valid on Term tag — use the base tag). (#37.)
    • Both try_ tags carry the same visibility gate as the base tags (hidden on a/button/img/picture) plus a runtime media-block backstop — a media block's empty tagName slips the native gate, so the tag now returns nothing inside a media block rather than corrupting the <img src> with a link.

Added — try_text / try_title list mode (limit / sep)

  • try_text and try_title now join a multi-result slot instead of silently returning only the first result. When a slot reads across a term hop (srcTermIn) or related posts (src:ref), the new Result Limit and Result Separator options join the results — matching how the standalone {{text}} tag already behaved. Previously a try_text slot truncated a list its base tag would have joined; that parity gap is closed. Default limit is 1 (single result), so existing tags are unchanged unless you raise the limit.

Changed — internal: shared source resolver + derived slot options

  • Unified the email/phone source-resolution code. {{email}} and {{phone}} previously carried byte-identical copies of the field-read pipeline; both now share one resolver (bws_resolve_field_values). No behavior change — the same field reads, validation, and list mode — but the contact tags (base, try_, term_) now read through one path, which is what lets try_/term_ reach full parity. (Issue #32.)
  • try_ slot source/traversal options are now derived from the base builders instead of hand-maintained inline copies, removing silent drift between a base tag's source options and its try_ slots' (e.g. a missing not:site guard). Editor-surface only — no change to how tags resolve. (Issue #26.)
  • Editor preview now shows a from Site context for src:site base tags (e.g. {{text src:site\|key:blogdescription}}['blogdescription' from Site]), matching the existing from Term / from Ref 'X' segments. Previously a site source rendered no context clause. Preview-only.