Linux 软件免费装
Banner图

Hide A Post

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

标签

posts category hide pathfinder tabletop-gaming

下载

2.0.0 1.1

详情介绍:

Hide A Post lets Administrators keep selected categories—as well as default-category (Uncategorized) posts authored by Administrators—hidden from Editors and other non-Administrator users across the site, search results, WordPress admin, and direct REST API / post-ID access. Hide A Post Settings Go to Settings → Hide A Post and check the categories you want hidden from non-Administrators (for example, Awesome and Spicy). Example Posts (seen by Administrators)
  1. Tomato (Owner: Administrator, Categories: Fruit, Red)
  2. Potato (Owner: Administrator, Categories: Vegetable, White)
  3. Broccoli (Owner: Administrator, Categories: Vegetable, Green)
  4. Mushrooms (Owner: Administrator, Categories: Vegetable, White, Awesome) - Hidden from non-Administrators via "Awesome".
  5. Apple (Owner: Administrator, Categories: Fruit, Red)
  6. Pear (Owner: Administrator, Categories: Fruit, Green, Awesome) - Hidden from non-Administrators via "Awesome".
  7. Peppers (Owner: Administrator, Categories: Vegetable, Green, Spicy) - Hidden from non-Administrators via "Spicy".
  8. Peach (Owner: Administrator, Categories: Uncategorized) - Hidden from non-Administrators as an Administrator-authored default-category post.
  9. Blueberries (Owner: Administrator, Categories: Fruit, Blue, Uncategorized) - Still hidden while in the default category.
  10. Raspberries (Owner: Editor, Categories: Fruit, Red, Awesome) - Hidden from non-Administrators via "Awesome"; visible to Administrators.
Example Posts (seen by Editors)
  1. Tomato (Owner: Administrator, Categories: Fruit, Red)
  2. Potato (Owner: Administrator, Categories: Vegetable, White)
  3. Broccoli (Owner: Administrator, Categories: Vegetable, Green)
  4. Apple (Owner: Administrator, Categories: Fruit, Red)
About the plugin We wanted to use WordPress with our tabletop gaming group. This enables everyone to collaborate on content creation while allowing the Dungeon Master to keep certain "secrets" hidden.

安装:

  1. Upload the hide-a-post folder to your /wp-content/plugins/ directory (or upload the ZIP via Plugins → Add New → Upload Plugin).
  2. Activate Hide A Post through the Plugins screen in WordPress.
  3. Navigate to Settings → Hide A Post and select the categories to hide.

屏幕截图:

  • Posts as an Editor
  • Hide A Post settings page

升级注意事项:

2.0.0 Requires WordPress 7.0+ and PHP 7.4+. Administrator posts in your default category (Settings → Writing), not just "Uncategorized", are now hidden. Upgrade in place; do not deactivate 1.x first, as 1.x deletes its settings on deactivation. Also hardens menus, REST, and wp-admin.

常见问题:

Why did you create this?

To avoid installing 15 different plugins just to hide posts by category from non-Administrators.

Does this plugin work with WP-CLI?

Yes. Starting in 2.0.0, Hide A Post safely handles WP-CLI's scoped loader and bypasses post filtering for unauthenticated WP-CLI commands (such as wp post list). Passing --user=<editor> to WP-CLI applies non-Administrator filtering as expected.

What is hidden, and what is not?

Hidden posts are removed from post lists, search, feeds, sitemaps, archives, previous/next links, menus, the REST API, oEmbed, and wp-admin, and their comments are hidden too. Where a hidden post is referenced by ID, non-Administrators see the title "(Private post)". Post counts are not adjusted: category counts and the "All (N)" totals in wp-admin still include hidden posts. Selecting a parent category does not hide posts that are only in its child categories. Pages and custom post types are never hidden.

Can developers change who sees hidden posts?

Yes. Use the hap_user_can_view_hidden_posts filter to grant or deny access per user, hap_hide_admin_default_category_posts to turn off the default-category rule, and hap_administrator_ids to change whose default-category posts are hidden.

How can I support Hide A Post?

Through Buy Me a Coffee or PayPal.

更新日志:

2.0.0 1.1 1.0