/** * Builds the fields panel * * @since 2.2.2 * * @param string $wpmem_fields deprecated in 2.8.0 * @global string $add_field_err_msg The fields error message */ function wpmem_a_build_fields() { global $add_field_err_msg; $add_toggle = isset($_GET['edit']) ? $_GET['edit'] : false; $wpmem_fields = get_option('wpmembers_fields'); ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i>See the <a href="http://rocketgeek.com/plugins/wp-members/users-guide/plugin-settings/fields/" target="_blank">Users Guide on the field manager</a>.</i></strong> </div> </div> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <?php if ($add_toggle && isset($_POST['wpmem_admin_a']) != 'edit_field') { wpmem_a_field_edit('edit', $wpmem_fields, $add_toggle); } else { if (!$add_field_err_msg) { wpmem_a_field_table($wpmem_fields); } wpmem_a_field_edit('add'); } ?> </div><!-- #post-body-content --> </div><!-- #post-body --> </div><!-- .metabox-holder --> <?php }
/** * builds the dialogs panel * * @since 2.2.2 */ function wpmem_a_build_dialogs() { $wpmem_dialogs = get_option('wpmembers_dialogs'); $wpmem_dialog_title_arr = array(__("Restricted post (or page), displays above the login/registration form", 'wp-members'), __("Username is taken", 'wp-members'), __("Email is registered", 'wp-members'), __("Registration completed", 'wp-members'), __("User update", 'wp-members'), __("Passwords did not match", 'wp-members'), __("Password changes", 'wp-members'), __("Username or email do not exist when trying to reset forgotten password", 'wp-members'), __("Password reset", 'wp-members')); ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i>See the <a href="http://rocketgeek.com/plugins/wp-members/users-guide/plugin-settings/dialogs/" target="_blank">Users Guide on dialogs</a>.</i></strong> </div> </div> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <h3><span>WP-Members <?php _e('Dialogs and Error Messages', 'wp-members'); ?> </span></h3> <div class="inside"> <p><?php printf(__('You can customize the text for dialogs and error messages. Simple HTML is allowed %s etc.', 'wp-members'), '- <p>, <b>, <i>,'); ?> </p> <form name="updatedialogform" id="updatedialogform" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-dialogs'); ?> <table class="form-table"> <?php for ($row = 0; $row < count($wpmem_dialog_title_arr); $row++) { ?> <tr valign="top"> <th scope="row"><?php echo $wpmem_dialog_title_arr[$row]; ?> </th> <td><textarea name="<?php echo "dialogs_" . $row; ?> " rows="3" cols="50" id="" class="large-text code"><?php echo stripslashes($wpmem_dialogs[$row]); ?> </textarea></td> </tr> <?php } ?> <?php $wpmem_tos = stripslashes(get_option('wpmembers_tos')); ?> <tr valign="top"> <th scope="row"><?php _e('Terms of Service (TOS)', 'wp-members'); ?> </th> <td><textarea name="dialogs_tos" rows="3" cols="50" id="" class="large-text code"><?php echo $wpmem_tos; ?> </textarea></td> </tr> <tr valign="top"> <th scope="row"> </th> <td> <input type="hidden" name="wpmem_admin_a" value="update_dialogs" /> <input type="submit" name="save" class="button-primary" value="<?php _e('Update Dialogs', 'wp-members'); ?> »" /> </td> </tr> </table> </form> </div><!-- .inside --> </div><!-- #post-box --> </div><!-- #post-body-content --> </div><!-- #post-body --> </div> <!-- .metabox-holder --> <?php }
/** * Builds the captcha options. * * @since 2.4.0 */ function wpmem_a_build_captcha_options() { // Global settings. global $wpmem; $wpmem_captcha = get_option('wpmembers_captcha'); $url = home_url(); $help_link = __(sprintf('See the %sUsers Guide on CAPTCHA%s.', '<a href="http://rocketgeek.com/plugins/wp-members/users-guide/registration/using-captcha/" target="_blank">', '</a>'), 'wp-members'); ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i><?php echo $help_link; ?> </i></strong> </div> </div> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <h3><?php _e('Manage reCAPTCHA Options', 'wp-members'); ?> </h3> <div class="inside"> <form name="updatecaptchaform" id="updatecaptchaform" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-captcha'); ?> <table class="form-table"> <?php // if reCAPTCHA is enabled... if ($wpmem->captcha == 1) { $show_update_button = true; $private_key = isset($wpmem_captcha['recaptcha']) ? $wpmem_captcha['recaptcha']['private'] : ''; $public_key = isset($wpmem_captcha['recaptcha']) ? $wpmem_captcha['recaptcha']['public'] : ''; $captcha_theme = isset($wpmem_captcha['recaptcha']) ? $wpmem_captcha['recaptcha']['theme'] : ''; ?> <tr> <td colspan="2"> <p><?php _e('reCAPTCHA is a free, accessible CAPTCHA service that helps to digitize books while blocking spam on your blog.', 'wp-members'); ?> </p> <p><?php printf(__('reCAPTCHA asks commenters to retype two words scanned from a book to prove that they are a human. This verifies that they are not a spambot while also correcting the automatic scans of old books. So you get less spam, and the world gets accurately digitized books. Everybody wins! For details, visit the %s reCAPTCHA website%s', 'wp-members'), '<a href="http://www.google.com/recaptcha/intro/index.html" target="_blank">', '</a>'); ?> .</p> <p> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('reCAPTCHA Keys', 'wp-members'); ?> </th> <td> <?php printf(__('reCAPTCHA requires an API key, consisting of a "public" and a "private" key. You can sign up for a %s free reCAPTCHA key%s', 'wp-members'), "<a href=\"https://www.google.com/recaptcha/admin#whyrecaptcha\" target=\"_blank\">", '</a>'); ?> .<br /> <?php _e('Public Key', 'wp-members'); ?> : <input type="text" name="wpmem_captcha_publickey" size="50" value="<?php echo $public_key; ?> " /><br /> <?php _e('Private Key', 'wp-members'); ?> : <input type="text" name="wpmem_captcha_privatekey" size="50" value="<?php echo $private_key; ?> " /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Choose Theme', 'wp-members'); ?> </th> <td> <select name="wpmem_captcha_theme"><?php echo wpmem_create_formfield(__('Red', 'wp-members'), 'option', 'red', $captcha_theme); echo wpmem_create_formfield(__('White', 'wp-members'), 'option', 'white', $captcha_theme); echo wpmem_create_formfield(__('Black Glass', 'wp-members'), 'option', 'blackglass', $captcha_theme); echo wpmem_create_formfield(__('Clean', 'wp-members'), 'option', 'clean', $captcha_theme); ?> </select> </td> </tr> <?php // if reCAPTCHA v2 is enabled... } elseif ($wpmem->captcha == 3) { $show_update_button = true; $private_key = isset($wpmem_captcha['recaptcha']) ? $wpmem_captcha['recaptcha']['private'] : ''; $public_key = isset($wpmem_captcha['recaptcha']) ? $wpmem_captcha['recaptcha']['public'] : ''; ?> <tr valign="top"> <th scope="row"><?php _e('reCAPTCHA Keys', 'wp-members'); ?> </th> <td> <?php printf(__('reCAPTCHA requires an API key, consisting of a "site" and a "secret" key. You can sign up for a %s free reCAPTCHA key%s', 'wp-members'), "<a href=\"https://www.google.com/recaptcha/admin#whyrecaptcha\" target=\"_blank\">", '</a>'); ?> .<br /> <?php _e('Site Key', 'wp-members'); ?> : <input type="text" name="wpmem_captcha_publickey" size="50" value="<?php echo $public_key; ?> " /><br /> <?php _e('Secret Key', 'wp-members'); ?> : <input type="text" name="wpmem_captcha_privatekey" size="50" value="<?php echo $private_key; ?> " /> </td> </tr> <?php // If Really Simple CAPTCHA is enabled. } elseif ($wpmem->captcha == 2) { // Setup defaults. $defaults = array('characters' => 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789', 'num_char' => '4', 'dim_w' => '72', 'dim_h' => '30', 'font_color' => '0,0,0', 'bg_color' => '255,255,255', 'font_size' => '12', 'kerning' => '14', 'img_type' => 'png'); $args = isset($wpmem_captcha['really_simple']) && is_array($wpmem_captcha['really_simple']) ? $wpmem_captcha['really_simple'] : array(); $args = wp_parse_args($args, $defaults); // Explode colors. $font_color = explode(',', $args['font_color']); $bg_color = explode(',', $args['bg_color']); $show_update_button = true; if (is_plugin_active('really-simple-captcha/really-simple-captcha.php')) { ?> <tr> <th scope="row"><?php _e('Characters for image', 'wp-members'); ?> </th> <td><input name="characters" type="text" size="34" value="<?php echo $args['characters']; ?> " /></td> </tr> <tr> <th scope="row"><?php _e('Number of characters', 'wp-members'); ?> </th> <td><input name="num_char" type="text" size="2" value="<?php echo $args['num_char']; ?> " /></td> </tr> <tr> <th scope="row"><?php _e('Image dimensions', 'wp-members'); ?> </th> <td><?php _e('Width'); ?> <input name="dim_w" type="text" size="2" value="<?php echo $args['dim_w']; ?> " /> <?php _e('Height'); ?> <input name="dim_h" type="text" size="2" value="<?php echo $args['dim_h']; ?> " /></td> </tr> <tr> <th scope="row"><?php _e('Font color of characters', 'wp-members'); ?> </th> <td>R:<input name="font_color_r" type="text" size="2" value="<?php echo $font_color[0]; ?> " /> G:<input name="font_color_g" type="text" size="2" value="<?php echo $font_color[1]; ?> " /> B:<input name="font_color_b" type="text" size="2" value="<?php echo $font_color[2]; ?> " /></td> </tr> <tr> <th scope="row"><?php _e('Background color of image', 'wp-members'); ?> </th> <td>R:<input name="bg_color_r" type="text" size="2" value="<?php echo $bg_color[0]; ?> " /> G:<input name="bg_color_g" type="text" size="2" value="<?php echo $bg_color[1]; ?> " /> B:<input name="bg_color_b" type="text" size="2" value="<?php echo $bg_color[2]; ?> " /></td> </tr> <tr> <th scope="row"><?php _e('Font size', 'wp-members'); ?> </th> <td><input name="font_size" type="text" value="<?php echo $args['font_size']; ?> " /></td> </tr> <tr> <th scope="row"><?php _e('Width between characters', 'wp-members'); ?> </th> <td><input name="kerning" type="text" value="<?php echo $args['kerning']; ?> " /></td> </tr> <tr> <th scope="row"><?php _e('Image type', 'wp-members'); ?> </th> <td><select name="img_type"> <option<?php echo $args['img_type'] == 'png' ? ' selected' : ''; ?> >png</option> <option<?php echo $args['img_type'] == 'gif' ? ' selected' : ''; ?> >gif</option> <option<?php echo $args['img_type'] == 'jpg' ? ' selected' : ''; ?> >jpg</option> </select> </td> </tr><?php } else { $show_update_button = false; ?> <tr> <td colspan="2"> <p><?php _e('To use Really Simple CAPTCHA, you must have the Really Simple CAPTCHA plugin installed and activated.', 'wp-members'); ?> </p> <p><?php _e(sprintf('You can download Really Simple CAPTCHA from the %swordpress.org plugin repository%s.', '<a href="http://wordpress.org/plugins/really-simple-captcha/">', '</a>'), 'wp-members'); ?> </p> </td> </tr><?php } } // End if RSC is selected. if ($show_update_button) { switch ($wpmem->captcha) { case 1: $captcha_type = 'recaptcha'; break; case 2: $captcha_type = 'really_simple'; break; case 3: $captcha_type = 'recaptcha2'; break; } ?> <tr valign="top"> <th scope="row"> </th> <td> <input type="hidden" name="wpmem_recaptcha_type" value="<?php echo $captcha_type; ?> " /> <input type="hidden" name="wpmem_admin_a" value="update_captcha" /> <?php submit_button(__('Update CAPTCHA Settings', 'wp-members')); ?> </td> </tr> <?php } ?> </table> </form> </div><!-- .inside --> </div> </div><!-- #post-body-content --> </div><!-- #post-body --> </div><!-- .metabox-holder --> <?php }
/** * Builds the settings panel. * * @since 2.2.2 */ function wpmem_a_build_options() { global $wpmem; $admin_email = apply_filters('wpmem_notify_addr', get_option('admin_email')); $chg_email = __(sprintf('%sChange%s or %sFilter%s this address', '<a href="' . site_url('wp-admin/options-general.php', 'admin') . '">', '</a>', '<a href="http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_notify_addr/">', '</a>'), 'wp-members'); $help_link = __(sprintf('See the %sUsers Guide on plugin options%s.', '<a href="http://rocketgeek.com/plugins/wp-members/users-guide/plugin-settings/options/" target="_blank">', '</a>'), 'wp-members'); // Build an array of post types $post_types = get_post_types(array('public' => true, '_builtin' => false), 'names', 'and'); $post_arr = array('post' => 'Posts', 'page' => 'Pages'); if ($post_types) { foreach ($post_types as $post_type) { $cpt_obj = get_post_type_object($post_type); $post_arr[$cpt_obj->name] = $cpt_obj->labels->name; } } ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i><?php echo $help_link; ?> </i></strong> </div> </div> <?php wpmem_a_rss_box(); ?> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <h3><span><?php _e('Manage Options', 'wp-members'); ?> </span></h3> <div class="inside"> <form name="updatesettings" id="updatesettings" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-settings'); ?> <h3>Content</h3> <ul> <?php // Content Blocking option group. $i = 0; $len = count($post_arr); foreach ($post_arr as $key => $val) { if ($key == 'post' || $key == 'page') { // @todo - holding off on CPT support. ?> <li<?php echo $i == $len - 1 ? ' style="border-bottom:1px solid #eee;"' : ''; ?> > <label><?php echo $i == 0 ? 'Content Blocking' : ' '; ?> </label> <select name="wpmem_block_<?php echo $key; ?> "> <option value="0"<?php echo isset($wpmem->block[$key]) && $wpmem->block[$key] == 0 ? ' selected' : ''; ?> ><?php _e('Do not block', 'wp-members'); ?> </option> <option value="1"<?php echo isset($wpmem->block[$key]) && $wpmem->block[$key] == 1 ? ' selected' : ''; ?> ><?php _e('Block', 'wp-members'); ?> </option> <!--<option value="2"<?php echo isset($wpmem->block[$key]) && $wpmem->block[$key] == 2 ? ' selected' : ''; ?> ><?php _e('Hide', 'wp-members'); ?> </option>--> </select> <span><?php echo $val; ?> </span> </li> <?php $i++; } } // Show Excerpts, Login Form, and Registration Form option groups. $option_group_array = array('show_excerpt' => __('Show Excerpts', 'wp-members'), 'show_login' => __('Show Login Form', 'wp-members'), 'show_reg' => __('Show Registration Form', 'wp-members')); foreach ($option_group_array as $item_key => $item_val) { $i = 0; $len = count($post_arr); foreach ($post_arr as $key => $val) { if ($key == 'post' || $key == 'page') { // @todo - holding off on CPT support. $setting = isset($wpmem->{$item_key}[$key]) ? $wpmem->{$item_key}[$key] : 0; ?> <li<?php echo $i == $len - 1 ? ' style="border-bottom:1px solid #eee;"' : ''; ?> > <label><?php echo $i == 0 ? $item_val : ' '; ?> </label> <input name="wpmem_<?php echo $item_key; ?> _<?php echo $key; ?> " type="checkbox" id="" value="1"<?php echo wpmem_selected(1, $setting); ?> /> <span><?php echo $val; ?> </span> </li> <?php $i++; } } } ?> </ul> <?php if (WPMEM_EXP_MODULE == true) { $arr = array(array(__('Time-based expiration', 'wp-members'), 'wpmem_settings_time_exp', __('Allows for access to expire', 'wp-members'), 'use_exp'), array(__('Trial period', 'wp-members'), 'wpmem_settings_trial', __('Allows for a trial period', 'wp-members'), 'use_trial')); ?> <h3>Subscription Settings</h3> <ul><?php for ($row = 0; $row < count($arr); $row++) { ?> <li> <label><?php echo $arr[$row][0]; ?> </label> <?php if (WPMEM_DEBUG == true) { echo $wpmem->{$arr}[$row][3]; } ?> <input name="<?php echo $arr[$row][1]; ?> " type="checkbox" id="<?php echo $arr[$row][1]; ?> " value="1" <?php if ($wpmem->{$arr}[$row][3] == 1) { echo "checked"; } ?> /> <?php if ($arr[$row][2]) { ?> <span class="description"><?php echo $arr[$row][2]; ?> </span><?php } ?> </li> <?php } } ?> </ul> <h3>Other Settings</h3> <ul> <?php $arr = array(array(__('Notify admin', 'wp-members'), 'wpmem_settings_notify', sprintf(__('Notify %s for each new registration? %s', 'wp-members'), $admin_email, $chg_email), 'notify'), array(__('Moderate registration', 'wp-members'), 'wpmem_settings_moderate', __('Holds new registrations for admin approval', 'wp-members'), 'mod_reg'), array(__('Ignore warning messages', 'wp-members'), 'wpmem_settings_ignore_warnings', __('Ignores WP-Members warning messages in the admin panel', 'wp-members'), 'warnings')); for ($row = 0; $row < count($arr); $row++) { ?> <li> <label><?php echo $arr[$row][0]; ?> </label> <?php if (WPMEM_DEBUG == true) { echo $wpmem->{$arr}[$row][3]; } ?> <input name="<?php echo $arr[$row][1]; ?> " type="checkbox" id="<?php echo $arr[$row][1]; ?> " value="1" <?php if ($wpmem->{$arr}[$row][3] == 1) { echo "checked"; } ?> /> <?php if ($arr[$row][2]) { ?> <span class="description"><?php echo $arr[$row][2]; ?> </span><?php } ?> </li> <?php } ?> <?php $attribution = $wpmem->attrib; ?> <li> <label><?php _e('Attribution', 'wp-members'); ?> </label> <input name="attribution" type="checkbox" id="attribution" value="1" <?php if ($attribution == 1) { echo "checked"; } ?> /> <span class="description"><?php _e('Attribution is appreciated! Display "powered by" link on register form?', 'wp-members'); ?> </span> </li> <?php $auto_ex = $wpmem->autoex; ?> <li> <label><?php _e('Auto Excerpt:', 'wp-members'); ?> </label> <input type="checkbox" name="wpmem_autoex" value="1" <?php if ($auto_ex['auto_ex'] == 1) { echo "checked"; } ?> /> <?php _e('Number of words in excerpt:', 'wp-members'); ?> <input name="wpmem_autoex_len" type="text" size="5" value="<?php if ($auto_ex['auto_ex_len']) { echo $auto_ex['auto_ex_len']; } ?> " /> <span class="description"><?php _e('Optional', 'wp-members'); ?> . <?php _e('Automatically creates an excerpt', 'wp-members'); ?> </span> </li> <li> <label><?php _e('Enable CAPTCHA', 'wp-members'); ?> </label> <select name="wpmem_settings_captcha"> <option value="0"<?php echo $wpmem->captcha == 0 ? ' selected ' : ''; ?> ><?php _e('None', 'wp-members'); ?> </option> <option value="1"<?php echo $wpmem->captcha == 1 ? ' selected ' : ''; ?> >reCAPTCHA</option> <option value="2"<?php echo $wpmem->captcha == 2 ? ' selected ' : ''; ?> >Really Simple CAPTCHA</option> </select> </li> <h3><?php _e('Pages'); ?> </h3> <?php $wpmem_logurl = $wpmem->user_pages['login']; if (!$wpmem_logurl) { $wpmem_logurl = wpmem_use_ssl(); } ?> <li> <label><?php _e('Login Page:', 'wp-members'); ?> </label> <select name="wpmem_settings_logpage" id="wpmem_logpage_select"> <?php wpmem_admin_page_list($wpmem_logurl); ?> </select> <span class="description"><?php _e('Specify a login page (optional)', 'wp-members'); ?> </span><br /> <div id="wpmem_logpage_custom"> <label> </label> <input class="regular-text code" type="text" name="wpmem_settings_logurl" value="<?php echo $wpmem_logurl; ?> " size="50" /> </div> </li> <?php $wpmem_regurl = $wpmem->user_pages['register']; if (!$wpmem_regurl) { $wpmem_regurl = wpmem_use_ssl(); } ?> <li> <label><?php _e('Register Page:', 'wp-members'); ?> </label> <select name="wpmem_settings_regpage" id="wpmem_regpage_select"> <?php wpmem_admin_page_list($wpmem_regurl); ?> </select> <span class="description"><?php _e('For creating a register link in the login form', 'wp-members'); ?> </span><br /> <div id="wpmem_regpage_custom"> <label> </label> <input class="regular-text code" type="text" name="wpmem_settings_regurl" value="<?php echo $wpmem_regurl; ?> " size="50" /> </div> </li> <?php $wpmem_msurl = $wpmem->user_pages['profile']; if (!$wpmem_msurl) { $wpmem_msurl = wpmem_use_ssl(); } ?> <li> <label><?php _e('User Profile Page:', 'wp-members'); ?> </label> <select name="wpmem_settings_mspage" id="wpmem_mspage_select"> <?php wpmem_admin_page_list($wpmem_msurl); ?> </select> <span class="description"><?php _e('For creating a forgot password link in the login form', 'wp-members'); ?> </span><br /> <div id="wpmem_mspage_custom"> <label> </label> <input class="regular-text code" type="text" name="wpmem_settings_msurl" value="<?php echo $wpmem_msurl; ?> " size="50" /> </div> </li> <h3><?php _e('Stylesheet'); ?> </h3> <li> <label><?php _e('Stylesheet'); ?> :</label> <select name="wpmem_settings_style" id="wpmem_stylesheet_select"> <?php wpmem_admin_style_list($wpmem->style); ?> </select> </li> <?php $wpmem_cssurl = $wpmem->cssurl; if (!$wpmem_cssurl) { $wpmem_cssurl = wpmem_use_ssl(); } ?> <div id="wpmem_stylesheet_custom"> <li> <label><?php _e('Custom Stylesheet:', 'wp-members'); ?> </label> <input class="regular-text code" type="text" name="wpmem_settings_cssurl" value="<?php echo $wpmem_cssurl; ?> " size="50" /> </li> </div> <br /></br /> <input type="hidden" name="wpmem_admin_a" value="update_settings"> <input type="submit" name="UpdateSettings" class="button-primary" value="<?php _e('Update Settings', 'wp-members'); ?> »" /> </ul> </form> </div><!-- .inside --> </div> </div><!-- #post-body-content --> </div><!-- #post-body --> </div><!-- .metabox-holder --> <?php }
/** * builds the captcha options * * @since 2.4.0 */ function wpmem_a_build_captcha_options() { $wpmem_captcha = get_option('wpmembers_captcha'); $url = home_url(); ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i>See the <a href="http://rocketgeek.com/plugins/wp-members/users-guide/registration/using-captcha/" target="_blank">Users Guide on reCAPTCHA</a>.</i></strong> </div> </div> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <h3><?php _e('Manage reCAPTCHA Options', 'wp-members'); ?> </h3> <div class="inside"> <form name="updatecaptchaform" id="updatecaptchaform" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-captcha'); ?> <table class="form-table"> <tr> <td colspan="2"> <p><?php _e('reCAPTCHA is a free, accessible CAPTCHA service that helps to digitize books while blocking spam on your blog.', 'wp-members'); ?> </p> <p><?php printf(__('reCAPTCHA asks commenters to retype two words scanned from a book to prove that they are a human. This verifies that they are not a spambot while also correcting the automatic scans of old books. So you get less spam, and the world gets accurately digitized books. Everybody wins! For details, visit the %s reCAPTCHA website%s', 'wp-members'), '<a href="http://recaptcha.net/" target="_blank">', '</a>'); ?> .</p> <p> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('reCAPTCHA Keys', 'wp-members'); ?> </th> <td> <?php printf(__('reCAPTCHA requires an API key, consisting of a "public" and a "private" key. You can sign up for a %s free reCAPTCHA key%s', 'wp-members'), "<a href=\"http://recaptcha.net/api/getkey?domain={$url}&app=wordpress\" target=\"_blank\">", '</a>'); ?> .<br /> <?php _e('Public Key', 'wp-members'); ?> : <input type="text" name="wpmem_captcha_publickey" size="50" value="<?php echo $wpmem_captcha[0]; ?> " /><br /> <?php _e('Private Key', 'wp-members'); ?> : <input type="text" name="wpmem_captcha_privatekey" size="50" value="<?php echo $wpmem_captcha[1]; ?> " /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Choose Theme', 'wp-members'); ?> </th> <td> <select name="wpmem_captcha_theme"> <!--<?php echo wpmem_create_formfield(__('WP-Members', 'wp-members'), 'option', 'custom', $wpmem_captcha[2]); ?> --><?php echo wpmem_create_formfield(__('Red', 'wp-members'), 'option', 'red', $wpmem_captcha[2]); echo wpmem_create_formfield(__('White', 'wp-members'), 'option', 'white', $wpmem_captcha[2]); echo wpmem_create_formfield(__('Black Glass', 'wp-members'), 'option', 'blackglass', $wpmem_captcha[2]); echo wpmem_create_formfield(__('Clean', 'wp-members'), 'option', 'clean', $wpmem_captcha[2]); ?> <!--<?php echo wpmem_create_formfield(__('Custom', 'wp-members'), 'option', 'custom', $wpmem_captcha[2]); ?> --> </select> </td> </tr><!-- <tr valign="top"> <th scope="row">Custom reCAPTCHA theme</th> <td><input type="text" name="wpmem_settings_regurl" value="<?php echo $wpmem_regurl; ?> " size="50" /> <span class="description"><?php _e('Optional', 'wp-members'); ?> </span></td> </tr>--> <tr valign="top"> <th scope="row"> </th> <td> <input type="hidden" name="wpmem_admin_a" value="update_captcha" /> <input type="submit" name="save" class="button-primary" value="<?php _e('Update reCAPTCHA Settings', 'wp-members'); ?> »" /> </td> </tr> </table> </form> </div><!-- .inside --> </div> </div><!-- #post-body-content --> </div><!-- #post-body --> </div><!-- .metabox-holder --> <?php }
/** * Builds the settings panel. * * @since 2.2.2 */ function wpmem_a_build_options() { global $wpmem; /** This filter is documented in wp-members/inc/email.php */ $admin_email = apply_filters('wpmem_notify_addr', get_option('admin_email')); $chg_email = __(sprintf('%sChange%s or %sFilter%s this address', '<a href="' . site_url('wp-admin/options-general.php', 'admin') . '">', '</a>', '<a href="http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_notify_addr/">', '</a>'), 'wp-members'); $help_link = __(sprintf('See the %sUsers Guide on plugin options%s.', '<a href="http://rocketgeek.com/plugins/wp-members/users-guide/plugin-settings/options/" target="_blank">', '</a>'), 'wp-members'); // Build an array of post types $post_types = get_post_types(array('public' => true, '_builtin' => false), 'names', 'and'); $post_arr = array('post' => 'Posts', 'page' => 'Pages'); if ($post_types) { foreach ($post_types as $post_type) { $cpt_obj = get_post_type_object($post_type); $post_arr[$cpt_obj->name] = $cpt_obj->labels->name; } } ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i><?php echo $help_link; ?> </i></strong> </div> </div> <?php wpmem_a_rss_box(); ?> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <h3><span><?php _e('Manage Options', 'wp-members'); ?> </span></h3> <div class="inside"> <form name="updatesettings" id="updatesettings" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-settings'); ?> <h3><?php _e('Content', 'wp-members'); ?> </h3> <ul> <?php // Content Blocking option group. $i = 0; $len = count($post_arr); foreach ($post_arr as $key => $val) { if ($key == 'post' || $key == 'page' || isset($wpmem->post_types) && array_key_exists($key, $wpmem->post_types)) { ?> <li<?php echo $i == $len - 1 ? ' style="border-bottom:1px solid #eee;"' : ''; ?> > <label><?php echo $i == 0 ? 'Content Blocking' : ' '; ?> </label> <?php $block = isset($wpmem->block[$key]) ? $wpmem->block[$key] : ''; $values = array(__('Do not block', 'wp-members') . '|0', __('Block', 'wp-members') . '|1'); echo wpmem_create_formfield('wpmem_block_' . $key, 'select', $values, $block); ?> <span><?php echo $val; ?> </span> </li> <?php $i++; } } // Show Excerpts, Login Form, and Registration Form option groups. $option_group_array = array('show_excerpt' => __('Show Excerpts', 'wp-members'), 'show_login' => __('Show Login Form', 'wp-members'), 'show_reg' => __('Show Registration Form', 'wp-members'), 'autoex' => __('Auto Excerpt:', 'wp-members')); foreach ($option_group_array as $item_key => $item_val) { $i = 0; $len = count($post_arr); foreach ($post_arr as $key => $val) { if ($key == 'post' || $key == 'page' || isset($wpmem->post_types) && array_key_exists($key, $wpmem->post_types)) { ?> <li<?php echo $i == $len - 1 ? ' style="border-bottom:1px solid #eee;"' : ''; ?> > <label><?php echo $i == 0 ? $item_val : ' '; ?> </label> <?php if ('autoex' == $item_key) { if (isset($wpmem->{$item_key}[$key]) && $wpmem->{$item_key}[$key]['enabled'] == 1) { $setting = 1; $ex_len = $wpmem->{$item_key}[$key]['length']; } else { $setting = 0; $ex_len = ''; } echo wpmem_create_formfield('wpmem_' . $item_key . '_' . $key, 'checkbox', '1', $setting); ?> <span><?php echo $val; ?> </span> <span><?php _e('Number of words in excerpt:', 'wp-members'); ?> </span><input name="wpmem_autoex_<?php echo $key; ?> _len" type="text" size="5" value="<?php echo $ex_len; ?> " /> <?php } else { $setting = isset($wpmem->{$item_key}[$key]) ? $wpmem->{$item_key}[$key] : 0; echo wpmem_create_formfield('wpmem_' . $item_key . '_' . $key, 'checkbox', '1', $setting); ?> <span><?php echo $val; ?> </span> <?php } ?> </li> <?php $i++; } } } ?> </ul> <?php if (WPMEM_EXP_MODULE == true) { $arr = array(array(__('Time-based expiration', 'wp-members'), 'wpmem_settings_time_exp', __('Allows for access to expire', 'wp-members'), 'use_exp'), array(__('Trial period', 'wp-members'), 'wpmem_settings_trial', __('Allows for a trial period', 'wp-members'), 'use_trial')); ?> <h3><?php _e('Subscription Settings', 'wp-members'); ?> </h3> <ul><?php for ($row = 0; $row < count($arr); $row++) { ?> <li> <label><?php echo $arr[$row][0]; ?> </label> <?php echo wpmem_create_formfield($arr[$row][1], 'checkbox', '1', $wpmem->{$arr[$row][3]}); ?> <?php if ($arr[$row][2]) { ?> <span class="description"><?php echo $arr[$row][2]; ?> </span><?php } ?> </li> <?php } } ?> </ul> <h3><?php _e('Other Settings', 'wp-members'); ?> </h3> <ul> <?php $arr = array(array(__('Notify admin', 'wp-members'), 'wpmem_settings_notify', sprintf(__('Notify %s for each new registration? %s', 'wp-members'), $admin_email, $chg_email), 'notify'), array(__('Moderate registration', 'wp-members'), 'wpmem_settings_moderate', __('Holds new registrations for admin approval', 'wp-members'), 'mod_reg'), array(__('Ignore warning messages', 'wp-members'), 'wpmem_settings_ignore_warnings', __('Ignores WP-Members warning messages in the admin panel', 'wp-members'), 'warnings')); for ($row = 0; $row < count($arr); $row++) { ?> <li> <label><?php echo $arr[$row][0]; ?> </label> <?php echo wpmem_create_formfield($arr[$row][1], 'checkbox', '1', $wpmem->{$arr[$row][3]}); ?> <?php if ($arr[$row][2]) { ?> <span class="description"><?php echo $arr[$row][2]; ?> </span><?php } ?> </li> <?php } ?> <li> <label><?php _e('Attribution', 'wp-members'); ?> </label> <?php echo wpmem_create_formfield('attribution', 'checkbox', '1', $wpmem->attrib); ?> <span class="description"><?php _e('Attribution is appreciated! Display "powered by" link on register form?', 'wp-members'); ?> </span> </li> <li> <label><?php _e('Enable CAPTCHA', 'wp-members'); ?> </label> <?php $captcha = array(__('None', 'wp-members') . '|0', 'reCAPTCHA|1', 'reCAPTCHA v2|3', 'Really Simple CAPTCHA|2'); echo wpmem_create_formfield('wpmem_settings_captcha', 'select', $captcha, $wpmem->captcha); ?> </li> <h3><?php _e('Pages'); ?> </h3> <?php $wpmem_logurl = $wpmem->user_pages['login']; if (!$wpmem_logurl) { $wpmem_logurl = wpmem_use_ssl(); } ?> <li> <label><?php _e('Login Page:', 'wp-members'); ?> </label> <select name="wpmem_settings_logpage" id="wpmem_logpage_select"> <?php wpmem_admin_page_list($wpmem_logurl); ?> </select> <span class="description"><?php _e('Specify a login page (optional)', 'wp-members'); ?> </span><br /> <div id="wpmem_logpage_custom"> <label> </label> <input class="regular-text code" type="text" name="wpmem_settings_logurl" value="<?php echo $wpmem_logurl; ?> " size="50" /> </div> </li> <?php $wpmem_regurl = $wpmem->user_pages['register']; if (!$wpmem_regurl) { $wpmem_regurl = wpmem_use_ssl(); } ?> <li> <label><?php _e('Register Page:', 'wp-members'); ?> </label> <select name="wpmem_settings_regpage" id="wpmem_regpage_select"> <?php wpmem_admin_page_list($wpmem_regurl); ?> </select> <span class="description"><?php _e('For creating a register link in the login form', 'wp-members'); ?> </span><br /> <div id="wpmem_regpage_custom"> <label> </label> <input class="regular-text code" type="text" name="wpmem_settings_regurl" value="<?php echo $wpmem_regurl; ?> " size="50" /> </div> </li> <?php $wpmem_msurl = $wpmem->user_pages['profile']; if (!$wpmem_msurl) { $wpmem_msurl = wpmem_use_ssl(); } ?> <li> <label><?php _e('User Profile Page:', 'wp-members'); ?> </label> <select name="wpmem_settings_mspage" id="wpmem_mspage_select"> <?php wpmem_admin_page_list($wpmem_msurl); ?> </select> <span class="description"><?php _e('For creating a forgot password link in the login form', 'wp-members'); ?> </span><br /> <div id="wpmem_mspage_custom"> <label> </label> <input class="regular-text code" type="text" name="wpmem_settings_msurl" value="<?php echo $wpmem_msurl; ?> " size="50" /> </div> </li> <h3><?php _e('Stylesheet'); ?> </h3> <li> <label><?php _e('Stylesheet'); ?> :</label> <select name="wpmem_settings_style" id="wpmem_stylesheet_select"> <?php wpmem_admin_style_list($wpmem->style); ?> </select> </li> <?php $wpmem_cssurl = $wpmem->cssurl; if (!$wpmem_cssurl) { $wpmem_cssurl = wpmem_use_ssl(); } ?> <div id="wpmem_stylesheet_custom"> <li> <label><?php _e('Custom Stylesheet:', 'wp-members'); ?> </label> <input class="regular-text code" type="text" name="wpmem_settings_cssurl" value="<?php echo $wpmem_cssurl; ?> " size="50" /> </li> </div> <br /></br /> <input type="hidden" name="wpmem_admin_a" value="update_settings"> <?php submit_button(__('Update Settings', 'wp-members')); ?> </ul> </form> </div><!-- .inside --> </div> <?php if ($post_types) { ?> <div class="postbox"> <h3><span><?php _e('Custom Post Types', 'wp-members'); ?> </span></h3> <div class="inside"> <form name="updatecpts" id="updatecpts" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-cpts'); ?> <table class="form-table"> <tr> <th scope="row"><?php _e('Add to WP-Members Settings', 'wp-members'); ?> </th> <td><fieldset><?php foreach ($post_arr as $key => $val) { if ('post' != $key && 'page' != $key) { $checked = isset($wpmem->post_types) && array_key_exists($key, $wpmem->post_types) ? ' checked' : ''; echo '<label for="' . $key . '"><input type="checkbox" name="wpmembers_handle_cpts[]" value="' . $key . '"' . $checked . ' />' . $val . '</label><br />'; } } ?> </fieldset> </td> </tr> <tr> <input type="hidden" name="wpmem_admin_a" value="update_cpts" /> <td colspan="2"><?php submit_button(__('Update Settings', 'wp-members')); ?> </td> </tr> </table> </form> </div> </div> <?php } ?> </div><!-- #post-body-content --> </div><!-- #post-body --> </div><!-- .metabox-holder --> <?php }
/** * builds the settings panel * * @since 2.2.2 * * @param array $wpmem_settings */ function wpmem_a_build_options($wpmem_settings) { ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i>See the <a href="http://rocketgeek.com/plugins/wp-members/users-guide/plugin-settings/options/" target="_blank">Users Guide on plugin options</a>.</i></strong> </div> </div> <?php wpmem_a_rss_box(); ?> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <h3><span><?php _e('Manage Options', 'wp-members'); ?> </span></h3> <div class="inside"> <form name="updatesettings" id="updatesettings" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-settings'); ?> <table class="form-table"> <?php $arr = array(array(__('Block Posts by default', 'wp-members'), 'wpmem_settings_block_posts', __('Note: Posts can still be individually blocked or unblocked at the article level', 'wp-members')), array(__('Block Pages by default', 'wp-members'), 'wpmem_settings_block_pages', __('Note: Pages can still be individually blocked or unblocked at the article level', 'wp-members')), array(__('Show excerpts', 'wp-members'), 'wpmem_settings_show_excerpts', __('Shows excerpted content above the login/registration on both Posts and Pages', 'wp-members')), array(__('Notify admin', 'wp-members'), 'wpmem_settings_notify', __('Sends email to admin for each new registration?', 'wp-members')), array(__('Moderate registration', 'wp-members'), 'wpmem_settings_moderate', __('Holds new registrations for admin approval', 'wp-members')), array(__('Use reCAPTCHA', 'wp-members'), 'wpmem_settings_captcha', __('Turns on CAPTCHA for registration', 'wp-members')), array(__('Turn off registration', 'wp-members'), 'wpmem_settings_turnoff', __('Turns off the registration process, only allows login', 'wp-members')), array(__('Legacy forms', 'wp-members'), 'wpmem_settings_legacy', __('Uses the pre-2.5.1 table-based forms (leave off to use CSS table-less forms)', 'wp-members')), array(__('Time-based expiration', 'wp-members'), 'wpmem_settings_time_exp', __('Allows for access to expire', 'wp-members')), array(__('Trial period', 'wp-members'), 'wpmem_settings_trial', __('Allows for a trial period', 'wp-members')), array(__('Ignore warning messages', 'wp-members'), 'wpmem_settings_ignore_warnings', __('Ignores WP-Members warning messages in the admin panel', 'wp-members'))); ?> <?php for ($row = 0; $row < count($arr); $row++) { ?> <?php if ($row < 8 || $row > 9 || WPMEM_EXP_MODULE == true) { ?> <tr valign="top"> <th align="left" scope="row"><?php echo $arr[$row][0]; ?> </th> <td><?php if (WPMEM_DEBUG == true) { echo $wpmem_settings[$row + 1]; } ?> <input name="<?php echo $arr[$row][1]; ?> " type="checkbox" id="<?php echo $arr[$row][1]; ?> " value="1" <?php if ($wpmem_settings[$row + 1] == 1) { echo "checked"; } ?> /> <?php if ($arr[$row][2]) { ?> <span class="description"><?php echo $arr[$row][2]; ?> </span><?php } ?> </td> </tr> <?php } ?> <?php } ?> <?php $wpmem_msurl = get_option('wpmembers_msurl'); if (!$wpmem_msurl) { $wpmem_msurl = "http://"; } ?> <tr> <th align="left" scope="row"><?php _e('User Profile Page:', 'wp-members'); ?> </th> <td> <select name="wpmem_settings_mspage"> <?php wpmem_admin_page_list($wpmem_msurl); ?> </select> <?php _e('custom URL:', 'wp-members'); ?> <input type="text" name="wpmem_settings_msurl" value="<?php echo $wpmem_msurl; ?> " size="50" /> <span class="description"><?php _e('Optional', 'wp-members'); ?> </span></td> </tr> <?php $wpmem_regurl = get_option('wpmembers_regurl'); if (!$wpmem_regurl) { $wpmem_regurl = "http://"; } ?> <tr> <th align="left" scope="row"><?php _e('Register Page:', 'wp-members'); ?> </th> <td> <select name="wpmem_settings_regpage"> <?php wpmem_admin_page_list($wpmem_regurl); ?> </select> <?php _e('custom URL:', 'wp-members'); ?> <input type="text" name="wpmem_settings_regurl" value="<?php echo $wpmem_regurl; ?> " size="50" /> <span class="description"><?php _e('Optional', 'wp-members'); ?> </span></td> </tr> <?php $wpmem_style = get_option('wpmembers_style'); ?> <tr> <th align="left" scope="row"><?php _e('Stylesheet:', 'wp-members'); ?> </th> <td><select name="wpmem_settings_style"> <?php wpmem_admin_style_list(); ?> </select> <span class="description"><?php _e('Select a stylesheet or specify a custom stylesheet below', 'wp-members'); ?> </span> </td> </tr> <?php $wpmem_cssurl = get_option('wpmembers_cssurl'); if (!$wpmem_cssurl) { $wpmem_cssurl = "http://"; } ?> <tr> <th align="left" scope="row"><?php _e('Custom Stylesheet:', 'wp-members'); ?> </th> <td><input type="text" name="wpmem_settings_cssurl" value="<?php echo $wpmem_cssurl; ?> " size="50" /> <span class="description"><?php _e('Optional', 'wp-members'); ?> </span></td> </tr> <?php $auto_ex = get_option('wpmembers_autoex'); ?> <tr> <th align="left" scope="row"><?php _e('Auto Excerpt:', 'wp-members'); ?> </th> <td><input type="checkbox" name="wpmem_autoex" value="1" <?php if ($auto_ex['auto_ex'] == 1) { echo "checked"; } ?> /> <?php _e('Number of words in excerpt:', 'wp-members'); ?> <input name="wpmem_autoex_len" type="text" size="5" value="<?php if ($auto_ex['auto_ex_len']) { echo $auto_ex['auto_ex_len']; } ?> " /> <span class="description"><?php _e('Optional', 'wp-members'); ?> . <?php _e('Automatically creates an excerpt', 'wp-members'); ?> </span></td> </tr> <tr valign="top"> <td> </td> <td><input type="hidden" name="wpmem_admin_a" value="update_settings"> <input type="submit" name="UpdateSettings" class="button-primary" value="<?php _e('Update Settings', 'wp-members'); ?> »" /> </td> </tr> </table> </form> </div><!-- .inside --> </div> </div><!-- #post-body-content --> </div><!-- #post-body --> </div><!-- .metabox-holder --> <?php }
function wpmem_a_build_about_tab() { ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <?php wpmem_a_rss_box(); ?> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <div style="width:20%;max-width:300px;min-width:200px;padding:10px;margin:10px;border:#c4c4c4 1px solid;float:right;"> <h4><a href="http://rkt.bz/3O">WordPass</a></h4> <p>Default random passwords can be difficult to for users to use. WordPass simplifies this process by using words to create passwords. Passwords will be generated in the style of 2*Kayak29, 2Bigcranium2#, or %36POTATOE6. </p> <p>This plugin works with WordPress as well as with any plugin that uses the WordPress password generation function.</p> <p><strong><a href="http://rkt.bz/3O">Try WordPass Free!</a></strong></p> </div> <h3><?php _e('About WP-Members', 'wp-members'); ?> </h3> <div class="inside"> <p>WP-Members is a WordPress membership plugin that is simple to use but incorporates a powerful framework for customization. A simple installation can be up and running in just a few minutes. Using the plugin's API, filters, and actions, the plugin can also be fully customized without touching the main plugin files.</p> <p>I would encourage you to join the premium support site as a paid support subscriber. Not only does this provide access to subscriber-exclusive tutorials on customizing the plugin, a members only forum, priority direct email support, and a host of exclusive plugin extensions, it also supports the ongoing development of the plugin. The only way this plugin can continue to be actively developed and supported is through <b><i>your</i></b> support. So if you like the plugin and find it integral to your site and/or business, please consider joining today! (And if you're already a premium support subscriber - Thank You! You make this plugin possible.)</p> <p>Introduced in 2006, WP-Members was the first WordPress Membership plugin and through support of the WP community it continues to grow and be developed. Why put your trust in an unknown? WP-Members has a 10 year track record of active development and support.</p> <p><strong><a href="http://rkt.bz/KB">Plugin Documentation</a></strong> | <strong><a href="http://rkt.bz/about">Premium Support</a></strong> | <strong><a href="http://rkt.bz/join">Join Today!</a></strong></p> </div> <h3>Premium Extensions</h3> <div class="inside"> <p>These are some of the popular extensions that are <strong>available to premium support subscribers</strong>:</p> <p><strong><a href="http://rkt.bz/0h">Advanced Options</a></strong><br /> This exclusive extension adds a host of extra features to the plugin that are as simple to set up as checking a box. Hides the dashboard, override WP default URLs for login and registration, disable certain WP defaults, change WP-Members defaults, notify admin on user profile update, integrate with other popular plugins like WooCommerce, BuddyPress, and ACF (Advanced Custom Fields), and more. See a list of available settings here. <p><strong><a href="http://rkt.bz/r3">PayPal Subscriptions</a></strong><br /> Start charging for access to your membership site. Easy to set up and manages user expiration dates. Uses basic PayPal IPN (Instant Payment Notification).</p> <p><strong><a href="http://rkt.bz/3b">MailChimp Integration</a></strong><br /> Integrate MainChimp newsletter signup directly into your WP-Members registration form and allow users to subscribe/unsubscribe from their profile.</p> <p><strong><a href="http://rkt.bz/fh">User List</a></strong><br /> Provides a configurable shortcode to create user/member directories. The extension allows you to set defaults for the shortcode and to override any of those defaults with shortcode parameters for an unlimited number of lists.</p> <p><strong><a href="http://rkt.bz/C6">Registration Blacklist</a></strong><br /> Do you need to block certain IPs or email addresses from registering? How about restricting users from trying to register certain usernames like "admin" or "support"? This extension allows you to block IPs, emails, and restrict username selection. It can also be used to block registration from wildcard email domains such as *@hotmail.com or *.ru</p> <p><strong><a href="http://rkt.bz/6k">And More!</a></strong><br /> Invitation codes, email as username, salesforce integration, and more. View a full list of available extensions here. Or signup as a support subscriber and start taking your WP-Members installation to the next level today!</p> </div> </div> </div> </div><?php }
/** * builds the settings panel * * @since 2.2.2 * * @param array $wpmem_settings */ function wpmem_a_build_options($wpmem_settings) { $admin_email = apply_filters('wpmem_notify_addr', get_option('admin_email')); $chg_email = __(sprintf('%sChange%s or %sFilter%s this address', '<a href="' . site_url('wp-admin/options-general.php', 'admin') . '">', '</a>', '<a href="http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_notify_addr/">', '</a>'), 'wp-members'); $help_link = __(sprintf('See the %sUsers Guide on plugin options%s.', '<a href="http://rocketgeek.com/plugins/wp-members/users-guide/plugin-settings/options/" target="_blank">', '</a>'), 'wp-members'); ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i><?php echo $help_link; ?> </i></strong> </div> </div> <?php wpmem_a_rss_box(); ?> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <h3><span><?php _e('Manage Options', 'wp-members'); ?> </span></h3> <div class="inside"> <form name="updatesettings" id="updatesettings" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-settings'); ?> <ul> <?php $arr = array(array(__('Block Posts by default', 'wp-members'), 'wpmem_settings_block_posts', __('Note: Posts can still be individually blocked or unblocked at the article level', 'wp-members')), array(__('Block Pages by default', 'wp-members'), 'wpmem_settings_block_pages', __('Note: Pages can still be individually blocked or unblocked at the article level', 'wp-members')), array(__('Show excerpts', 'wp-members'), 'wpmem_settings_show_excerpts', __('Shows excerpted content above the login/registration on both Posts and Pages', 'wp-members')), array(__('Notify admin', 'wp-members'), 'wpmem_settings_notify', sprintf(__('Notify %s for each new registration? %s', 'wp-members'), $admin_email, $chg_email)), array(__('Moderate registration', 'wp-members'), 'wpmem_settings_moderate', __('Holds new registrations for admin approval', 'wp-members')), array(__('Use reCAPTCHA', 'wp-members'), 'wpmem_settings_captcha', __('Turns on CAPTCHA for registration', 'wp-members')), array(__('Hide registration', 'wp-members'), 'wpmem_settings_turnoff', __('Removes the registration form from blocked content', 'wp-members')), array('', '', ''), array(__('Time-based expiration', 'wp-members'), 'wpmem_settings_time_exp', __('Allows for access to expire', 'wp-members')), array(__('Trial period', 'wp-members'), 'wpmem_settings_trial', __('Allows for a trial period', 'wp-members')), array(__('Ignore warning messages', 'wp-members'), 'wpmem_settings_ignore_warnings', __('Ignores WP-Members warning messages in the admin panel', 'wp-members'))); for ($row = 0; $row < count($arr); $row++) { if ($row != 7 && $row != 5) { //if( $row != 7 ) { if ($row < 8 || $row > 9 || WPMEM_EXP_MODULE == true) { ?> <li> <label><?php echo $arr[$row][0]; ?> </label> <?php if (WPMEM_DEBUG == true) { echo $wpmem_settings[$row + 1]; } ?> <input name="<?php echo $arr[$row][1]; ?> " type="checkbox" id="<?php echo $arr[$row][1]; ?> " value="1" <?php if ($wpmem_settings[$row + 1] == 1) { echo "checked"; } ?> /> <?php if ($arr[$row][2]) { ?> <span class="description"><?php echo $arr[$row][2]; ?> </span><?php } ?> </li> <?php } } } ?> <?php $attribution = get_option('wpmembers_attrib'); ?> <li> <label><?php _e('Attribution', 'wp-members'); ?> </label> <input name="attribution" type="checkbox" id="attribution" value="1" <?php if ($attribution == 1) { echo "checked"; } ?> /> <span class="description"><?php _e('Attribution is appreciated! Display "powered by" link on register form?', 'wp-members'); ?> </span> </li> <?php $auto_ex = get_option('wpmembers_autoex'); ?> <li> <label><?php _e('Auto Excerpt:', 'wp-members'); ?> </label> <input type="checkbox" name="wpmem_autoex" value="1" <?php if ($auto_ex['auto_ex'] == 1) { echo "checked"; } ?> /> <?php _e('Number of words in excerpt:', 'wp-members'); ?> <input name="wpmem_autoex_len" type="text" size="5" value="<?php if ($auto_ex['auto_ex_len']) { echo $auto_ex['auto_ex_len']; } ?> " /> <span class="description"><?php _e('Optional', 'wp-members'); ?> . <?php _e('Automatically creates an excerpt', 'wp-members'); ?> </span> </li> <li> <label><?php _e('Enable CAPTCHA', 'wp-members'); ?> </label> <select name="wpmem_settings_captcha"> <option value="0"<?php echo $wpmem_settings[6] == 0 ? ' selected ' : ''; ?> ><?php _e('None'); ?> </option> <option value="1"<?php echo $wpmem_settings[6] == 1 ? ' selected ' : ''; ?> >reCAPTCHA</option> <?php // if rs captcha is enabled ?> <option value="2"<?php echo $wpmem_settings[6] == 2 ? ' selected ' : ''; ?> >Really Simple CAPTCHA</option> </select> </li> <h3><?php _e('Pages'); ?> </h3> <?php $wpmem_logurl = get_option('wpmembers_logurl'); if (!$wpmem_logurl) { $wpmem_logurl = wpmem_use_ssl(); } ?> <li> <label><?php _e('Login Page:', 'wp-members'); ?> </label> <select name="wpmem_settings_logpage" id="wpmem_logpage_select"> <?php wpmem_admin_page_list($wpmem_logurl); ?> </select> <span class="description"><?php _e('Specify a login page (optional)', 'wp-members'); ?> </span><br /> <div id="wpmem_logpage_custom"> <label> </label> <input class="regular-text code" type="text" name="wpmem_settings_logurl" value="<?php echo $wpmem_logurl; ?> " size="50" /> </div> </li> <?php $wpmem_regurl = get_option('wpmembers_regurl'); if (!$wpmem_regurl) { $wpmem_regurl = wpmem_use_ssl(); } ?> <li> <label><?php _e('Register Page:', 'wp-members'); ?> </label> <select name="wpmem_settings_regpage" id="wpmem_regpage_select"> <?php wpmem_admin_page_list($wpmem_regurl); ?> </select> <span class="description"><?php _e('For creating a register link in the login form', 'wp-members'); ?> </span><br /> <div id="wpmem_regpage_custom"> <label> </label> <input class="regular-text code" type="text" name="wpmem_settings_regurl" value="<?php echo $wpmem_regurl; ?> " size="50" /> </div> </li> <?php $wpmem_msurl = get_option('wpmembers_msurl'); if (!$wpmem_msurl) { $wpmem_msurl = wpmem_use_ssl(); } ?> <li> <label><?php _e('User Profile Page:', 'wp-members'); ?> </label> <select name="wpmem_settings_mspage" id="wpmem_mspage_select"> <?php wpmem_admin_page_list($wpmem_msurl); ?> </select> <span class="description"><?php _e('For creating a forgot password link in the login form', 'wp-members'); ?> </span><br /> <div id="wpmem_mspage_custom"> <label> </label> <input class="regular-text code" type="text" name="wpmem_settings_msurl" value="<?php echo $wpmem_msurl; ?> " size="50" /> </div> </li> <?php $wpmem_style = get_option('wpmembers_style'); ?> <h3><?php _e('Stylesheet'); ?> </h3> <li> <label><?php _e('Stylesheet'); ?> :</label> <select name="wpmem_settings_style" id="wpmem_stylesheet_select"> <?php wpmem_admin_style_list(); ?> </select> </li> <?php $wpmem_cssurl = get_option('wpmembers_cssurl'); if (!$wpmem_cssurl) { $wpmem_cssurl = wpmem_use_ssl(); } ?> <div id="wpmem_stylesheet_custom"> <li> <label><?php _e('Custom Stylesheet:', 'wp-members'); ?> </label> <input class="regular-text code" type="text" name="wpmem_settings_cssurl" value="<?php echo $wpmem_cssurl; ?> " size="50" /> </li> </div> <br /></br /> <input type="hidden" name="wpmem_admin_a" value="update_settings"> <input type="submit" name="UpdateSettings" class="button-primary" value="<?php _e('Update Settings', 'wp-members'); ?> »" /> </ul> </form> </div><!-- .inside --> </div> </div><!-- #post-body-content --> </div><!-- #post-body --> </div><!-- .metabox-holder --> <?php }
/** * builds the emails panel * * @since 2.7 * * @param array $wpmem_settings */ function wpmem_a_build_emails($wpmem_settings) { if ($wpmem_settings[5] == 0) { $wpmem_email_title_arr = array(array(__("New Registration", 'wp-members'), 'wpmembers_email_newreg')); } else { $wpmem_email_title_arr = array(array(__("Registration is Moderated", 'wp-members'), 'wpmembers_email_newmod'), array(__("Registration is Moderated, User is Approved", 'wp-members'), 'wpmembers_email_appmod')); } array_push($wpmem_email_title_arr, array(__("Password Reset", 'wp-members'), 'wpmembers_email_repass')); if ($wpmem_settings[4] == 1) { array_push($wpmem_email_title_arr, array(__("Admin Notification", 'wp-members'), 'wpmembers_email_notify')); } array_push($wpmem_email_title_arr, array(__("Email Signature", 'wp-members'), 'wpmembers_email_footer')); ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i>See the <a href="http://rocketgeek.com/plugins/wp-members/users-guide/plugin-settings/emails/" target="_blank">Users Guide on email options</a>.</i></strong> </div> </div> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <h3><span>WP-Members <?php _e('Email Messages', 'wp-members'); ?> </span></h3> <div class="inside"> <p> <?php _e('You can customize the content of the emails sent by the plugin.', 'wp-members'); ?> <br /> <a href="http://rocketgeek.com/plugins/wp-members/users-guide/customizing-emails/" target="_blank"> <?php _e('A list of shortcodes is available here.', 'wp-members'); ?> </a> </p> <hr /> <form name="updateemailform" id="updateemailform" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-emails'); ?> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Set a custom email address', 'wp-members'); ?> </th> <td><input type="text" name="wp_mail_from" size="40" value="<?php echo get_option('wpmembers_email_wpfrom'); ?> " /> <span class="description"><?php _e('(optional)', 'wp-members'); ?> email@yourdomain.com</span></td> </tr> <tr valign="top"> <th scope="row"><?php _e('Set a custom email name', 'wp-members'); ?> </th> <td><input type="text" name="wp_mail_from_name" size="40" value="<?php echo get_option('wpmembers_email_wpname'); ?> " /> <span class="description"><?php _e('(optional)', 'wp-members'); ?> John Smith</span></td> </tr> <tr><td colspan="2"><hr /></td></tr> <?php for ($row = 0; $row < count($wpmem_email_title_arr) - 1; $row++) { $arr = get_option($wpmem_email_title_arr[$row][1]); ?> <tr valign="top"><td colspan="2"><strong><?php echo $wpmem_email_title_arr[$row][0]; ?> </strong></td></tr> <tr valign="top"> <th scope="row"><?php _e('Subject', 'wp-members'); ?> </th> <td><input type="text" name="<?php echo $wpmem_email_title_arr[$row][1] . '_subj'; ?> " size="80" value="<?php echo stripslashes($arr['subj']); ?> "></td> </tr> <tr valign="top"> <th scope="row"><?php _e('Body', 'wp-members'); ?> </th> <td><textarea name="<?php echo $wpmem_email_title_arr[$row][1] . '_body'; ?> " rows="12" cols="50" id="" class="large-text code"><?php echo stripslashes($arr['body']); ?> </textarea></td> </tr> <tr><td colspan="2"><hr /></td></tr> <?php } $arr = get_option($wpmem_email_title_arr[$row][1]); ?> <tr valign="top"> <th scope="row"><strong><?php echo $wpmem_email_title_arr[$row][0]; ?> </strong> <span class="description"><?php _e('(optional)', 'wp-members'); ?> </span></th> <td><textarea name="<?php echo $wpmem_email_title_arr[$row][1] . '_body'; ?> " rows="10" cols="50" id="" class="large-text code"><?php echo stripslashes($arr); ?> </textarea></td> </tr> <tr><td colspan="2"><hr /></td></tr> <tr valign="top"> <th scope="row"> </th> <td> <input type="hidden" name="wpmem_admin_a" value="update_emails" /> <input type="submit" name="save" class="button-primary" value="<?php _e('Update Emails', 'wp-members'); ?> »" /> </td> </tr> </table> </form> </div><!-- .inside --> </div><!-- #post-box --> </div> <!-- #post-body-content --> </div><!-- #post-body --> </div><!-- .metabox-holder --> <?php }
/** * Builds the dialogs panel. * * @since 2.2.2 * * @global object $wpmem */ function wpmem_a_build_dialogs() { global $wpmem; ?> <div class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <?php wpmem_a_meta_box(); ?> <div class="postbox"> <h3><span><?php _e('Need help?', 'wp-members'); ?> </span></h3> <div class="inside"> <strong><i>See the <a href="http://rocketgeek.com/plugins/wp-members/users-guide/plugin-settings/dialogs/" target="_blank">Users Guide on dialogs</a>.</i></strong> </div> </div> </div> <!-- .inner-sidebar --> <div id="post-body"> <div id="post-body-content"> <div class="postbox"> <h3><span>WP-Members <?php _e('Dialogs and Error Messages', 'wp-members'); ?> </span></h3> <div class="inside"> <p><?php printf(__('You can customize the text for dialogs and error messages. Simple HTML is allowed %s etc.', 'wp-members'), '- <p>, <b>, <i>,'); ?> </p> <form name="updatedialogform" id="updatedialogform" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <?php wp_nonce_field('wpmem-update-dialogs'); ?> <table class="form-table"> <?php if (!empty($wpmem->admin->dialogs)) { foreach ($wpmem->admin->dialogs as $dialog) { $wpmem->admin->do_dialog_input($dialog); } } ?> <?php $wpmem_tos = stripslashes(get_option('wpmembers_tos')); ?> <tr valign="top"> <th scope="row"><?php _e('Terms of Service (TOS)', 'wp-members'); ?> </th> <td><textarea name="dialogs_tos" rows="3" cols="50" id="" class="large-text code"><?php echo $wpmem_tos; ?> </textarea></td> </tr> <tr valign="top"> <th scope="row"> </th> <td> <input type="hidden" name="wpmem_admin_a" value="update_dialogs" /> <?php submit_button(__('Update Dialogs', 'wp-members')); ?> </td> </tr> </table> </form> </div><!-- .inside --> </div><!-- #post-box --> </div><!-- #post-body-content --> </div><!-- #post-body --> </div> <!-- .metabox-holder --> <?php }