Control who can publish, edit and delete custom post types. Silly name, useful code.
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.
map-cap
folder to the /wp-content/plugins/
directoryPlugins
menu in WordPressMap Cap
under the Settings
menu to set capabilitiesThere are four requirements for a custom post type to show up in Map Cap’s settings page.
The post type must:
$args
array you pass to the register_post_type
function, your plugin must have capability_type =>
set to something other than post.map_meta_cap
argument set to true
– the default is false
. Without this parameter set to true
, WordPress does not map any meta capabilities.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.
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.
Add a new post in the WordPress.org Plugin’s Support Forum.
map_meta_cap
flag at run-time