尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Display recent comments using clean templates and minimal CSS. Developer-friendly, fast, and built for modern WordPress.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Init Recent Comments – Templated, Modern, Minimal
Display recent comments using clean templates and minimal CSS, with Block Editor & Abilities API support. Developer-friendly, fast, and built for modern WordPress.
No widgets. No jQuery. No bloat — just clean, templated output.
Init Recent Comments is a lightweight, developer-oriented plugin that displays the latest comments (and reviews) anywhere on your site — through a simple shortcode, or natively as a Block Editor block.查看完整 README ↗Display recent comments using clean templates and minimal CSS, with Block Editor & Abilities API support. Developer-friendly, fast, and built for modern WordPress.
No widgets. No jQuery. No bloat — just clean, templated output.
Init Recent Comments is a lightweight, developer-oriented plugin that displays the latest comments (and reviews) anywhere on your site — through a simple shortcode, or natively as a Block Editor block.
Built with flexibility and simplicity in mind — clean markup, minimal CSS, and template overrides directly from your theme.
Ideal for blogs, news sites, or any project that values both performance and clean design.
moderate_comments capability; non-approved reviews require manage_optionsmaxheight is now actually applied, "Disable built-in CSS" also covers blocks, review links are no longer double-escaped, "time ago" uses GMT, Shortcode Builder strings are translatedblock.json with a PHP render.php that calls the exact same shortcode function as its shortcode counterpart, so output never diverges. A single no-build-step vanilla JS file powers the editor integration, with wp.serverSideRender for live previewget-recent-comments, get-recent-reviews, get-user-recent-comments, get-user-recent-reviews — mapping 1:1 to all four shortcodes. This plugin has no write actions at all (it's a pure display plugin), so all of its functionality is safely exposed. Discoverable and executable via PHP, wp_get_abilities(), and the wp-abilities/v1 REST namespace when a site opts in. Review-related abilities gracefully return an empty list if Init Review System isn't active. Fully optional: on WordPress versions older than 6.9, this silently does nothingRequires PHP stays at 7.4[init_plugin_suite_recent_comments] (legacy alias: [init_recent_comments])[init_plugin_suite_recent_reviews] (legacy alias: [init_recent_reviews])[init_plugin_suite_user_recent_comments] (legacy alias: [init_user_recent_comments])[init_plugin_suite_user_recent_reviews] (legacy alias: [init_user_recent_reviews])comment-item.php, wrapper.php, review-item.php, review-wrapper.php).pot file included)Four dynamic blocks are available under their own Init Recent Comments category in the block inserter — no shortcodes needed if you prefer working entirely in the editor:
| Block | Equivalent shortcode |
|---|---|
| Recent Comments | [init_plugin_suite_recent_comments] |
| Recent Reviews | [init_plugin_suite_recent_reviews] |
| User Recent Comments | [init_plugin_suite_user_recent_comments] |
| User Recent Reviews | [init_plugin_suite_user_recent_reviews] |
Each block shares the exact same rendering code as its shortcode, so switching between the Block Editor and shortcodes never changes the output. Block settings map directly to shortcode attributes, and a live preview is shown right in the editor as you configure it.
On WordPress 6.9 and above, Init Recent Comments registers four read-only abilities under the init-recent-comments category, mirroring the plugin's four shortcodes exactly:
init-recent-comments/get-recent-comments — most recent approved comments site-wideinit-recent-comments/get-recent-reviews — most recent approved reviews site-wide (requires Init Review System)init-recent-comments/get-user-recent-comments — most recent approved comments by a specific userinit-recent-comments/get-user-recent-reviews — most recent reviews submitted by a specific user (requires Init Review System)This plugin has no write actions at all — it's a pure display plugin — so all of its functionality can be safely exposed without exclusions. These abilities are discoverable and executable via PHP (wp_get_abilities()), and — for sites that opt in — the wp-abilities/v1 REST namespace. This integration is fully optional: on WordPress versions older than 6.9, it silently does nothing.
Prefer working in the Block Editor? Each shortcode below has an equivalent block — see Block Editor (Gutenberg) above.
Use the shortcode anywhere:
[init_plugin_suite_recent_comments number="5" maxheight="400px"]
Recent reviews:
[init_plugin_suite_recent_reviews number="5"]
Recent comments of a specific user:
[init_plugin_suite_user_recent_comments user_id="123"]
Recent reviews of a specific user:
[init_plugin_suite_user_recent_reviews user_id="123"]
The legacy tags [init_recent_comments], [init_recent_reviews], [init_user_recent_comments], and [init_user_recent_reviews] still work exactly the same way, for backward compatibility with existing content.
Attributes:
number – Total items to display (default: 5)maxheight – Optional scrollable height (e.g. 300px)paged – Optional paginationtheme – Light or dark (e.g. theme="dark")user_id, user_login, or user_email can be used to target the userTemplate overrides:
Place custom templates inside your theme:
your-theme/
└── init-recent-comments/
├── wrapper.php
├── review-wrapper.php
├── comment-item.php
└── review-item.php
This plugin provides multiple filters for customizing cache duration and performance of comment/review queries.
By default, comment and review queries are not cached (TTL = 0) so newly posted comments always show up immediately. Total comment count queries default to a 5-minute TTL instead, since counts are less time-sensitive. You can enable caching for the other queries yourself via the filters below if your site has heavy traffic and can tolerate a short delay.
| Filter | Description | Applies To | Params |
|---|---|---|---|
init_plugin_suite_recent_comments_ttl | Control TTL (in seconds) for recent comments | Recent Comments Query | int $ttl |
init_plugin_suite_recent_comments_query_args | Allow developers to modify/extend the WP_Comment query args before execution | Recent Comments Query | array $args |
init_plugin_suite_recent_reviews_ttl | Control TTL (in seconds) for recent reviews | Recent Reviews Query | int $ttl |
init_plugin_suite_user_recent_comments_ttl | Control TTL (in seconds) for a specific user's recent comments | [init_user_recent_comments] | int $ttl, array $args |
init_plugin_suite_user_recent_reviews_ttl | Control TTL (in seconds) for a specific user's recent reviews | [init_user_recent_reviews] | int $ttl, array $args |
init_plugin_suite_total_comments_ttl | Control TTL (in seconds) for total approved comment counts by post type | Total Comments Query | int $ttl, array $post_types |
init_plugin_suite_total_by_posts_ttl | Control TTL (in seconds) for total comments across multiple post IDs | Total by Post IDs Query | int $ttl, array $post_ids |
/wp-content/plugins/[init_plugin_suite_recent_comments] in any page, post, or widget — or add the equivalent block in the Block EditorGPLv2 or later — open source, minimal, developer-first.
Init Recent Comments is part of the Init Plugin Suite — a collection of blazing-fast, no-bloat plugins made for WordPress developers who care about quality and speed.