Linux 软件免费装
Banner图

Post Formats for Block Themes

开发者 courane01
tjcafferkey
derintolu
更新时间 2026年11月16日 05:06
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

block-editor patterns post-formats block-theme chat-log

下载

1.1.11 1.1.12 1.1.3 1.0.0 1.1.6 2.3.0 1.1.8 1.1.0 1.1.2 1.1.4 1.1.5 1.1.9 1.1.10

详情介绍:

Post Formats for Block Themes brings the beloved post format functionality from classic WordPress themes to modern block themes, with intelligent pattern insertion, automatic format detection, and a streamlined editing experience. It requires a block theme — on a classic theme the plugin deactivates itself with an explanatory notice. Why Post Formats Matter for Block Themes WordPress post formats have been a powerful feature since WordPress 3.1, allowing content creators to style different types of posts distinctively—quotes appear with enhanced typography, galleries showcase images prominently, status updates feel like social media, and chat transcripts display conversations beautifully. However, with the shift to block themes and Full Site Editing, this functionality was left behind. Post Formats for Block Themes solves this problem. This plugin brings post formats into the block editor era with format-specific block patterns, automatic content detection, and accessibility-first design. Whether you're building a personal blog, portfolio, news site, or creative magazine, post formats help your content stand out. Who This Plugin Is For Key Features 10 Format-Specific Block Patterns Each WordPress post format gets a block pattern for its content type. Choosing a format inserts its pattern into the post, and you can edit every block in it: Integrated Chat Log Block No separate plugin needed! Post Formats for Block Themes includes a full-featured Chat Log block for displaying conversation transcripts. Perfect for interviews, customer support examples, team discussions, or any dialogue format. Supported platforms: Slack, Discord, Microsoft Teams, WhatsApp, Telegram, Signal, and generic chat transcripts. Additional text format support: SRT subtitles, VTT captions, and plain text exports from any chat application. Chat Log features: automatic platform detection, avatars (Gravatar with an initials fallback), timestamp formatting (relative, absolute, time-only), multiple display styles (bubbles, IRC, transcript, timeline), thread collapsing, participant lists, device frames, full accessibility, and RTL support. Automatic Format Detection Save time with intelligent format detection. The plugin analyzes your post's first block and automatically assigns the appropriate format. Gallery, Image, Video, Audio, Quote, Chat Log, and Bookmark Card blocks map to their formats; an Aside or Status paragraph maps when it carries the pattern's class. A Pullquote doesn't count as a Quote. Detection runs once, on a post's first save, and never changes a format you set. Format Selection Modal When creating a new post, a visual format selection modal appears with all 10 formats displayed as cards showing an icon, name, and description. It's built on the WordPress Modal component and announces your choice to screen readers. Change Format Mid-Edit Use the Format row in the post sidebar (WordPress core's control). Picking a new format inserts that format's pattern at the top of the post and keeps your existing blocks. If the post is empty, the pattern replaces the empty block. Status Format Validation The Status format shows a live "N characters remaining" counter with a 280-character soft limit, warning and over-limit styling, and screen reader announcements. It never blocks publishing. Post Format Repair Tool The repair tool (Tools → Post Format Repair) scans your posts when you open it and lists posts whose format doesn't match their first block. Use "Apply All Suggestions" or the per-row "Apply". Dry run is on by default, and each change saves a revision first. Useful when migrating from classic themes. Theme-Agnostic Styling Format styles use --pfbt-* CSS custom properties that resolve through your theme.json, so they follow your theme's colors, typography, and spacing and work with Global Styles. Also Included How to Use Post Formats in Block Themes Creating Your First Formatted Post:
  1. Navigate to Posts → Add New
  2. Format selection modal appears automatically
  3. Click your desired format (e.g., "Quote")
  4. The format's pattern is inserted
  5. Add content within the pattern
  6. Publish your formatted post Mid-Edit Format Switching:
  7. Open the Post tab in the right sidebar
  8. Select the Format row
  9. Choose a new format
  10. The new pattern is inserted at the top; your existing blocks stay Using Auto-Detection:
  11. Start a new post without selecting a format
  12. Add content (e.g., insert a gallery block)
  13. Save as draft or publish
  14. Plugin automatically detects Gallery format
  15. Format is assigned without manual action
How to Create a Quote Post Showcase quotations and citations beautifully:
  1. Select Quote format from the modal
  2. The Quote pattern loads with a Quote block
  3. Type or paste your quote
  4. Add the source or attribution below the quote
  5. Optional: Add commentary below the quote
  6. Customize styling via Global Styles
  7. Publish your quote post
How to Display Chat Conversations Turn conversation transcripts into readable, attractive content:
  1. Select Chat format when creating new post
  2. Chat Log block inserts automatically
  3. Copy conversation text from Slack, Discord, Teams, WhatsApp, etc.
  4. Paste into Chat Log block—platform detection is automatic
  5. Configure display options: style, avatars, timestamps, threads, device frame
  6. Preview the formatted conversation
  7. Publish your beautiful chat transcript
Threaded replies are grouped and can be collapsed. Reaction counts and reply indicators in pasted text are skipped. How to Automatically Detect Post Formats Let the plugin handle format assignment:
  1. Create new post without selecting format
  2. Add content normally (gallery, video, quote, etc.)
  3. Save draft or publish—detection runs on save
  4. Check the Format row in the sidebar for the detected format
  5. Change it there if you want a different one
Detection rules: the first block decides. Gallery block = Gallery format, Video = Video, Quote block = Quote (a Pullquote doesn't count). Detection runs once per post. How to Repair Mismatched Formats Fix format assignments across your entire site:
  1. Navigate to Tools → Post Format Repair
  2. The page scans your posts on load
  3. Review the Detected Mismatches table
  4. Leave "Dry run" checked to preview, or uncheck it to apply
  5. Click "Apply All Suggestions", or "Apply" on one row
  6. Verify the changes
Common scenarios: migrating from classic themes, imported content, incorrect manual assignments, exploring your format distribution. The repair tool saves a revision before each change and edits the post's format, not its content. (The separate Template Assignments section on that screen also updates page templates.) Migrating from Classic Theme Post Formats Preserve post format styling when switching to block themes: Before Migration:
  1. Install plugin on classic theme site
  2. Leave classic theme active
  3. Open the repair tool (dry run stays on, so nothing is applied)
  4. Review the mismatches During Migration:
  5. Switch to block theme
  6. Activate Post Formats for Block Themes
  7. Visit Tools → Post Format Repair
  8. The page scans your posts on load
  9. Review the mismatches
  10. Uncheck Dry run, then click Apply All Suggestions After Migration:
  11. Check frontend display
  12. Customize styling in theme.json
  13. Create new posts with format patterns
  14. Optional: update old posts to use patterns What transfers: format assignments, post content, featured images, post meta. What changes: theme template styling becomes pattern styling, classic PHP templates become block templates. Tips: test on staging first, take database backup, check one post per format, customize theme.json colors, use patterns for new content.
Block Theme Compatibility Guide What Makes a "Block Theme": Block themes use block templates (.html files) and theme.json instead of PHP templates. Key characteristics: templates/ folder with .html files, theme.json file, Full Site Editing support, activated via Appearance → Themes. Learn more in the WordPress Block Theme documentation. Why Classic Themes Aren't Supported: Classic themes use PHP template files which conflict with block-based patterns. This plugin requires block pattern support, block templates, theme.json styling, and block editor integration. If you prefer using a classic theme with post format support, consider using the Twenty Thirteen theme which includes excellent built-in post format styling. Recommended Compatible Block Themes: Twenty Twenty-Five, Twenty Twenty-Four, Twenty Twenty-Three, Block themes from Automattic (Blank Canvas, Pendant), most modern block themes on WordPress.org. Theme.json Integration: The plugin reads color palette, typography, spacing, and border styles from your theme.json. Format styles automatically adapt. To customize, edit your theme.json color and typography settings. Documentation Full user documentation — installation, settings, common tasks, troubleshooting, privacy, and a Playground preview guide — lives at courtneyr-dev.github.io/post-formats-for-block-themes. Developers extending formats, detection, or styling should start with the hooks reference.

安装:

Minimum Requirements Automatic Installation
  1. Log in to WordPress admin
  2. Navigate to Plugins → Add New
  3. Search for "Post Formats for Block Themes"
  4. Click "Install Now" then "Activate"
  5. Create a new post—format selection modal will appear
Manual Installation
  1. Download plugin ZIP from WordPress.org
  2. Go to Plugins → Add New → Upload Plugin
  3. Choose ZIP file and click "Install Now"
  4. Click "Activate Plugin"
  5. Create a new post to start using formats
After Activation
  1. Create test post (Posts → Add New)
  2. See format modal with all 10 formats
  3. Choose a format to insert its pattern
  4. Add content within pattern structure
  5. Publish your formatted post
  6. Optional: Run repair tool (Tools → Post Format Repair)

屏幕截图:

  • Chat Log block in the editor with a pasted conversation transcript
  • A published chat post on the frontend with avatars, usernames, and timestamps
  • A quote format post in the editor
  • A status format post in the editor with the character counter
  • The Post Format Repair tool under Tools, listing posts whose format doesn't match their content
  • A gallery format post in the editor with the gallery block in a responsive grid
  • The Format Badge before a post title on the frontend of a quote post
  • The Format control in the editor sidebar with all ten formats listed, to switch a post's format mid-edit

升级注意事项:

1.1.12 Recommended if you use the Chat Log block's thread replies: the toggle works again. Adds Query Loop presets for Quote, Link and Status archives. 1.1.10 MCP clients get the read abilities, and lose access to the two abilities that change posts' formats. 1.1.9 Recommended if you use the Lightbox Slideshow gallery style: the slideshow fills the screen again and disappears when closed. 1.1.7 Required if you use the Abilities API or MCP: fixes gaps that let a lower-privileged user read another user's private or password-protected post, or act on another user's draft. A hand-edited synced format pattern is overwritten once on this upgrade. 1.1.6 Recommended for all users: restores missing format icons in packaged installs, fixes an activation fatal in the zip build and editor warnings when creating posts, and registers the Format Badge in the editor on WordPress 7.0+. Tested up to WordPress 7.1. 1.1.5 Large consolidated update (the 1.2.x/2.x GitHub lines folded into one release). Breaking only for customized sites: rename --wp--preset--color--format-* token overrides to --pfbt-format-*. Uncustomized sites upgrade with no visible change. 1.1.4 Critical fix: Resolves issue where plugin's theme.json was overriding theme layout settings and causing blank templates. All users should upgrade immediately. 1.1.3 Critical performance fix: Resolves database performance issue with revision queries. Also fixes duplicate pattern insertion, character counter appearing twice, and JavaScript errors. Simplified patterns for cleaner editing. All users should upgrade. 1.1.2 Editor UI improvements: Simplified format selection, better template chooser, fixed standard posts incorrectly showing format templates. 1.1.1 Critical fix: Format templates no longer appear in Template dropdown, fixing template selection issues. 1.1.0 Major update: Adds Post Format Block for frontend display, post format admin column with filtering, template improvements with category/tag/format display, and critical bug fixes for template assignment. All users should upgrade. 1.0.0 Initial release of Post Formats for Block Themes. Requires WordPress 6.8+ and a block theme. Includes integrated Chat Log block—no separate plugin needed. Full WCAG 2.2 AA accessibility compliance.

常见问题:

Does this work with classic themes?

No, this plugin requires block themes with Full Site Editing. Classic themes use PHP templates incompatible with block patterns. This plugin requires block theme with theme.json, block templates in templates/ folder, and WordPress 6.9+. Consider migrating to a modern block theme like Twenty Twenty-Five.

Will this work with my existing posts?

Yes! Use Post Format Repair Tool (Tools → Post Format Repair) to scan existing posts and automatically detect appropriate formats based on content. Tool analyzes first block and suggests matching format. Review before applying repairs. Tool saves a revision and changes the format assignment, not the post content.

What happens if I deactivate the plugin?

Content remains safe: format assignments stay in database, pattern blocks remain as standard blocks, Chat Log blocks show as "unsupported block" (content preserved), no data lost. If you reactivate, all functionality returns immediately.

Can I customize the format patterns?

Yes, multiple ways:

  • Use filters in functions.php to modify pattern HTML
  • Register custom patterns to override defaults
  • Edit the blocks after insertion
  • Use Global Styles to change colors, typography, spacing

Does the Status format prevent publishing over 280 characters?

No, 280-character limit is a soft suggestion, not a hard block. Shows real-time counter, visual warning when approaching limit, accessibility announcements, but you CAN publish longer status updates if needed.

What is the Bookmark Card integration?

Link format checks if the Bookmark Card plugin is installed. If active, uses bookmark-card blocks with rich previews, images, descriptions, automatic metadata fetching. If not installed, uses standard linked paragraphs. Both work perfectly—integration just enhances experience.

Does this work with podcasting plugins?

Partly. If the Podlove Podcasting Plugin for WordPress is active, the plugin adds styles so its web player fits the Audio format layout. It doesn't read Podlove's podcast metadata. The patterns themselves use WordPress core audio blocks.

What about accessible media players?

When Able Player is active, the plugin adds styles so its player fits the Video and Audio format layouts. The patterns themselves use WordPress core media blocks.

How do I use the Chat format?

You don't need a separate plugin! Post Formats for Block Themes includes integrated Chat Log block (chatlog/conversation). Chat format works out of the box, no additional plugins required. Just select Chat format and paste conversation transcripts from Slack, Discord, Teams, WhatsApp, Signal, or Telegram.

Does the Chat format work with the RSS Chat plugin?

Yes, and it is worth knowing what that means before running both. RSS Chat publishes posts to the rss.chat network, and it decides what to send by looking for the core chat post format. Once RSS Chat is connected, a post you format as Chat here is also syndicated there. Two things follow from that. Do not set the Chat format on a post just to get it syndicated, because this plugin will badge and style it as a conversation transcript, which is what the format is for. And if you leave format auto-detection on, a post that opens with a Chat Log block is given the Chat format for you, so it would be syndicated without anyone choosing that — set the format by hand on those posts, or turn detection off, if that matters to you. Whether RSS Chat could route on something other than the post format is open upstream: issue #6. RSS Chat is distributed on GitHub, not WordPress.org.

Can I change formats after creating a post?

Yes. Open the post, select the Format row in the Post tab of the sidebar, and pick a format. The new format's pattern is inserted at the top of the post and your existing blocks stay.

How does auto-detection know when NOT to change my format?

Detection applies once, on a post's first save, and only when you haven't chosen a format. After that it never reclassifies the post, so a format you change later stays. It also runs on posts created programmatically, such as through Micropub or WP-CLI.

更新日志:

1.1.12 1.1.11 1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 Everything since 1.1.4, consolidated. The 1.2.x and 2.x lines were GitHub-only releases that never reached WordPress.org; the plugin's public numbering continues from 1.1.4. Full per-release history lives in CHANGELOG.md on GitHub. 1.1.4 - 2025-12-19 Bug Fixes Changes 1.1.3 - 2025-12-18 Performance New Features Bug Fixes Improvements Security 1.1.2 - 2025-12-11 New Features Improvements Bug Fixes Technical Changes 1.1.1 - 2025-12-09 Bug Fixes 1.1.0 - 2025-12-08 New Features Improvements Bug Fixes Code Quality Developer 1.0.0 - 2025-01-XX Initial Release