這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Map Cap

描述

Using custom post types on your site?

Install this plugin to control which roles can publish, edit and delete posts of each custom type.

For this plugin to work, your custom post type must meet a number of requirements as outlined in the FAQ.

螢幕截圖

  • Admin Map Cap Settings Page - Site administrators can choose the capabilities each role has for each custom post type.

安裝

  1. Download and unzip the plugin
  2. Upload the map-cap folder to the /wp-content/plugins/ directory
  3. Activate the plugin through the Plugins menu in WordPress
  4. Navigate to Map Cap under the Settings menu to set capabilities

常見問題

Why aren’t all my custom post types listed on the options page?

There are four requirements for a custom post type to show up in Map Cap’s settings page.

The post type must:

  1. be public
  2. not be a built-in post type eg. page & post
  3. use a custom capability type (not the default capability of post). This is done when registering the Custom Post Type. In the $args array you pass to the register_post_type function, your plugin must have capability_type => set to something other than post.
  4. be registered with the map_meta_cap argument set to true – the default is false. Without this parameter set to true, WordPress does not map any meta capabilities.
Force Mapping

As many custom post types do not set the map_meta_cap to true, Map Cap offers an option to change the value of the map_meta_cap.

For this to work, the plugin must register the post type on the init hook with a priority less than 10,000.

This feature works with the Custom Post Type UI plugin plugin but is not guaranteed to work with any other plugins.

Using the Custom Post Type UI plugin?

If you are using the Custom Post Type UI plugin, when adding a custom post type, you must click View Advanced Options and change Capability Type to something other than post. For example, for a custom post type of Stories the capability could be story.

You then need select the custom post type under the Force Mapping section of the Map Cap settings page.

Where can I report bugs?

Add a new post in the WordPress.org Plugin’s Support Forum.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Map Cap” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Map Cap 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

2.1

  • Fix ‘Invalid argument supplied for foreach() in map-cap.php on line 268’ when deactivating a plugin or theme which registered the custom post type Map Cap was operating on

2.0

  • Changing capabilities for custom posts with “post” capability type no longer allowed
  • Option to change the map_meta_cap flag at run-time
  • When changing a shared capability, a warning is shown
  • Readme changes to help resolve common issues.
  • Fixing bug where a post without the ‘author’ feature could not be trashed while having Draft status.

1.0

  • Initial release.