Linux 软件免费装
Banner图

Post Lockdown

开发者 andyexeter
更新时间 2024年6月27日 16:54
捐献地址: 去捐款
PHP版本: 4.6 及以上
WordPress版本: 6.5
版权: GPLv2 or later
版权网址: 版权信息

标签

posts capabilities protect lock delete capability trash

下载

3.0.7 1.1.1 2.0 2.0.1 2.0.2 2.0.3 2.1 3.0 3.0.2 3.0.3 3.0.1 3.0.5 3.0.6 1.0.0 1.0.1 3.0.13 1.1 3.0.4 4.0

详情介绍:

Post Lockdown protects your site-critical pages and posts by disabling all non-admin users' ability to trash or delete them. It can also lock pages and posts, which will disable editing of the post as well as disabling trashing/deleting. The plugin adds a new options page under the Settings menu in your WordPress admin panel which allows you to quickly search and select for all pages and posts of any post type. When you find the item you want to select, simply click it to move it to the right box and click Save Changes. See the screenshots for an example of what an Editor would see when they view a list of posts with some locked and protected.

安装:

  1. Upload the post-lockdown folder to the /wp-content/plugins/ directory
  2. 通过 WordPress 的“插件”菜单激活插件
  3. Select your locked/protected posts under Settings > Post Lockdown

屏幕截图:

  • The Publish metabox for a protected page logged in as an Editor. See how the plugin removes the Move to Trash link.
  • The Post Lockdown administration page.

升级注意事项:

4.0 This is a major version release. Please read the changelog before updating. 3.0 This is a major version release. Please read the changelog before updating. 2.0 This is a major version release. Please read the changelog before updating.

常见问题:

Are there any major changes in v2.0?

The plugin now stores an instance of the class in a global variable ($postlockdown) instead of using static class methods. If you're a developer and use any of the static methods like PostLockdown::is_post_protected( $post_id ) in your theme code then you'll need to update your code to the following to be able to use v2.0: global $postlockdown; $postlockdown->is_post_protected( $post_id );

What is a "non-admin user"?

By default, the plugin classes a non-admin as a user who does not have the manage_options capability e.g an Editor. The capability can be filtered using the postlockdown_admin_capability filter.

Are there any other filters I can use?

The following filters are used throughout the plugin:

  • postlockdown_admin_capability - The capability a user must have to bypass locked/protected posts restrictions. Default is manage_options.
  • postlockdown_capabilities - Array of capabilities to restrict.
  • postlockdown_excluded_post_types - Array of post types to exclude from search.
  • postlockdown_get_posts - Array of args to pass to get_posts().
  • postlockdown_locked_posts - Array of locked post IDs. Allows you to programmatically add or remove post IDs. Both the key AND value must be set to the post ID.
  • postlockdown_protected_posts - Array of protected post IDs. Allows you to programmatically add or remove post IDs. Both the key AND value must be set to the post ID.
  • postlockdown_column_hidden_default - Boolean which dictates whether the status column should appear by default on post lists. Defaults to false.
  • postlockdown_column_html - String of HTML showing the locked or protected status of a post in the status column on post lists.
  • postlockdown_column_label - String containing the heading/label for the status column on post lists.

更新日志:

4.0 This is a major version release. Please read the following notes carefully before updating. 3.0.13 3.0.8 3.0.7 3.0.6 3.0.5 3.0.4 3.0.3 3.0 This is a major version release. Please read the following notes carefully before updating. 2.1 2.0.3 2.0.2 2.0.1 2.0 This is a major version release. Please read the following notes carefully before updating. 1.1.1 1.1 1.0.1 1.0.0