• Resolved ant8

    (@ant0nio)


    Hi! Many thanks for this plugin!

    I’m trying to use the ptad_description_capability filter to permit the creation and modification of the description for a pair of custom posts type. I want only users with “publish_posts” capability, to be able to create, modify, and see the option in the menú.

    I’m adding this line in my function.php but I can get it work.

    apply_filters('ptad_description_capability', 'publish_posts');

    What am I doing wrong?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author mrwweb

    (@mrwweb)

    Hi @ant0nio. Glad you like the plugin.

    Sorry to hear about your troubles with the filter. I haven’t had the chance to test this yet, but I would start by just triple-checking that that publish_posts capability is the one you want and that the user you’re testing with definitely does or doesn’t have it (depending on what you’re testing). By default, that’s every user Role from Author on up.

    If you can share any more details about what you’re seeing vs. what you’re expecting, that would be helpful, but I’ll try to take a look at this soon.

    Thread Starter ant8

    (@ant0nio)

    Hi @mrwweb, thank you for your answer.

    I have to say that I’m a little lost with the capability definition for custom post type, although it seems that I finally achieved what I wanted to do, so for the moment I send you another big thank you and close this post.

    Cheers!

    Plugin Author mrwweb

    (@mrwweb)

    @ant0nio Glad to hear you’ve got it working!

    I find this documentation most useful for understanding which WP user roles have which capabilities. So long as you set a capability on your post type to match whatever you pass the filter, you should see users either able to access both the post type and description or neither.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘using ptad_description_capability’ is closed to new replies.