M_AddSimpleInviteOptions

Addon Name: Simple Invites Codes Description: Force invite codes for membership signups Author: Barry (Incsub) Author URI: http://caffeinatedb.com.

Description

M_AddSimpleInviteOptions(); 

Usage

  1. if ( !function_exists( 'M_AddSimpleInviteOptions' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/addons/simple.invitecodes.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = M_AddSimpleInviteOptions(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/app_old/membershipincludes/addons/simple.invitecodes.php  
  1. function M_AddSimpleInviteOptions() { 
  2.  
  3. $Msi_options = M_get_option('membership_simpleinvite_options', array()); 
  4.  
  5. ?> 
  6. <div class="postbox"> 
  7. <h3 class="hndle" style='cursor:auto;'><span><?php _e('Simple Invite Codes', 'membership'); ?></span></h3> 
  8. <div class="inside"> 
  9. <p class='description'><?php _e('Use the section below to enable and require invitation codes on the registration panel.', 'membership'); ?></p> 
  10.  
  11. <table class="form-table"> 
  12. <tbody> 
  13. <tr valign="top"> 
  14. <th scope="row"><?php _e('Require Invite Codes', 'membership'); ?> 
  15. </em> 
  16. </th> 
  17. <td> 
  18. <?php 
  19. if(!isset($Msi_options['inviterequired'])) { 
  20. $Msi_options['inviterequired'] = ''; 
  21. ?> 
  22. <input type='checkbox' name='inviterequired' id='inviterequired' value='yes' <?php checked('yes', $Msi_options['inviterequired']); ?> /> 
  23. </td> 
  24. </tr> 
  25. <tr valign="top"> 
  26. <th scope="row"><?php _e('Invite Codes', 'membership'); ?><br/> 
  27. <em style='font-size:smaller;'><?php _e("Place each available code on a new line.", 'membership'); ?> 
  28. </em> 
  29. </th> 
  30. <td> 
  31. <?php 
  32. if(!isset($Msi_options['invitecodes'])) { 
  33. $Msi_options['invitecodes'] = ''; 
  34. ?> 
  35. <textarea name='invitecodes' id='invitecodes' rows='15' cols='40'><?php esc_html_e(stripslashes($Msi_options['invitecodes'])); ?></textarea> 
  36. </td> 
  37. </tr> 
  38. <tr valign="top"> 
  39. <th scope="row"><?php _e('Remove Code once used', 'membership'); ?> 
  40. </em> 
  41. </th> 
  42. <td> 
  43. <?php 
  44. if(!isset($Msi_options['inviteremove'])) { 
  45. $Msi_options['inviteremove'] = ''; 
  46. ?> 
  47. <input type='checkbox' name='inviteremove' id='inviteremove' value='yes' <?php checked('yes', $Msi_options['inviteremove']); ?> /> 
  48. </td> 
  49. </tr> 
  50. </tbody> 
  51. </table> 
  52. </div> 
  53. </div> 
  54. <?php