| 开发者 | wouf |
|---|---|
| 更新时间 | 2026年6月23日 18:01 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[wouf_card]. A configurable alias (default [card]) is also available.
Cards are rendered as inline SVG: crisp at any size, no external images, no JavaScript.
Basic usage:
[wouf_card]As Kh[/wouf_card]
Displays an Ace of Spades and a King of Hearts.
Rank notation: A K Q J T 9 8 7 6 5 4 3 2
Suit notation: s (♠ spades) h (♥ hearts) d (♦ diamonds) c (♣ clubs)
Special tokens:
?? — face-down card (card back)PP — face-down deck (stack of cards)_ — half-card spacer (visually separates hole cards from the board)width — card width in pixels (default: plugin setting, initially 60 px; min 20, max 300). Height scales automatically at ratio ×1.4.align — inline (default), left, center or right. Non-inline values wrap the hand in a block-level div.colors — 2 (default: ♠♣ black, ♥♦ red) or 4 (♠ black, ♥ red, ♦ blue, ♣ green). The 4-color mode is widely used in online poker for readability.gap — gap between cards in pixels. Defaults to ~8% of card width.card)[wouf_card]As Kh[/wouf_card]
→ Inline: A♠ K♥
[wouf_card width="90" align="center"]As Kh _ Td Jc Qh[/wouf_card]
→ Centered, larger cards. Hole cards separated from the flop by a half-card spacer.
[wouf_card align="center"]?? Kh _ Td Jc Qh _ PP[/wouf_card]
→ Hidden card, K♥, flop, remaining deck.
[wouf_card colors="4"]As Kh Qd Jc[/wouf_card]
→ 4-color deck: ♠ black, ♥ red, ♦ blue, ♣ green.
[wouf_card gap="2"]As Kh[/wouf_card]
→ Tighter gap between cards.
texas-holdem-cards folder to /wp-content/plugins/ manually.[wouf_card] shortcode in any post, page, widget or comment.Yes. Use a Shortcode block and paste your [wouf_card] shortcode.
Yes. Go to Settings → Texas Hold'em Cards. The main [wouf_card] shortcode always remains available.
In 4-color mode, each suit has a distinct color: ♠ black, ♥ red, ♦ blue, ♣ green. This is standard in online poker clients and greatly improves readability when suits matter (flushes, flush draws).
Yes — enable "Shortcodes in comments" in the plugin settings.
Xz)?Invalid cards are silently ignored. The shortcode never produces broken output.
No. Everything is inline SVG generated server-side. No fonts, no CDN, no JavaScript.
The hand wrapper has classes thc-hand and thc-colors-2 or thc-colors-4. Individual SVGs have inline styles; override them with !important if needed.
load_plugin_textdomain() call — translations for WordPress.org-hosted plugins are loaded automatically since WordPress 4.6.wouf_texas_holdem_cards_ prefix, avoiding any naming collision with other plugins.colors attribute.gap attribute to control spacing between cards.wouf-texas-holdem-cards-colors-2 / wouf-texas-holdem-cards-colors-4 CSS classes on the hand wrapper for easier styling.[wouf_card] as the permanent main shortcode.[wouf_card] as the main shortcode.[card] as a backward-compatible alias.[card] with width and align parameters.?? (card back), PP (face-down deck), _ (spacer).