Support » Plugin: Shortcoder » User roles

  • Hi,

    you´ve got the option disable for administrator at a shortcode. Would it be possible to expand this functionality to all user roles of wordpress (disable for editor, subscriber, all logged in user (would be the best))?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author vaakash


    Sure.. I’ll add user roles in the upcoming version.
    I’ll update this thread once it is implemented.

    Juha Metsäkallas


    I’m maybe late on this, but let me tell about a case I had.

    I’m using a calendar plugin, that renders on page a browseable calendar from a subscribed (ics) calendar. You embed the visible calendar by a shortcode, like [calendar id=”123″]. I wanted to display the calendar on a bbPress forum for announcements, but on a bbPress forum shortcodes aren’t run at all for security reasons (and good so).

    There are plenty of code snippets, how to enable shortcodes in forum topics and replies, but they enable all codes for all users. Not good.

    There are plugins for managing user roles, so I created a role “shortcode-executor” and wrote a tiny plugin, that runs shortcodes only if the page, post, topic or whatever is created by a user with that role.

    If you want to develop the idea further, you could perform a check, whether the page, post etc. contains only shortcodes, that begin with “[sc “. Or perhaps mix that with user roles.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘User roles’ is closed to new replies.