How get Capability from Categorie ?

Hi,

I would like to know how to get Capability from a categorie (from an ID categorie) ?
And next, how to add/remove capability to a categorie ?

I try to found here but… nothing : http://api.itthinx.com/groups/

Thanks by advance.
Nathan


Comments

4 responses to “How get Capability from Categorie ?”

  1. Nathanael Avatar

    It’s fine, I get it : Groups_Restrict_Categories::set_term_read_capabilities()

    Have nice day !

    Nahan

    1. Perfect !!
      Cheers,
      Antonio B.

  2. Nathanael Avatar

    Hi,

    I tryed Groups_Restrict_Categories::get_term_read_groups($id_cat) but that return only ID groups, but I use Capability for restricted categorie, not group access.

    So… what is the function/class to get/change Capability needed for categories ?

    Best regards,
    Nathan

  3. Hi nathan,
    Sorry, we need to impove the GRC documentation.
    You can use Groups_Restrict_Categories::get_term_read_groups(), Groups_Restrict_Categories::set_term_read_groups() and Groups_Restrict_Categories::delete_term_read_groups(). Here you a code that you can use as reference.
    Kind Regards,
    Antonio B.

Share