Changeset 1372172
- Timestamp:
- 03/16/2016 10:17:36 AM (10 years ago)
- File:
-
- 1 edited
-
restrict-partial-content/trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
restrict-partial-content/trunk/readme.txt
r1370717 r1372172 31 31 All content between the start and end of the shortcode will be restricted 32 32 33 Shortcode parameters: 33 Shortcode parameters 34 34 35 1. allow_role => The Role(s) to allow access to the restricted content. This should correspond to the Wordpress roles. Can take multiple values which are comma separated 36 35 37 2. allow_user => The User ID(s) OR user login name to allow access to the restricted content. 38 36 39 3. message => The message that is visible when content is restricted 37 4. open_time => The exact date and time when the content should become visible (format to use YYYY-MM-DD HH:MM:SS see example on <a href="http://speedsoftsol.com/restrict-partial-content" target="_blank">demo page</a>) 40 41 4. open_time => The exact date and time when the content should become visible (format to use YYYY-MM-DD HH:MM:SS example 2016-03-24 13:00:00 will mean that the content should show after 24 March 2016 from 1pm onwards) 42 38 43 5. condition => options are "any" and "all" - "any" will mean that any single parameter that matches the criteria will result in the protected content being shown. "all" will mean that only when all criteria is matched will the restricted content be shown. 39 44 40 Some examples :41 Example 1 :45 Some examples 46 Example 1 42 47 [restrict allow_role="subscriber" allow_user = "1, 2, adam" open_time="2016-03-14 11:00:00" condition="any" message="hello"] secret here[/restrict] 43 48 This will show the restrcited to all subscribers, users with ID 1 and 2, username "adam". As soon as the open_time is passed it will show the restricted content to everyone. 44 49 45 Example 2 :50 Example 2 46 51 [restrict allow_role="author" open_time="2016-03-14 11:00:00" condition="all" message="hello"] secret here[/restrict] 47 52 This will show only when the user is logged in with a subscriber role and the open_time has passed
Note: See TracChangeset
for help on using the changeset viewer.