Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This question already has an answer here:

I have this string:

add_submenu_page(basename(__file__), 'Events', 'Colloqui', 'subscriber', 'BW_events', 'BW_events');

How can I let this be available to editor(s) too? I tried ...

add_submenu_page(basename(__file__), 'Events', 'Colloqui', 'subscriber, editor', 'BW_events', 'BW_events');

... but didn't work.

share|improve this question

marked as duplicate by G. M., t f, brasofilo, Johannes Pille, toscho Oct 31 '13 at 14:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

add_submenu_page() and similar functions accept a capability. Capabilities are slightly confusing in WordPress as every role name is a cap as well. So instead of just adding a role name, you could just take a capability that is shared between the roles of the Subscribers and the Editors.

As you can see from the capabilities and roles table in Codex, read for example is a capability that every role in WP has.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.