feat: RCT inline abbreviation tooltip on verdict legend strip (v2.2.1)
- Add abbrs field to Established verdict taxonomy item - Add peptide_starter_render_desc() helper — builds safe HTML from esc_html/esc_attr components; replaces abbr terms with <abbr> tap-targets - Update front-page.php description output to use render_desc() - Add assets/js/abbr-tooltip.js — popover open/close, outside-click dismissal, keyboard accessibility (Enter/Space/Escape), ARIA attrs - Enqueue abbr-tooltip.js on is_front_page() only - Add .pr-abbr and .pr-abbr-popover CSS with dashed underline affordance, fade-in animation, dark-mode-safe surface variables - Fix PEPTIDE_STARTER_VERSION drift: 2.0.0-alpha.3 → 2.2.1 Routing note: this is a theme change (not PR Core). Term 'RCT' is scoped to the verdict legend strip only; monograph bodies are unaffected.
This commit is contained in:
@@ -101,7 +101,7 @@ $featured_monograph_ids = array( 211, 36, 177 );
|
||||
<span class="pr-verdict__glyph" aria-hidden="true"><?php echo esc_html( $v['glyph'] ); ?></span>
|
||||
<span class="pr-verdict__label"><?php echo esc_html( $v['label'] ); ?></span>
|
||||
</span>
|
||||
<p class="hero-verdict-explainer__desc"><?php echo esc_html( $v['description'] ); ?></p>
|
||||
<p class="hero-verdict-explainer__desc"><?php echo peptide_starter_render_desc( $v['description'], $v['abbrs'] ?? array() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- output is built from esc_html/esc_attr components inside render_desc(). ?></p>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user