@eliant – Apologies for the delay.
The class is for adding an additional CSS class to the div wrapping the protected content.
As for your other request there is a lot more going on there so its hard to say.
The issue is that WordPress doesn’t have anything called Members or Membership Levels, so that means your talking about functionality from another plugin, which only a small % of our other users might even have access to.
Adding custom conditions isn’t complicated process if your familiar with PHP which it seems you might be, so you could register your own conditions for Membership Level and then have it check whatever PHP functions they give you to check that info (they being the other plugin)
https://github.com/JunglePlugins/Content-Control/blob/master/classes/Conditions.php#L445-L451
The callback can be any PHP function that returns true or false.
Alternatively you could simply overload the should exclude variable when you need:
https://github.com/JunglePlugins/Content-Control/blob/7d5d379f85c8e087be87807749cee7003a8cd218/classes/Is.php#L79
Neither as elegant as it just working, but without evidence a large % of our user base would benefit from such a function we can’t justify adding it to the core plugin at this time.
If you wanna mention the plugin your using I’m happy to add it to the feature request list though.
Thread Starter
eliant
(@eliant)
Thanks for all the info. But I’m not using another plug-in. I’m expanding and enhancing ContentControl (CC). So remember, CC uses “Membership Level” for controlling the Restrictions defined in Settings>Content Control. That’s what I was referring to. It would be much simpler to just pass role=”member” in the shortcode (or some other membership name) rather than “administrator,contributor,editor,author”
[I can never remember all the various WP roles, but I can remember my CC membership titles since I’m the one who created them.]
@eliant – Again CC does not offer nor include any functionality relating to “members” or “membership levels”. This must be coming from somewhere else.