Hello! Does a capability_type get set at creation of a post type? If so, what is the capability_type name scheme? I'd like to add the custom permissions code into my theme functions. I realize there is Types Access, but I don't have the full toolkit (and no need to purchase at this time as I only need regular Types).
Thank you so much!
Dear Price,
It's not much clear to me. Explain to me about these custom permission that you want.
Hi Adriano!
You can read this for clarification, but when you register a post type you need to give it a capability_type so that you can add an array of permissions for different roles within the site. hidden link. I'm looking for the capability_type name so that I can add the array.
Thanks!
Dear Price,
I see, so we custom post types are created with capabilities = false and capability_type is not set. So defaults to "post".
OK, so then how am I able to hook into the capability_type functionality then? I need this as my custom post types do not have the same permissions as regular posts. This really should be an option on the create post type screen. Thanks!
Hi Price,
Please try use Types filter hook "wpcf_type", it locate in the file:
wp-types\embedded\includes\custom-types.php line 210
like this:
add_filter('wpcf_type', 'my_capability_type');
function my_capability_type($data, $post_type)
{
...
}
Please let me know if you need assistance to do it
Regards
Luo