Skip Navigation

[Closed] Capability_Type

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 11 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 3 voices.

Last updated by Luo Yang 11 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#38820

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!

#38839

Dear Price,

It's not much clear to me. Explain to me about these custom permission that you want.

#38840

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!

#38846

Dear Price,

I see, so we custom post types are created with capabilities = false and capability_type is not set. So defaults to "post".

#38848

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!

#38921

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

The topic ‘[Closed] Capability_Type’ is closed to new replies.