Hello @songiuno ??
I really appreciate when users give their contribution in other users’ thread, so you’re very welcome.
I’ve taken some time before replying because I have tried to add (without breaking the other things) what you and @ravenso asked for. And I did it.
Before releasing to the public, I would appreciate a feedback from you. If you have a test installation of WordPress, you can download the development package from here:
https://codeload.github.com/aldolat/private-content/zip/develop
The shortcode now supports the use of user IDs (along with usernames) in the recipient
option.
Let’s say that we have three users with these user IDs:
– Alice: 1
– Bob: 3
– Charlie: 5
Display a message to Alice:
[private role="none" recipient="1"]Alice, this note is only for you.[/private]
Display a message to all users, excluding Alice with an alternate message:
[private role="none" recipient="1" reverse=1 alt="Alice, you cannot read this private text!"]All users, except Alice: this is a private text[/private]
Display a message to Alice, Bob, and Charlie:
[private role="none" recipient="5, 1, 3"]Alice, Bob, and Charlie: this note is only for you.[/private]
Display a message to all users, excluding Alice, Bob, and Charlie:
[private role="none" recipient="5, 1, 3" reverse=1]All users, except Alice, Bob, and Charlie: this is a private text[/private]
Display a message to Alice, Bob, and Charlie, mixing usernames and IDs:
[private role="none" recipient="5, alice, 3"]Alice, Bob, and Charlie: this note is only for you.[/private]
Display a message to all users excluding Alice, Bob, and Charlie, mixing usernames and IDs:
[private role="none" recipient="charlie, 1, 3" reverse=1]All users (excluding Alice, Bob, and Charlie): this note is for you only.[/private]
Let me know if you can test it before the final release.
Thanks in advance. ??