CM Registration (CMREG) - Invitation Codes - Letting Users Create Codes
Letting Users Create Codes
You can let logged-in users create invitation codes. They will see the following form:Showing The Form
This is done by applying the following shortcode to your site.
It displays the form that a user can utilize to invite his friends or just create the invitation codes.
expiration - set the invitation code's expiration date in format YYYY-MM-DD HH:MM:SS or give the time period as 30 days.
You can use the following English words: minutes, hours, days, weeks, months or years.
userslimit - number of users that can use the invitation code.
verifyemail - one of: global, 1, 0. Whether to require a user registered with this code to verify his email address.
emailinput - 0 or 1 - whether to show the email address input field to send the invitation code to or not.
role - set a Wordpress role that a user registered with this invitation code will be assigned to. If empty then use the role from the plugin settings.
showparams - 0 or 1. Show the parameters that the invitation code will have.
[cmreg-create-invitation-code expiration="2 weeks" verifyemail=1]
[cmreg-create-invitation-code role=contributor userslimit=1]
[cmreg-create-invitation-code emailinput=1 showparams=1]
To see the full list of shortcode in the plugin check CM Registration (CMREG) - Shortcodes
More About Shortcodes
Shortcodes are simple codes contained within square brackets such as
Some have parameters, which can be written before closing the bracket, as in
To learn about them, go to the WordPress dashboard and navigate to CM Registration Pro → Shortcodes.