Hi,
I already explained how to use this plugin with custom user roles, see here.
If anything is not clear, please tell me here.
Yes, I have two use cases and three custom roles called “patient”, “apotheke” and “importeur”.
– patient = Read_ubn_editor_notes = editor_only
– apotheke = Read_ubn_contributor_notes = contributor_only
– importeur = Read_ubn_author_notes = author_only
– patient only has capabilites of Read_ubn_editor_notes
– apotheke has capabilites of Read_ubn_editor_notes and Read_ubn_contributor_notes
– importeur has capabilites of Read_ubn_editor_notes, Read_ubn_contributor_notes and Read_ubn_author_notes
THE USE CASES – on different pages (not the same):
Value 1 should be seen by patient, apotheke and importeur.
Value 2 should only be seen by apotheke and importeur (not patient).
But this shortcode isn’t working:
[private role="contributor-only, editor-only, author-only" alt="<a href='https://www.test.de/' target='_blank'>Nothing to see here.</a>"]<strong><span style="color:red;">The value...</span></strong>[/private]
What I’m doing wrong?
-
This reply was modified 7 years, 6 months ago by
AnimeSubways.
-
This reply was modified 7 years, 6 months ago by
AnimeSubways.
-
This reply was modified 7 years, 6 months ago by
AnimeSubways.
-
This reply was modified 7 years, 6 months ago by
AnimeSubways.
You can’t use multiple roles in a single shortcode, but only one.
In your case, try this:
Value 1 should be seen by patient, apotheke and importeur.
Since patient, apotheke and importeur share the same read_ubn_editor_notes capability, these roles will read this shortcode:
[private role="editor-only"]Text for patient, apotheke and importeur[/private]
Value 2 should only be seen by apotheke and importeur (not patient).
Since apotheke and importeur share the same read_ubn_contributor_notes capability, these roles will read this shortcode (excluding patient which has not this capability):
[private role="contributor-only"]Text for apotheke and importeur[/private]
In order to test if these shortcodes are working as intended, you can use the plugin User Switching, which enables you to temporarily test what a particular user can do and view.
Please, let me know.