Title: &#8220;Class&#8221; as shortcode att
Last modified: June 15, 2021

---

# “Class” as shortcode att

 *  Resolved [eliant](https://wordpress.org/support/users/eliant/)
 * (@eliant)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/class-as-shortcode-att/)
 * Trying to learn more about the plugin; reviewed content-control/classes/Shortcodes.
   php and examined the content_control shortcode function. It allows for a setting
   of the attribute ‘class’. What is that? If it’s not referring to the name of 
   a membership level, then how do I request a new feature? Namely, add an attribute
   to the shortcode so I can specify the Membership Level instead of the Roles array.

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

 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/class-as-shortcode-att/#post-14633338)
 * [@eliant](https://wordpress.org/support/users/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](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](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](https://wordpress.org/support/users/eliant/)
 * (@eliant)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/class-as-shortcode-att/#post-14637303)
 * 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.]
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/class-as-shortcode-att/#post-14637305)
 * [@eliant](https://wordpress.org/support/users/eliant/) – Again CC does not offer
   nor include any functionality relating to “members” or “membership levels”. This
   must be coming from somewhere else.

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

The topic ‘“Class” as shortcode att’ is closed to new replies.

 * ![](https://ps.w.org/content-control/assets/icon-256x256.gif?rev=2968535)
 * [Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More](https://wordpress.org/plugins/content-control/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-control/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-control/)
 * [Active Topics](https://wordpress.org/support/plugin/content-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-control/reviews/)

## Tags

 * [attribute](https://wordpress.org/support/topic-tag/attribute/)

 * 3 replies
 * 2 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/class-as-shortcode-att/#post-14637305)
 * Status: resolved