• I’m working on adding a feature to the “User Submitted Posts” plugin which would allow admins to submit posts from the frontend to a custom post type. (instead of post)

    I’d like the plugin to be able to figure out which capabilities are supported for a selected custom post type, so the settings for the plugin wouldn’t allow the admin to, say “allow image uploads” for a certain post type which did not allow such a capability. Is there a way to check capabilities for custom post types that already exist in the environment?

    thanks!

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I believe you are looking for get_post_type_capabilities(). Although allowing uploads is not one of them, that is a user based capability, not post based, which is checked with current_user_can().

Viewing 1 replies (of 1 total)
  • The topic ‘Determining capabilities of existing custom post types’ is closed to new replies.