';
/**
* Filter the links displayed on the Log In page (logged in state).
*
@@ -235,10 +256,30 @@ function wpmem_inc_memberlinks( $page = 'members' )
break;
case 'status':
- $str ='
the online Users Guide. A Quick Start Guide is also available. WP-Members(tm) is a trademark of butlerblog.com.
-Version: 2.9.8.1
+Version: 2.9.9
Author: Chad Butler
Author URI: http://butlerblog.com/
License: GPLv2
@@ -60,7 +60,7 @@
/** initial constants **/
-define( 'WPMEM_VERSION', '2.9.8.1' );
+define( 'WPMEM_VERSION', '2.9.9' );
define( 'WPMEM_DEBUG', false );
define( 'WPMEM_DIR', plugin_dir_url ( __FILE__ ) );
define( 'WPMEM_PATH', plugin_dir_path( __FILE__ ) );
@@ -169,6 +169,7 @@ function wpmem_init()
add_action( 'admin_menu', 'wpmem_admin_options' ); // adds admin menu
add_action( 'user_register', 'wpmem_wp_reg_finalize' ); // handles wp native registration
add_action( 'login_enqueue_scripts', 'wpmem_wplogin_stylesheet' ); // styles the native registration
+ add_filter( 'comments_template', 'wpmem_securify_comments', 20, 1 ); // securifies the comments
add_filter( 'allow_password_reset', 'wpmem_no_reset' ); // no password reset for non-activated users
add_filter( 'the_content', 'wpmem_securify', 1, 1 ); // securifies the_content
From cff4d4dd3ceedb50560611558373869f999aba1f Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 9 Mar 2015 12:01:06 -0500
Subject: [PATCH 0021/1694] updated readme file
---
readme.txt | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/readme.txt b/readme.txt
index ccbad9c2..4ceb3b7e 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,7 +3,7 @@ Contributors: cbutlerjr
Tags: access, authentication, block, captcha, community, content, login, member, members, members only, membership, memberships, password, permissions, premium content, protect, protect content, register, registration, restrict access, restrict content, restriction, security, signup, subscriber, subscribers, user, users, wordpress members, wordpress membership, wordpress membership plugin
Requires at least: 3.1
Tested up to: 4.1
-Stable tag: 2.9.8.1
+Stable tag: 2.9.9
License: GPLv2
WP-Members™ is a free membership management framework for WordPress® that restricts content to registered users.
@@ -111,8 +111,7 @@ Premium priority support is available at the plugin's site [RocketGeek.com](http
== Upgrade Notice ==
-WP-Members 2.9.8.1 corrects a bug created by the inclusion of the new redirect_to parameter in the login page shortcode. If you use this shortcode, you should apply this update.
-WP-Members 2.9.8 is mostly minor updates with the exception of a change to the post meta field used for blocking/unblocking individual posts and pages. Be sure to read the release notes prior to updating.
+WP-Members 2.9.9 is mostly minor updates preparing codebase for the 3.0 project.
== Screenshots ==
@@ -134,13 +133,17 @@ WP-Members 2.9.8 is mostly minor updates with the exception of a change to the p
== Changelog ==
= 2.9.9 =
-* code standards in wp-members-email.php
-* rebuilt admin notification email to follow new regular email structure with more filters in wp-members-email.com
-* added $toggle to headers filter that is used in both emails so that headers could be filtered based on the email being sent (i.e. sending plain text for admin notification vs html for others. in wp-members-email.php
-* added redirect_to parameter as a widget entry in wp-members-sidebar.php
-* corrected error checking for adding new fields in /admin/tab-fields.php
-* added functions for updating user_status in wp_users table in /admin/users.php
-* fixed get_user_meta 'true' error in wp-members-core.php, users.php, /admin/users.php, /admin/user-profile.php
+* Code standards in wp-members-email.php
+* Rebuilt admin notification email to follow new regular email structure with more filters in wp-members-email.com
+* Added $toggle to headers filter that is used in both emails so that headers could be filtered based on the email being sent (i.e. sending plain text for admin notification vs html for others. in wp-members-email.php
+* Added redirect_to parameter as a widget entry in wp-members-sidebar.php
+* Corrected flaws in error checking for adding new fields in /admin/tab-fields.php
+* Added functions for updating user_status in wp_users table in /admin/users.php
+* Fixed get_user_meta 'true' error in wp-members-core.php, users.php, /admin/users.php, /admin/user-profile.php
+* Added dummy comments template to protect comments without post password.
+* Added new action for deactivting a user (opposite of wpmem_user_activated).
+* Added check to remove password, confirm_password, and confirm_email from export (data for these was already skipped, but the field space was there).
+* Added wpmem_status_msg_args and wpmem_login_links_args filters.
= 2.9.8 =
* Fixed bug in settings update that caused the stored version number to be erased.
From 844fda78c04cdf16cd075b59f2d556ad2a41871c Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Wed, 11 Mar 2015 11:26:07 -0500
Subject: [PATCH 0022/1694] fixes to admin email function after 2.9.9 testing
---
wp-members-email.php | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/wp-members-email.php b/wp-members-email.php
index b99abfde..1db37c98 100644
--- a/wp-members-email.php
+++ b/wp-members-email.php
@@ -39,7 +39,9 @@
function wpmem_inc_regemail( $user_id, $password, $toggle, $wpmem_fields = null, $field_data = null ) {
/**
- * Determine which email is being sent
+ * Determine which email is being sent.
+ *
+ * Stored option is an array with keys 'body' and 'subj'.
*/
switch ( $toggle ) {
@@ -291,7 +293,7 @@ function wpmem_notify_admin( $user_id, $wpmem_fields, $field_data = null ) {
* @param mixed $default_header The email headers (default = null).
* @param string $toggle Toggle to determine what email is being generated (newreg|newmod|appmod|repass|admin).
*/
- $arr['headers'] = apply_filters( 'wpmem_email_headers', $default_header, $toggle );
+ $arr['headers'] = apply_filters( 'wpmem_email_headers', $default_header, 'admin' );
/** handle backward compatibility for customizations that may call the email function directly */
if ( ! $wpmem_fields ) {
@@ -333,7 +335,7 @@ function wpmem_notify_admin( $user_id, $wpmem_fields, $field_data = null ) {
if ( ! $disable ) {
/** split field_arr into field_str */
- $fields_str = '';
+ $field_str = '';
foreach ( $field_arr as $key => $val ) {
$field_str.= $key . ': ' . $val . "\r\n";
}
@@ -353,7 +355,7 @@ function wpmem_notify_admin( $user_id, $wpmem_fields, $field_data = null ) {
$replace[] = get_user_meta( $user_id, $field[2], true );
}
- /* Get the subject, body, and footer shortcodes */
+ /** Get the subject, body, and footer shortcodes */
$subj = str_replace( $shortcd, $replace, $subj );
$body = str_replace( $shortcd, $replace, $body );
$foot = ( $add_footer ) ? str_replace( $shortcd, $replace, $foot ) : '';
From 579fa597d3e6f6440ace02a1507effb4096ce3ca Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 17 Mar 2015 16:23:08 -0500
Subject: [PATCH 0023/1694] 2.9.9 rc1
---
readme.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/readme.txt b/readme.txt
index 4ceb3b7e..61bc6a99 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,6 +1,6 @@
=== WP-Members ===
Contributors: cbutlerjr
-Tags: access, authentication, block, captcha, community, content, login, member, members, members only, membership, memberships, password, permissions, premium content, protect, protect content, register, registration, restrict access, restrict content, restriction, security, signup, subscriber, subscribers, user, users, wordpress members, wordpress membership, wordpress membership plugin
+Tags: access, authentication, content, login, member, membership, password, protect, register, registration, restriction, subscriber
Requires at least: 3.1
Tested up to: 4.1
Stable tag: 2.9.9
From 5780de9bfbf61ee21a4d0815e9628522df685543 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Thu, 19 Mar 2015 13:36:28 -0500
Subject: [PATCH 0024/1694] fixes for really simple captcha
---
forms.php | 6 +++---
readme.txt | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/forms.php b/forms.php
index 7f4ef675..30ea95de 100644
--- a/forms.php
+++ b/forms.php
@@ -736,7 +736,7 @@ function wpmem_inc_registration( $toggle = 'new', $heading = '' )
// if captcha is Really Simple CAPTCHA
- if( WPMEM_CAPTCHA == 2 ) {
+ if( WPMEM_CAPTCHA == 2 && $toggle != 'edit' ) {
$row = wpmem_build_rs_captcha();
$rows['captcha'] = array(
'order' => '',
@@ -745,9 +745,9 @@ function wpmem_inc_registration( $toggle = 'new', $heading = '' )
'value' => '',
'row_before' => $row_before,
'label' => $row['label'],
- 'field_before' => $field_before,
+ 'field_before' => ( $wrap_inputs ) ? '
' : '',
'row_after' => $row_after
);
}
diff --git a/readme.txt b/readme.txt
index 61bc6a99..11ad2c90 100644
--- a/readme.txt
+++ b/readme.txt
@@ -144,6 +144,7 @@ WP-Members 2.9.9 is mostly minor updates preparing codebase for the 3.0 project.
* Added new action for deactivting a user (opposite of wpmem_user_activated).
* Added check to remove password, confirm_password, and confirm_email from export (data for these was already skipped, but the field space was there).
* Added wpmem_status_msg_args and wpmem_login_links_args filters.
+* Corrected Really Simple Captcha, added field wrapper and should not display on user profile edit.
= 2.9.8 =
* Fixed bug in settings update that caused the stored version number to be erased.
From e9a330bfb59ca7da38cf355e017cf04f7d4cdf73 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Thu, 19 Mar 2015 16:30:43 -0500
Subject: [PATCH 0025/1694] 2.9.9 rc2
---
admin/admin.php | 14 +++++++++--
admin/post.php | 32 ++++++++++++++---------
admin/user-profile.php | 28 ++++++++++++++++-----
admin/users.php | 17 +++++++++++--
wp-members-core.php | 17 +++++++------
wp-members-register.php | 56 ++++++++++++++++++++++++++++++++---------
wp-members.php | 8 +++---
7 files changed, 127 insertions(+), 45 deletions(-)
diff --git a/admin/admin.php b/admin/admin.php
index a84313b1..dd2c6641 100644
--- a/admin/admin.php
+++ b/admin/admin.php
@@ -111,8 +111,6 @@ function wpmem_add_captcha_tab( $tabs ) {
* Primary admin function
*
* @since 2.1
- *
- * @uses do_action wpmem_admin_do_tab
*/
function wpmem_admin()
{
@@ -134,6 +132,18 @@ function wpmem_admin()
wpmem_a_do_warnings( $did_update, $wpmem_settings );
+ /**
+ * Fires at the end of creating an admin panel tab.
+ *
+ * This action is part of the plugin's admin panel API for adding
+ * additional admin tabs. This action is for adding content for
+ * a custom tab.
+ *
+ * @since 2.8
+ *
+ * @param string $tab The tab being generated.
+ * @param array $wpmem_settings The plugin settings.
+ */
do_action( 'wpmem_admin_do_tab', $tab, $wpmem_settings );
?>
-
-
+
$user_ID, 'user_pass' => $pass1 ) );
/**
- * Password change action
+ * Fires after password change.
*
* @since 2.9.0
*
- * @param int $user_ID The user's numeric ID
+ * @param int $user_ID The user's numeric ID.
*/
do_action( 'wpmem_pwd_change', $user_ID );
@@ -857,11 +860,11 @@ function wpmem_reset_password()
wpmem_inc_regemail( $user->ID, $new_pass, 3 );
/**
- * Password reset action
+ * Fires after password reset.
*
* @since 2.9.0
*
- * @param int $user_ID The user's numeric ID
+ * @param int $user_ID The user's numeric ID.
*/
do_action( 'wpmem_pwd_reset', $user->ID );
diff --git a/wp-members-register.php b/wp-members-register.php
index c6986bf2..bde97ce3 100644
--- a/wp-members-register.php
+++ b/wp-members-register.php
@@ -28,12 +28,6 @@
*
* @since 2.2.1
*
- * @uses do_action Calls 'wpmem_pre_register_data' action
- * @uses do_action Calls 'wpmem_post_register_data' action
- * @uses do_action Calls 'wpmem_register_redirect' action
- * @uses do_action Calls 'wpmem_pre_update_data' action
- * @uses do_action Calls 'wpmem_post_update_data' action
- *
* @param string $toggle toggles the function between 'register' and 'update'.
* @global int $user_ID
* @global string $wpmem_themsg
@@ -209,7 +203,18 @@ function wpmem_registration( $toggle )
*/
$fields = apply_filters( 'wpmem_register_data', $fields );
- // _data hook is before any insertion/emails
+ /**
+ * Fires before any insertion/emails.
+ *
+ * This action is the final step in pre registering a user. This
+ * can be used for attaching custom validation to the registration
+ * process. It cannot be used for changing any user registration
+ * data. Use the wpmem_register_data filter for that.
+ *
+ * @since 2.7.2
+ *
+ * @param array $fields The user's submitted registration data.
+ */
do_action( 'wpmem_pre_register_data', $fields );
// if the _pre_register_data hook sends back an error message
@@ -261,8 +266,14 @@ function wpmem_registration( $toggle )
// set user expiration, if used
if( WPMEM_USE_EXP == 1 && WPMEM_MOD_REG != 1 ) { wpmem_set_exp( $fields['ID'] ); }
-
- // _data hook after insertion but before email
+
+ /**
+ * Fires after user insertion but before email.
+ *
+ * @since 2.7.2
+ *
+ * @param array $fields The user's submitted registration data.
+ */
do_action( 'wpmem_post_register_data', $fields );
require_once( 'wp-members-email.php' );
@@ -274,7 +285,11 @@ function wpmem_registration( $toggle )
// notify admin of new reg, if needed;
if( WPMEM_NOTIFY_ADMIN == 1 ) { wpmem_notify_admin( $fields['ID'], $wpmem_fields ); }
- // add action for redirection
+ /**
+ * Fires after registration is complete.
+ *
+ * @since 2.7.1
+ */
do_action( 'wpmem_register_redirect' );
// successful registration message
@@ -308,7 +323,18 @@ function wpmem_registration( $toggle )
*/
$fields = apply_filters( 'wpmem_register_data', $fields );
- // _pre_update_data hook is before data insertion
+ /**
+ * Fires before data insertion.
+ *
+ * This action is the final step in pre updating a user. This
+ * can be used for attaching custom validation to the update
+ * process. It cannot be used for changing any user update
+ * data. Use the wpmem_register_data filter for that.
+ *
+ * @since 2.7.2
+ *
+ * @param array $fields The user's submitted update data.
+ */
do_action( 'wpmem_pre_update_data', $fields );
// if the _pre_update_data hook sends back an error message
@@ -361,7 +387,13 @@ function wpmem_registration( $toggle )
// update wp_update_user fields
wp_update_user( $native_update );
- // _post_update_data hook is after insertion
+ /**
+ * Fires at the end of user update data insertion.
+ *
+ * @since 2.7.2
+ *
+ * @param array $fields The user's submitted registration data.
+ */
do_action( 'wpmem_post_update_data', $fields );
return "editsuccess"; exit();
diff --git a/wp-members.php b/wp-members.php
index ffc8bdec..cc80c67c 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -85,7 +85,7 @@
function wpmem_init()
{
/**
- * Action for pre-initialization of plugin options.
+ * Fires before initialization of plugin options.
*
* @since 2.9.0
*/
@@ -201,7 +201,7 @@ function wpmem_init()
}
/**
- * Action at the end of initialization of plugin options.
+ * Fires after initialization of plugin options.
*
* @since 2.9.0
*/
@@ -220,7 +220,7 @@ function wpmem_init()
function wpmem_chk_admin()
{
/**
- * Action for initialization of admin options.
+ * Fires before initialization of admin options.
*
* @since 2.9.0
*/
@@ -260,7 +260,7 @@ function wpmem_chk_admin()
}
/**
- * Action at the end of admin options.
+ * Fires after initialization of admin options.
*
* @since 2.9.0
*/
From e13cb03a92ff096efa0dee6636a6142ca4d06dcc Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Fri, 20 Mar 2015 11:42:26 -0500
Subject: [PATCH 0026/1694] fix for empty user id in fields shortcode
---
wp-members-core.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wp-members-core.php b/wp-members-core.php
index ce7541cd..e356823f 100644
--- a/wp-members-core.php
+++ b/wp-members-core.php
@@ -542,7 +542,7 @@ function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' )
}
$user_info = get_userdata( $the_user_ID );
- if( $underscores == 'off' ) {
+ if( $underscores == 'off' && $user_info ) {
$user_info->$field = str_replace( '_', ' ', $user_info->$field );
}
From 11a33e75a7b1cbcf7dcc65c8addc2aa38dbcd34b Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Sat, 21 Mar 2015 17:51:52 -0500
Subject: [PATCH 0027/1694] added option and selection for a specific login
page
---
admin/tab-options.php | 664 ++++++++++++++++----------------
js/admin.js | 874 +++++++++++++++++++++---------------------
uninstall.php | 161 ++++----
wp-members.php | 673 ++++++++++++++++----------------
4 files changed, 1201 insertions(+), 1171 deletions(-)
diff --git a/admin/tab-options.php b/admin/tab-options.php
index 67e1e5db..91aa4a8e 100644
--- a/admin/tab-options.php
+++ b/admin/tab-options.php
@@ -1,324 +1,342 @@
-', '', '', '' ), 'wp-members' );
- $help_link = __( sprintf( 'See the %sUsers Guide on plugin options%s.', '', '' ), 'wp-members' );
- ?>
-
+ ';
+ }
+
+ /*
+ if we are setting registration to be moderated,
+ check to see if the current admin has been
+ activated so they don't accidentally lock themselves
+ out later
+ */
+ if( $row == 5 ) {
+ if( isset( $_POST[$post_arr[$row]] ) == 1) {
+ global $current_user;
+ get_currentuserinfo();
+ $user_ID = $current_user->ID;
+ update_user_meta( $user_ID, 'active', 1 );
+ }
+ }
+ }
+
+ $wpmem_attribution = ( isset( $_POST['attribution'] ) ) ? 1 : 0;
+ update_option( 'wpmembers_attrib', $wpmem_attribution );
+
+ $wpmem_settings_msurl = ( $_POST['wpmem_settings_mspage'] == 'use_custom' ) ? $_POST['wpmem_settings_msurl'] : '';
+ $wpmem_settings_mspage = ( $_POST['wpmem_settings_mspage'] == 'use_custom' ) ? '' : $_POST['wpmem_settings_mspage'];
+ if( $wpmem_settings_mspage ) { update_option( 'wpmembers_msurl', $wpmem_settings_mspage ); }
+ if( $wpmem_settings_msurl != wpmem_use_ssl() && $wpmem_settings_msurl != 'use_custom' && ! $wpmem_settings_mspage ) {
+ update_option( 'wpmembers_msurl', trim( $wpmem_settings_msurl ) );
+ }
+
+ $wpmem_settings_regurl = ( $_POST['wpmem_settings_regpage'] == 'use_custom' ) ? $_POST['wpmem_settings_regurl'] : '';
+ $wpmem_settings_regpage = ( $_POST['wpmem_settings_regpage'] == 'use_custom' ) ? '' : $_POST['wpmem_settings_regpage'];
+ if( $wpmem_settings_regpage ) { update_option( 'wpmembers_regurl', $wpmem_settings_regpage ); }
+ if( $wpmem_settings_regurl != wpmem_use_ssl() && $wpmem_settings_regurl != 'use_custom' && ! $wpmem_settings_regpage ) {
+ update_option( 'wpmembers_regurl', trim( $wpmem_settings_regurl ) );
+ }
+
+ $wpmem_settings_logurl = ( $_POST['wpmem_settings_logpage'] == 'use_custom' ) ? $_POST['wpmem_settings_logurl'] : '';
+ $wpmem_settings_logpage = ( $_POST['wpmem_settings_logpage'] == 'use_custom' ) ? '' : $_POST['wpmem_settings_logpage'];
+ if( $wpmem_settings_logpage ) { update_option( 'wpmembers_logurl', $wpmem_settings_logpage ); }
+ if( $wpmem_settings_logurl != wpmem_use_ssl() && $wpmem_settings_logurl != 'use_custom' && ! $wpmem_settings_logpage ) {
+ update_option( 'wpmembers_logurl', trim( $wpmem_settings_logurl ) );
+ }
+
+ $wpmem_settings_cssurl = $_POST['wpmem_settings_cssurl'];
+ if( $wpmem_settings_cssurl != wpmem_use_ssl() ) {
+ update_option( 'wpmembers_cssurl', trim( $wpmem_settings_cssurl ) );
+ }
+
+ $wpmem_settings_style = ( isset( $_POST['wpmem_settings_style'] ) ) ? $_POST['wpmem_settings_style'] : false;
+ update_option( 'wpmembers_style', $wpmem_settings_style, false );
+
+ $wpmem_autoex = array (
+ 'auto_ex' => isset( $_POST['wpmem_autoex'] ) ? $_POST['wpmem_autoex'] : 0,
+ 'auto_ex_len' => isset( $_POST['wpmem_autoex_len'] ) ? $_POST['wpmem_autoex_len'] : ''
+ );
+ update_option( 'wpmembers_autoex', $wpmem_autoex, false );
+
+ update_option( 'wpmembers_settings', $wpmem_newsettings );
+ $wpmem_settings = $wpmem_newsettings;
+
+
+ return __( 'WP-Members settings were updated', 'wp-members' );
+}
+
+
+/**
+ * Create the stylesheet dropdown selection
+ *
+ * @since 2.8
+ */
+function wpmem_admin_style_list()
+{
+ $val = get_option( 'wpmembers_style', null );
+ $list = array(
+ 'No Float' => WPMEM_DIR . 'css/generic-no-float.css',
+ 'Rigid' => WPMEM_DIR . 'css/generic-rigid.css',
+ 'Twenty Fifteen' => WPMEM_DIR . 'css/wp-members-2015.css',
+ 'Twenty Fifteen - no float' => WPMEM_DIR . 'css/wp-members-2015-no-float.css',
+ 'Twenty Fourteen' => WPMEM_DIR . 'css/wp-members-2014.css',
+ 'Twenty Fourteen - no float' => WPMEM_DIR . 'css/wp-members-2014-no-float.css',
+ 'Twenty Thirteen' => WPMEM_DIR . 'css/wp-members-2013.css',
+ 'Twenty Twelve' => WPMEM_DIR . 'css/wp-members-2012.css',
+ 'Twenty Eleven' => WPMEM_DIR . 'css/wp-members-2011.css',
+ 'Twenty Ten' => WPMEM_DIR . 'css/wp-members.css',
+ 'Kubrick' => WPMEM_DIR . 'css/wp-members-kubrick.css',
+ );
+
+ /**
+ * Filters the list of stylesheets in the plugin options dropdown.
+ *
+ * @since 2.8.0
+ *
+ * @param array $list An array of stylesheets that can be applied to the plugin's forms.
+ */
+ $list = apply_filters( 'wpmem_admin_style_list', $list );
+
+ $selected = false;
+ foreach( $list as $name => $location ) {
+ $selected = ( $location == $val ) ? true : $selected;
+ echo '\n";
+ }
+ $selected = ( ! $selected ) ? ' selected' : '';
+ echo '';
+
+ return;
+}
+
+
+/**
+ * Create a dropdown selection of pages
+ *
+ * @since 2.8.1
+ *
+ * @param string $val
+ */
+function wpmem_admin_page_list( $val, $show_custom_url = true )
+{
+ $selected = ( $val == 'http://' ) ? 'select a page' : false;
+ $pages = get_pages();
+
+ echo '';
+
+ foreach ( $pages as $page ) {
+ $selected = ( get_page_link( $page->ID ) == $val ) ? true : $selected;
+ $option = '';
+ echo $option;
+ }
+ if( $show_custom_url ) {
+ $selected = ( ! $selected ) ? ' selected' : '';
+ echo '';
+ }
+}
+
/** End of File **/
\ No newline at end of file
diff --git a/js/admin.js b/js/admin.js
index 32e434b8..0d44f3c7 100644
--- a/js/admin.js
+++ b/js/admin.js
@@ -1,432 +1,442 @@
-/**
- * WP-Members Admin JavaScript Functions
- *
- * Contains the JavaScript functions for WP-Members admin.
- *
- * This file is part of the WP-Members plugin by Chad Butler
- * You can find out more about this plugin at http://rocketgeek.com
- * Copyright (c) 2006-2015 Chad Butler
- * WP-Members(tm) is a trademark of butlerblog.com
- *
- * TableDnD plugin for jQuery :
- * Copyright (c) Denis Howlett
- * Licensed like jQuery, see http://docs.jquery.com/License.
- *
- * table.add.row plugin for jQuery :
- * Copyright (c) C.F.Wong
- * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
- *
- * @package WordPress
- * @subpackage WP-Members
- * @author Chad Butler
- * @copyright 2006-2015
- */
-
-
-/**
- * JS for field table DnD
- *
- * @since 2.6
- */
-(function($) {
- $(document).ready(function() {
-
- $("#wpmem-fields").tableDnD({
- onDragClass: "wpmem_tbl_drag",
-
- onDrop: function(table, row) {
- var data = {
- action: 'wpmem_a_field_reorder',
- orderstring: $.tableDnD.serialize()
- }
-
- $.post( ajaxurl, data, function(response) {
- // alert(response);
- })
- }
- });
- });
-})(jQuery);
-
-
-/**
- * TableDnD plug-in for JQuery, allows you to drag and drop table rows
- * You can set up various options to control how the system will work
- * Copyright (c) Denis Howlett
- * Licensed like jQuery, see http://docs.jquery.com/License.
- */
-jQuery.tableDnD = {
- /** Keep hold of the current table being dragged */
- currentTable : null,
- /** Keep hold of the current drag object if any */
- dragObject: null,
- /** The current mouse offset */
- mouseOffset: null,
- /** Remember the old value of Y so that we don't do too much processing */
- oldY: 0,
-
- /** Actually build the structure */
- build: function(options) {
- // Set up the defaults if any
-
- this.each(function() {
- // This is bound to each matching table, set up the defaults and override with user options
- this.tableDnDConfig = jQuery.extend({
- onDragStyle: null,
- onDropStyle: null,
- // Add in the default class for whileDragging
- onDragClass: "tDnD_whileDrag",
- onDrop: null,
- onDragStart: null,
- scrollAmount: 5,
- serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs
- serializeParamName: null, // If you want to specify another parameter name instead of the table ID
- dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable
- }, options || {});
- // Now make the rows draggable
- jQuery.tableDnD.makeDraggable(this);
- });
-
- // Now we need to capture the mouse up and mouse move event
- // We can use bind so that we don't interfere with other event handlers
- jQuery(document)
- .bind('mousemove', jQuery.tableDnD.mousemove)
- .bind('mouseup', jQuery.tableDnD.mouseup);
-
- // Don't break the chain
- return this;
- },
-
- /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */
- makeDraggable: function(table) {
- var config = table.tableDnDConfig;
- if (table.tableDnDConfig.dragHandle) {
- // We only need to add the event to the specified cells
- var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table);
- cells.each(function() {
- // The cell is bound to "this"
- jQuery(this).mousedown(function(ev) {
- jQuery.tableDnD.dragObject = this.parentNode;
- jQuery.tableDnD.currentTable = table;
- jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
- if (config.onDragStart) {
- // Call the onDrop method if there is one
- config.onDragStart(table, this);
- }
- return false;
- });
- })
- } else {
- // For backwards compatibility, we add the event to the whole row
- var rows = jQuery("tr", table); // get all the rows as a wrapped set
- rows.each(function() {
- // Iterate through each row, the row is bound to "this"
- var row = jQuery(this);
- if (! row.hasClass("nodrag")) {
- row.mousedown(function(ev) {
- if (ev.target.tagName == "TD") {
- jQuery.tableDnD.dragObject = this;
- jQuery.tableDnD.currentTable = table;
- jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
- if (config.onDragStart) {
- // Call the onDrop method if there is one
- config.onDragStart(table, this);
- }
- return false;
- }
- }).css("cursor", "move"); // Store the tableDnD object
- }
- });
- }
- },
-
- updateTables: function() {
- this.each(function() {
- // this is now bound to each matching table
- if (this.tableDnDConfig) {
- jQuery.tableDnD.makeDraggable(this);
- }
- })
- },
-
- /** Get the mouse coordinates from the event (allowing for browser differences) */
- mouseCoords: function(ev){
- if(ev.pageX || ev.pageY){
- return {x:ev.pageX, y:ev.pageY};
- }
- return {
- x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
- y:ev.clientY + document.body.scrollTop - document.body.clientTop
- };
- },
-
- /** Given a target element and a mouse event, get the mouse offset from that element.
- To do this we need the element's position and the mouse position */
- getMouseOffset: function(target, ev) {
- ev = ev || window.event;
-
- var docPos = this.getPosition(target);
- var mousePos = this.mouseCoords(ev);
- return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
- },
-
- /** Get the position of an element by going up the DOM tree and adding up all the offsets */
- getPosition: function(e){
- var left = 0;
- var top = 0;
- /** Safari fix -- thanks to Luis Chato for this! */
- if (e.offsetHeight == 0) {
- /** Safari 2 doesn't correctly grab the offsetTop of a table row
- this is detailed here:
- http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/
- the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
- note that firefox will return a text node as a first child, so designing a more thorough
- solution may need to take that into account, for now this seems to work in firefox, safari, ie */
- e = e.firstChild; // a table cell
- }
-
- while (e.offsetParent){
- left += e.offsetLeft;
- top += e.offsetTop;
- e = e.offsetParent;
- }
-
- left += e.offsetLeft;
- top += e.offsetTop;
-
- return {x:left, y:top};
- },
-
- mousemove: function(ev) {
- if (jQuery.tableDnD.dragObject == null) {
- return;
- }
-
- var dragObj = jQuery(jQuery.tableDnD.dragObject);
- var config = jQuery.tableDnD.currentTable.tableDnDConfig;
- var mousePos = jQuery.tableDnD.mouseCoords(ev);
- var y = mousePos.y - jQuery.tableDnD.mouseOffset.y;
- //auto scroll the window
- var yOffset = window.pageYOffset;
- if (document.all) {
- // Windows version
- //yOffset=document.body.scrollTop;
- if (typeof document.compatMode != 'undefined' &&
- document.compatMode != 'BackCompat') {
- yOffset = document.documentElement.scrollTop;
- }
- else if (typeof document.body != 'undefined') {
- yOffset=document.body.scrollTop;
- }
-
- }
-
- if (mousePos.y-yOffset < config.scrollAmount) {
- window.scrollBy(0, -config.scrollAmount);
- } else {
- var windowHeight = window.innerHeight ? window.innerHeight
- : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
- if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) {
- window.scrollBy(0, config.scrollAmount);
- }
- }
-
-
- if (y != jQuery.tableDnD.oldY) {
- // work out if we're going up or down...
- var movingDown = y > jQuery.tableDnD.oldY;
- // update the old value
- jQuery.tableDnD.oldY = y;
- // update the style to show we're dragging
- if (config.onDragClass) {
- dragObj.addClass(config.onDragClass);
- } else {
- dragObj.css(config.onDragStyle);
- }
- // If we're over a row then move the dragged row to there so that the user sees the
- // effect dynamically
- var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y);
- if (currentRow) {
- // TODO worry about what happens when there are multiple TBODIES
- if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
- jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
- } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) {
- jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
- }
- }
- }
-
- return false;
- },
-
- /** We're only worried about the y position really, because we can only move rows up and down */
- findDropTargetRow: function(draggedRow, y) {
- var rows = jQuery.tableDnD.currentTable.rows;
- for (var i=0; i rowY - rowHeight) && (y < (rowY + rowHeight))) {
- // that's the row we're over
- // If it's the same as the current row, ignore it
- if (row == draggedRow) {return null;}
- var config = jQuery.tableDnD.currentTable.tableDnDConfig;
- if (config.onAllowDrop) {
- if (config.onAllowDrop(draggedRow, row)) {
- return row;
- } else {
- return null;
- }
- } else {
- // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
- var nodrop = jQuery(row).hasClass("nodrop");
- if (! nodrop) {
- return row;
- } else {
- return null;
- }
- }
- return row;
- }
- }
- return null;
- },
-
- mouseup: function(e) {
- if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) {
- var droppedRow = jQuery.tableDnD.dragObject;
- var config = jQuery.tableDnD.currentTable.tableDnDConfig;
- // If we have a dragObject, then we need to release it,
- // The row will already have been moved to the right place so we just reset stuff
- if (config.onDragClass) {
- jQuery(droppedRow).removeClass(config.onDragClass);
- } else {
- jQuery(droppedRow).css(config.onDropStyle);
- }
- jQuery.tableDnD.dragObject = null;
- if (config.onDrop) {
- // Call the onDrop method if there is one
- config.onDrop(jQuery.tableDnD.currentTable, droppedRow);
- }
- jQuery.tableDnD.currentTable = null; // let go of the table too
- }
- },
-
- serialize: function() {
- if (jQuery.tableDnD.currentTable) {
- return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable);
- } else {
- return "Error: No Table id set, you need to set an id on your table and every row";
- }
- },
-
- serializeTable: function(table) {
- var result = "";
- var tableId = table.id;
- var rows = table.rows;
- for (var i=0; i 0) result += "&";
- var rowId = rows[i].id;
- if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) {
- rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
- }
-
- result += tableId + '[]=' + rowId;
- }
- return result;
- },
-
- serializeTables: function() {
- var result = "";
- this.each(function() {
- // this is now bound to each matching table
- result += jQuery.tableDnD.serializeTable(this);
- });
- return result;
- }
-
-}
-
-jQuery.fn.extend(
- {
- tableDnD : jQuery.tableDnD.build,
- tableDnDUpdate : jQuery.tableDnD.updateTables,
- tableDnDSerialize: jQuery.tableDnD.serializeTables
- }
-);
-
-/** END TableDnD plugin */
-
-
-/**
- * JS for displaying custom url for:
- * * Profile page
- * * Register page
- * * Custom stylesheet
- *
- * @since 2.9.6
- */
-(function($) {
- $(document).ready(function() {
- if ($("#wpmem_mspage_select").val() == 'use_custom')
- $("#wpmem_mspage_custom").show();
- else
- $("#wpmem_mspage_custom").hide();
- if ($("#wpmem_regpage_select").val() == 'use_custom')
- $("#wpmem_regpage_custom").show();
- else
- $("#wpmem_regpage_custom").hide();
- if ($("#wpmem_stylesheet_select").val() == 'use_custom')
- $("#wpmem_stylesheet_custom").show();
- else
- $("#wpmem_stylesheet_custom").hide();
- $("#wpmem_mspage_select").change(function() {
- if ($("#wpmem_mspage_select").val() == 'use_custom')
- $("#wpmem_mspage_custom").show();
- else
- $("#wpmem_mspage_custom").hide();
- });
- $("#wpmem_regpage_select").change(function() {
- if ($("#wpmem_regpage_select").val() == 'use_custom')
- $("#wpmem_regpage_custom").show();
- else
- $("#wpmem_regpage_custom").hide();
- });
- $("#wpmem_stylesheet_select").change(function() {
- if ($("#wpmem_stylesheet_select").val() == 'use_custom')
- $("#wpmem_stylesheet_custom").show();
- else
- $("#wpmem_stylesheet_custom").hide();
- });
- });
-})(jQuery);
-
-
-/**
- * JS for displaying additional info for checkbox/dropdowns
- *
- * @since 2.9.6
- */
-(function($) {
- $(document).ready(function() {
- $("#wpmem_checkbox_info").hide();
- $("#wpmem_dropdown_info").hide();
- });
- $(document).ready(function() {
- $("#wpmem_field_type_select").change(function() {
- if ($("#wpmem_field_type_select").val() == 'checkbox')
- $("#wpmem_checkbox_info").show();
- else
- $("#wpmem_checkbox_info").hide();
- if ($("#wpmem_field_type_select").val() == 'select')
- $("#wpmem_dropdown_info").show();
- else
- $("#wpmem_dropdown_info").hide();
- });
- });
-})(jQuery);
+/**
+ * WP-Members Admin JavaScript Functions
+ *
+ * Contains the JavaScript functions for WP-Members admin.
+ *
+ * This file is part of the WP-Members plugin by Chad Butler
+ * You can find out more about this plugin at http://rocketgeek.com
+ * Copyright (c) 2006-2015 Chad Butler
+ * WP-Members(tm) is a trademark of butlerblog.com
+ *
+ * TableDnD plugin for jQuery :
+ * Copyright (c) Denis Howlett
+ * Licensed like jQuery, see http://docs.jquery.com/License.
+ *
+ * table.add.row plugin for jQuery :
+ * Copyright (c) C.F.Wong
+ * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
+ *
+ * @package WordPress
+ * @subpackage WP-Members
+ * @author Chad Butler
+ * @copyright 2006-2015
+ */
+
+
+/**
+ * JS for field table DnD
+ *
+ * @since 2.6
+ */
+(function($) {
+ $(document).ready(function() {
+
+ $("#wpmem-fields").tableDnD({
+ onDragClass: "wpmem_tbl_drag",
+
+ onDrop: function(table, row) {
+ var data = {
+ action: 'wpmem_a_field_reorder',
+ orderstring: $.tableDnD.serialize()
+ }
+
+ $.post( ajaxurl, data, function(response) {
+ // alert(response);
+ })
+ }
+ });
+ });
+})(jQuery);
+
+
+/**
+ * TableDnD plug-in for JQuery, allows you to drag and drop table rows
+ * You can set up various options to control how the system will work
+ * Copyright (c) Denis Howlett
+ * Licensed like jQuery, see http://docs.jquery.com/License.
+ */
+jQuery.tableDnD = {
+ /** Keep hold of the current table being dragged */
+ currentTable : null,
+ /** Keep hold of the current drag object if any */
+ dragObject: null,
+ /** The current mouse offset */
+ mouseOffset: null,
+ /** Remember the old value of Y so that we don't do too much processing */
+ oldY: 0,
+
+ /** Actually build the structure */
+ build: function(options) {
+ // Set up the defaults if any
+
+ this.each(function() {
+ // This is bound to each matching table, set up the defaults and override with user options
+ this.tableDnDConfig = jQuery.extend({
+ onDragStyle: null,
+ onDropStyle: null,
+ // Add in the default class for whileDragging
+ onDragClass: "tDnD_whileDrag",
+ onDrop: null,
+ onDragStart: null,
+ scrollAmount: 5,
+ serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs
+ serializeParamName: null, // If you want to specify another parameter name instead of the table ID
+ dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable
+ }, options || {});
+ // Now make the rows draggable
+ jQuery.tableDnD.makeDraggable(this);
+ });
+
+ // Now we need to capture the mouse up and mouse move event
+ // We can use bind so that we don't interfere with other event handlers
+ jQuery(document)
+ .bind('mousemove', jQuery.tableDnD.mousemove)
+ .bind('mouseup', jQuery.tableDnD.mouseup);
+
+ // Don't break the chain
+ return this;
+ },
+
+ /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */
+ makeDraggable: function(table) {
+ var config = table.tableDnDConfig;
+ if (table.tableDnDConfig.dragHandle) {
+ // We only need to add the event to the specified cells
+ var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table);
+ cells.each(function() {
+ // The cell is bound to "this"
+ jQuery(this).mousedown(function(ev) {
+ jQuery.tableDnD.dragObject = this.parentNode;
+ jQuery.tableDnD.currentTable = table;
+ jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
+ if (config.onDragStart) {
+ // Call the onDrop method if there is one
+ config.onDragStart(table, this);
+ }
+ return false;
+ });
+ })
+ } else {
+ // For backwards compatibility, we add the event to the whole row
+ var rows = jQuery("tr", table); // get all the rows as a wrapped set
+ rows.each(function() {
+ // Iterate through each row, the row is bound to "this"
+ var row = jQuery(this);
+ if (! row.hasClass("nodrag")) {
+ row.mousedown(function(ev) {
+ if (ev.target.tagName == "TD") {
+ jQuery.tableDnD.dragObject = this;
+ jQuery.tableDnD.currentTable = table;
+ jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
+ if (config.onDragStart) {
+ // Call the onDrop method if there is one
+ config.onDragStart(table, this);
+ }
+ return false;
+ }
+ }).css("cursor", "move"); // Store the tableDnD object
+ }
+ });
+ }
+ },
+
+ updateTables: function() {
+ this.each(function() {
+ // this is now bound to each matching table
+ if (this.tableDnDConfig) {
+ jQuery.tableDnD.makeDraggable(this);
+ }
+ })
+ },
+
+ /** Get the mouse coordinates from the event (allowing for browser differences) */
+ mouseCoords: function(ev){
+ if(ev.pageX || ev.pageY){
+ return {x:ev.pageX, y:ev.pageY};
+ }
+ return {
+ x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
+ y:ev.clientY + document.body.scrollTop - document.body.clientTop
+ };
+ },
+
+ /** Given a target element and a mouse event, get the mouse offset from that element.
+ To do this we need the element's position and the mouse position */
+ getMouseOffset: function(target, ev) {
+ ev = ev || window.event;
+
+ var docPos = this.getPosition(target);
+ var mousePos = this.mouseCoords(ev);
+ return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
+ },
+
+ /** Get the position of an element by going up the DOM tree and adding up all the offsets */
+ getPosition: function(e){
+ var left = 0;
+ var top = 0;
+ /** Safari fix -- thanks to Luis Chato for this! */
+ if (e.offsetHeight == 0) {
+ /** Safari 2 doesn't correctly grab the offsetTop of a table row
+ this is detailed here:
+ http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/
+ the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
+ note that firefox will return a text node as a first child, so designing a more thorough
+ solution may need to take that into account, for now this seems to work in firefox, safari, ie */
+ e = e.firstChild; // a table cell
+ }
+
+ while (e.offsetParent){
+ left += e.offsetLeft;
+ top += e.offsetTop;
+ e = e.offsetParent;
+ }
+
+ left += e.offsetLeft;
+ top += e.offsetTop;
+
+ return {x:left, y:top};
+ },
+
+ mousemove: function(ev) {
+ if (jQuery.tableDnD.dragObject == null) {
+ return;
+ }
+
+ var dragObj = jQuery(jQuery.tableDnD.dragObject);
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+ var mousePos = jQuery.tableDnD.mouseCoords(ev);
+ var y = mousePos.y - jQuery.tableDnD.mouseOffset.y;
+ //auto scroll the window
+ var yOffset = window.pageYOffset;
+ if (document.all) {
+ // Windows version
+ //yOffset=document.body.scrollTop;
+ if (typeof document.compatMode != 'undefined' &&
+ document.compatMode != 'BackCompat') {
+ yOffset = document.documentElement.scrollTop;
+ }
+ else if (typeof document.body != 'undefined') {
+ yOffset=document.body.scrollTop;
+ }
+
+ }
+
+ if (mousePos.y-yOffset < config.scrollAmount) {
+ window.scrollBy(0, -config.scrollAmount);
+ } else {
+ var windowHeight = window.innerHeight ? window.innerHeight
+ : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
+ if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) {
+ window.scrollBy(0, config.scrollAmount);
+ }
+ }
+
+
+ if (y != jQuery.tableDnD.oldY) {
+ // work out if we're going up or down...
+ var movingDown = y > jQuery.tableDnD.oldY;
+ // update the old value
+ jQuery.tableDnD.oldY = y;
+ // update the style to show we're dragging
+ if (config.onDragClass) {
+ dragObj.addClass(config.onDragClass);
+ } else {
+ dragObj.css(config.onDragStyle);
+ }
+ // If we're over a row then move the dragged row to there so that the user sees the
+ // effect dynamically
+ var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y);
+ if (currentRow) {
+ // TODO worry about what happens when there are multiple TBODIES
+ if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
+ } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) {
+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
+ }
+ }
+ }
+
+ return false;
+ },
+
+ /** We're only worried about the y position really, because we can only move rows up and down */
+ findDropTargetRow: function(draggedRow, y) {
+ var rows = jQuery.tableDnD.currentTable.rows;
+ for (var i=0; i rowY - rowHeight) && (y < (rowY + rowHeight))) {
+ // that's the row we're over
+ // If it's the same as the current row, ignore it
+ if (row == draggedRow) {return null;}
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+ if (config.onAllowDrop) {
+ if (config.onAllowDrop(draggedRow, row)) {
+ return row;
+ } else {
+ return null;
+ }
+ } else {
+ // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
+ var nodrop = jQuery(row).hasClass("nodrop");
+ if (! nodrop) {
+ return row;
+ } else {
+ return null;
+ }
+ }
+ return row;
+ }
+ }
+ return null;
+ },
+
+ mouseup: function(e) {
+ if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) {
+ var droppedRow = jQuery.tableDnD.dragObject;
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+ // If we have a dragObject, then we need to release it,
+ // The row will already have been moved to the right place so we just reset stuff
+ if (config.onDragClass) {
+ jQuery(droppedRow).removeClass(config.onDragClass);
+ } else {
+ jQuery(droppedRow).css(config.onDropStyle);
+ }
+ jQuery.tableDnD.dragObject = null;
+ if (config.onDrop) {
+ // Call the onDrop method if there is one
+ config.onDrop(jQuery.tableDnD.currentTable, droppedRow);
+ }
+ jQuery.tableDnD.currentTable = null; // let go of the table too
+ }
+ },
+
+ serialize: function() {
+ if (jQuery.tableDnD.currentTable) {
+ return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable);
+ } else {
+ return "Error: No Table id set, you need to set an id on your table and every row";
+ }
+ },
+
+ serializeTable: function(table) {
+ var result = "";
+ var tableId = table.id;
+ var rows = table.rows;
+ for (var i=0; i 0) result += "&";
+ var rowId = rows[i].id;
+ if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) {
+ rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
+ }
+
+ result += tableId + '[]=' + rowId;
+ }
+ return result;
+ },
+
+ serializeTables: function() {
+ var result = "";
+ this.each(function() {
+ // this is now bound to each matching table
+ result += jQuery.tableDnD.serializeTable(this);
+ });
+ return result;
+ }
+
+}
+
+jQuery.fn.extend(
+ {
+ tableDnD : jQuery.tableDnD.build,
+ tableDnDUpdate : jQuery.tableDnD.updateTables,
+ tableDnDSerialize: jQuery.tableDnD.serializeTables
+ }
+);
+
+/** END TableDnD plugin */
+
+
+/**
+ * JS for displaying custom url for:
+ * * Profile page
+ * * Register page
+ * * Custom stylesheet
+ *
+ * @since 2.9.6
+ */
+(function($) {
+ $(document).ready(function() {
+ if ($("#wpmem_logpage_select").val() == 'use_custom')
+ $("#wpmem_logpage_custom").show();
+ else
+ $("#wpmem_logpage_custom").hide();
+ if ($("#wpmem_regpage_select").val() == 'use_custom')
+ $("#wpmem_regpage_custom").show();
+ else
+ $("#wpmem_regpage_custom").hide();
+ if ($("#wpmem_mspage_select").val() == 'use_custom')
+ $("#wpmem_mspage_custom").show();
+ else
+ $("#wpmem_mspage_custom").hide();
+ if ($("#wpmem_stylesheet_select").val() == 'use_custom')
+ $("#wpmem_stylesheet_custom").show();
+ else
+ $("#wpmem_stylesheet_custom").hide();
+ $("#wpmem_logpage_select").change(function() {
+ if ($("#wpmem_logpage_select").val() == 'use_custom')
+ $("#wpmem_logpage_custom").show();
+ else
+ $("#wpmem_logpage_custom").hide();
+ });
+ $("#wpmem_regpage_select").change(function() {
+ if ($("#wpmem_regpage_select").val() == 'use_custom')
+ $("#wpmem_regpage_custom").show();
+ else
+ $("#wpmem_regpage_custom").hide();
+ });
+ $("#wpmem_mspage_select").change(function() {
+ if ($("#wpmem_mspage_select").val() == 'use_custom')
+ $("#wpmem_mspage_custom").show();
+ else
+ $("#wpmem_mspage_custom").hide();
+ });
+ $("#wpmem_stylesheet_select").change(function() {
+ if ($("#wpmem_stylesheet_select").val() == 'use_custom')
+ $("#wpmem_stylesheet_custom").show();
+ else
+ $("#wpmem_stylesheet_custom").hide();
+ });
+ });
+})(jQuery);
+
+
+/**
+ * JS for displaying additional info for checkbox/dropdowns
+ *
+ * @since 2.9.6
+ */
+(function($) {
+ $(document).ready(function() {
+ $("#wpmem_checkbox_info").hide();
+ $("#wpmem_dropdown_info").hide();
+ });
+ $(document).ready(function() {
+ $("#wpmem_field_type_select").change(function() {
+ if ($("#wpmem_field_type_select").val() == 'checkbox')
+ $("#wpmem_checkbox_info").show();
+ else
+ $("#wpmem_checkbox_info").hide();
+ if ($("#wpmem_field_type_select").val() == 'select')
+ $("#wpmem_dropdown_info").show();
+ else
+ $("#wpmem_dropdown_info").hide();
+ });
+ });
+})(jQuery);
diff --git a/uninstall.php b/uninstall.php
index cd8c2d8b..16ae5683 100644
--- a/uninstall.php
+++ b/uninstall.php
@@ -1,81 +1,82 @@
-get_col( "SELECT blog_id FROM $wpdb->blogs" );
- $original_blog_id = get_current_blog_id();
-
- foreach ( $blog_ids as $blog_id ) {
- switch_to_blog( $blog_id );
- wpmem_uninstall_options();
- }
- switch_to_blog( $original_blog_id );
-
- } else {
- wpmem_uninstall_options();
- }
-}
-
-
-/**
- * Compartmentalizes uninstall
- *
- * @since 2.9.3
- */
-function wpmem_uninstall_options()
-{
- delete_option( 'wpmembers_settings' );
- delete_option( 'wpmembers_fields' );
- delete_option( 'wpmembers_dialogs' );
- delete_option( 'wpmembers_captcha' );
- delete_option( 'wpmembers_tos' );
- delete_option( 'wpmembers_export' );
- delete_option( 'wpmembers_msurl' );
- delete_option( 'wpmembers_regurl' );
- delete_option( 'wpmembers_cssurl' );
- delete_option( 'wpmembers_style' );
- delete_option( 'wpmembers_autoex' );
- delete_option( 'wpmembers_utfields' );
- delete_option( 'wpmembers_attrib' );
-
- delete_option( 'wpmembers_email_newreg' );
- delete_option( 'wpmembers_email_newmod' );
- delete_option( 'wpmembers_email_appmod' );
- delete_option( 'wpmembers_email_repass' );
- delete_option( 'wpmembers_email_footer' );
- delete_option( 'wpmembers_email_notify' );
- delete_option( 'wpmembers_email_wpfrom' );
- delete_option( 'wpmembers_email_wpname' );
-
- delete_option( 'widget_wpmemwidget' );
-}
-
+get_col( "SELECT blog_id FROM $wpdb->blogs" );
+ $original_blog_id = get_current_blog_id();
+
+ foreach ( $blog_ids as $blog_id ) {
+ switch_to_blog( $blog_id );
+ wpmem_uninstall_options();
+ }
+ switch_to_blog( $original_blog_id );
+
+ } else {
+ wpmem_uninstall_options();
+ }
+}
+
+
+/**
+ * Compartmentalizes uninstall
+ *
+ * @since 2.9.3
+ */
+function wpmem_uninstall_options()
+{
+ delete_option( 'wpmembers_settings' );
+ delete_option( 'wpmembers_fields' );
+ delete_option( 'wpmembers_dialogs' );
+ delete_option( 'wpmembers_captcha' );
+ delete_option( 'wpmembers_tos' );
+ delete_option( 'wpmembers_export' );
+ delete_option( 'wpmembers_msurl' );
+ delete_option( 'wpmembers_regurl' );
+ delete_option( 'wpmembers_logurl' );
+ delete_option( 'wpmembers_cssurl' );
+ delete_option( 'wpmembers_style' );
+ delete_option( 'wpmembers_autoex' );
+ delete_option( 'wpmembers_utfields' );
+ delete_option( 'wpmembers_attrib' );
+
+ delete_option( 'wpmembers_email_newreg' );
+ delete_option( 'wpmembers_email_newmod' );
+ delete_option( 'wpmembers_email_appmod' );
+ delete_option( 'wpmembers_email_repass' );
+ delete_option( 'wpmembers_email_footer' );
+ delete_option( 'wpmembers_email_notify' );
+ delete_option( 'wpmembers_email_wpfrom' );
+ delete_option( 'wpmembers_email_wpname' );
+
+ delete_option( 'widget_wpmemwidget' );
+}
+
/** End of File **/
\ No newline at end of file
diff --git a/wp-members.php b/wp-members.php
index cc80c67c..8c66c741 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -1,336 +1,337 @@
-the online Users Guide. A Quick Start Guide is also available. WP-Members(tm) is a trademark of butlerblog.com.
-Version: 2.9.9
-Author: Chad Butler
-Author URI: http://butlerblog.com/
-License: GPLv2
-*/
-
-
-/*
- Copyright (c) 2006-2015 Chad Butler
-
- The name WP-Members(tm) is a trademark of butlerblog.com
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License, version 2, as
- published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
- You may also view the license here:
- http://www.gnu.org/licenses/gpl.html
-*/
-
-
-/*
- A NOTE ABOUT LICENSE:
-
- While this plugin is freely available and open-source under the GPL2
- license, that does not mean it is "public domain." You are free to modify
- and redistribute as long as you comply with the license. Any derivative
- work MUST be GPL licensed and available as open source. You also MUST give
- proper attribution to the original author, copyright holder, and trademark
- owner. This means you cannot change two lines of code and claim copyright
- of the entire work as your own. The GPL2 license requires that if you
- modify this code, you must clearly indicate what section(s) you have
- modified and you may only claim copyright of your modifications and not
- the body of work. If you are unsure or have questions about how a
- derivative work you are developing complies with the license, copyright,
- trademark, or if you do not understand the difference between
- open source and public domain, contact the original author at:
- http://rocketgeek.com/contact/.
-
-
- INSTALLATION PROCEDURE:
-
- For complete installation and usage instructions,
- visit http://rocketgeek.com
-*/
-
-
-/** initial constants **/
-define( 'WPMEM_VERSION', '2.9.9' );
-define( 'WPMEM_DEBUG', false );
-define( 'WPMEM_DIR', plugin_dir_url ( __FILE__ ) );
-define( 'WPMEM_PATH', plugin_dir_path( __FILE__ ) );
-
-/** initialize the plugin **/
-add_action( 'after_setup_theme', 'wpmem_init', 10 );
-
-/** install the pluign **/
-register_activation_hook( __FILE__, 'wpmem_install' );
-
-
-/**
- * Initialize WP-Members.
- *
- * The initialization function contains much of what was previously just
- * loaded in the main plugin file. It has been moved into this function
- * in order to allow action hooks for loading the plugin and initializing
- * its features and options.
- *
- * @since 2.9.0
- */
-function wpmem_init()
-{
- /**
- * Fires before initialization of plugin options.
- *
- * @since 2.9.0
- */
- do_action( 'wpmem_pre_init' );
-
- /**
- * start with any potential translation
- */
- load_plugin_textdomain( 'wp-members', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
-
-
- /**
- * load options
- */
- $wpmem_settings = get_option( 'wpmembers_settings' );
-
- /**
- * Filter the options before they are loaded into constants.
- *
- * @since 2.9.0
- *
- * @param array $wpmem_settings An array of the WP-Members settings.
- */
- $wpmem_settings = apply_filters( 'wpmem_settings', $wpmem_settings );
-
- /**
- * define constants based on option settings
- */
- ( ! defined( 'WPMEM_BLOCK_POSTS' ) ) ? define( 'WPMEM_BLOCK_POSTS', $wpmem_settings[1] ) : '';
- ( ! defined( 'WPMEM_BLOCK_PAGES' ) ) ? define( 'WPMEM_BLOCK_PAGES', $wpmem_settings[2] ) : '';
- ( ! defined( 'WPMEM_SHOW_EXCERPT' ) ) ? define( 'WPMEM_SHOW_EXCERPT', $wpmem_settings[3] ) : '';
- ( ! defined( 'WPMEM_NOTIFY_ADMIN' ) ) ? define( 'WPMEM_NOTIFY_ADMIN', $wpmem_settings[4] ) : '';
- ( ! defined( 'WPMEM_MOD_REG' ) ) ? define( 'WPMEM_MOD_REG', $wpmem_settings[5] ) : '';
- ( ! defined( 'WPMEM_CAPTCHA' ) ) ? define( 'WPMEM_CAPTCHA', $wpmem_settings[6] ) : '';
- ( ! defined( 'WPMEM_NO_REG' ) ) ? define( 'WPMEM_NO_REG', $wpmem_settings[7] ) : '';
- ( ! defined( 'WPMEM_USE_EXP' ) ) ? define( 'WPMEM_USE_EXP', $wpmem_settings[9] ) : '';
- ( ! defined( 'WPMEM_USE_TRL' ) ) ? define( 'WPMEM_USE_TRL', $wpmem_settings[10] ) : '';
- ( ! defined( 'WPMEM_IGNORE_WARN' ) ) ? define( 'WPMEM_IGNORE_WARN', $wpmem_settings[11] ) : '';
-
- ( ! defined( 'WPMEM_MSURL' ) ) ? define( 'WPMEM_MSURL', get_option( 'wpmembers_msurl', null ) ) : '';
- ( ! defined( 'WPMEM_REGURL' ) ) ? define( 'WPMEM_REGURL', get_option( 'wpmembers_regurl',null ) ) : '';
-
- /**
- * define the stylesheet
- */
- $wpmem_style = get_option( 'wpmembers_style', null );
- $wpmem_style = ( $wpmem_style == 'use_custom' || ! $wpmem_style ) ? get_option( 'wpmembers_cssurl', null ) : $wpmem_style;
- define( 'WPMEM_CSSURL', $wpmem_style );
-
-
- /**
- * Filter the location and name of the pluggable file.
- *
- * @since 2.9.0
- *
- * @param string The path to wp-members-pluggable.php.
- */
- $wpmem_pluggable = apply_filters( 'wpmem_plugins_file', WP_PLUGIN_DIR . '/wp-members-pluggable.php' );
-
- /**
- * preload any custom functions, if available
- */
- if( file_exists( $wpmem_pluggable ) ) {
- include( $wpmem_pluggable );
- }
-
-
- /**
- * preload the expiration module, if available
- */
- $exp_module = ( in_array( 'wp-members-expiration/module.php', get_option( 'active_plugins' ) ) ) ? true : false;
- define( 'WPMEM_EXP_MODULE', $exp_module );
-
-
- include_once( 'wp-members-core.php' );
-
- add_action( 'init', 'wpmem' ); // runs before headers are sent
- add_action( 'widgets_init', 'widget_wpmemwidget_init' ); // initializes the widget
- add_action( 'wp_head', 'wpmem_head' ); // anything added to header
- add_action( 'admin_init', 'wpmem_chk_admin' ); // check user role to load correct dashboard
- add_action( 'admin_menu', 'wpmem_admin_options' ); // adds admin menu
- add_action( 'user_register', 'wpmem_wp_reg_finalize' ); // handles wp native registration
- add_action( 'login_enqueue_scripts', 'wpmem_wplogin_stylesheet' ); // styles the native registration
- add_filter( 'comments_template', 'wpmem_securify_comments', 20, 1 ); // securifies the comments
-
- add_filter( 'allow_password_reset', 'wpmem_no_reset' ); // no password reset for non-activated users
- add_filter( 'the_content', 'wpmem_securify', 1, 1 ); // securifies the_content
- add_filter( 'register_form', 'wpmem_wp_register_form' ); // adds fields to the default wp registration
- add_filter( 'registration_errors', 'wpmem_wp_reg_validate', 10, 3 ); // native registration validation
-
-
- /**
- * add the wp-members shortcodes
- */
- add_shortcode( 'wp-members', 'wpmem_shortcode' );
- add_shortcode( 'wpmem_field', 'wpmem_shortcode' );
- add_shortcode( 'wpmem_logged_in', 'wpmem_shortcode' );
- add_shortcode( 'wpmem_logged_out', 'wpmem_shortcode' );
- add_shortcode( 'wpmem_logout', 'wpmem_shortcode' );
-
-
- /**
- * load the stylesheet if using the new forms
- */
- add_action( 'wp_print_styles', 'wpmem_enqueue_style' );
-
-
- /**
- * if registration is moderated, check for activation (blocks backend login by non-activated users)
- */
- if( WPMEM_MOD_REG == 1 ) {
- add_filter( 'authenticate', 'wpmem_check_activated', 99, 3 );
- }
-
- /**
- * Fires after initialization of plugin options.
- *
- * @since 2.9.0
- */
- do_action( 'wpmem_after_init' );
-}
-
-
-/**
- * Scripts for admin panels.
- *
- * Determines which scripts to load and actions to use based on the
- * current users capabilities.
- *
- * @since 2.5.2
- */
-function wpmem_chk_admin()
-{
- /**
- * Fires before initialization of admin options.
- *
- * @since 2.9.0
- */
- do_action( 'wpmem_pre_admin_init' );
-
- if( is_multisite() && current_user_can( 'edit_theme_options' ) ) {
- require_once( WPMEM_PATH . 'admin/admin.php' );
- }
-
- // if user has a role that can edit users, load the admin functions
- if( current_user_can( 'edit_users' ) ) {
- require_once( 'admin/admin.php' );
- require_once( 'admin/users.php' );
- include_once( 'admin/user-profile.php' );
- } else {
- // user profile actions for non-admins
- require_once( WPMEM_PATH . 'users.php' );
- add_action( 'show_user_profile', 'wpmem_user_profile' );
- add_action( 'edit_user_profile', 'wpmem_user_profile' );
- add_action( 'profile_update', 'wpmem_profile_update' );
- }
-
- // do any admin approved plugin updates need to be processed?
- if( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'wpmem_update' ) {
- require_once( 'admin/update.php' );
- }
-
- // if user has a role that can edit posts, add the block/unblock meta boxes and custom post/page columns
- if( current_user_can( 'edit_posts' ) ) {
- include_once( 'admin/post.php' );
- add_action( 'add_meta_boxes', 'wpmem_block_meta_add' );
- add_action( 'save_post', 'wpmem_block_meta_save' );
- add_filter( 'manage_posts_columns', 'wpmem_post_columns' );
- add_action( 'manage_posts_custom_column', 'wpmem_post_columns_content', 10, 2 );
- add_filter( 'manage_pages_columns', 'wpmem_page_columns' );
- add_action( 'manage_pages_custom_column', 'wpmem_page_columns_content', 10, 2 );
- }
-
- /**
- * Fires after initialization of admin options.
- *
- * @since 2.9.0
- */
- do_action( 'wpmem_after_admin_init' );
-}
-
-
-/**
- * Adds the plugin options page and JavaScript.
- *
- * @since 2.5.2
- */
-function wpmem_admin_options() {
- if( ! is_multisite() || ( is_multisite() && current_user_can( 'edit_theme_options' ) ) ) {
- $plugin_page = add_options_page ( 'WP-Members', 'WP-Members', 'manage_options', 'wpmem-settings', 'wpmem_admin' );
- add_action( 'load-'.$plugin_page, 'wpmem_load_admin_js' ); // enqueues javascript for admin
- }
-}
-
-
-/**
- * Install the plugin options.
- *
- * @since 2.5.2
- */
-function wpmem_install() {
- require_once( 'wp-members-install.php' );
- if( is_multisite() ) {
- // if it is multisite, install options for each blog
- global $wpdb;
- $blogs = $wpdb->get_results("
- SELECT blog_id
- FROM {$wpdb->blogs}
- WHERE site_id = '{$wpdb->siteid}'
- AND spam = '0'
- AND deleted = '0'
- AND archived = '0'
- ");
- $original_blog_id = get_current_blog_id();
- foreach ( $blogs as $blog_id ) {
- switch_to_blog( $blog_id->blog_id );
- wpmem_do_install();
- }
- switch_to_blog( $original_blog_id );
- } else {
- // normal single install
- wpmem_do_install();
- }
-}
-
-
-add_action( 'wpmu_new_blog', 'wpmem_mu_new_site', 10, 6 );
-/**
- * Install default plugin options for a newly added blog in multisite.
- *
- * @since 2.9.3
- *
- * @param $blog_id
- * @param $user_id
- * @param $domain
- * @param $path
- * @param $site_id
- * @param $meta
- */
-function wpmem_mu_new_site( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
- require_once( 'wp-members-install.php' );
- switch_to_blog( $blog_id );
- wpmem_do_install();
- restore_current_blog();
-}
-
-
-/** End of File **/
+the online Users Guide. A Quick Start Guide is also available. WP-Members(tm) is a trademark of butlerblog.com.
+Version: 2.9.9
+Author: Chad Butler
+Author URI: http://butlerblog.com/
+License: GPLv2
+*/
+
+
+/*
+ Copyright (c) 2006-2015 Chad Butler
+
+ The name WP-Members(tm) is a trademark of butlerblog.com
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License, version 2, as
+ published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ You may also view the license here:
+ http://www.gnu.org/licenses/gpl.html
+*/
+
+
+/*
+ A NOTE ABOUT LICENSE:
+
+ While this plugin is freely available and open-source under the GPL2
+ license, that does not mean it is "public domain." You are free to modify
+ and redistribute as long as you comply with the license. Any derivative
+ work MUST be GPL licensed and available as open source. You also MUST give
+ proper attribution to the original author, copyright holder, and trademark
+ owner. This means you cannot change two lines of code and claim copyright
+ of the entire work as your own. The GPL2 license requires that if you
+ modify this code, you must clearly indicate what section(s) you have
+ modified and you may only claim copyright of your modifications and not
+ the body of work. If you are unsure or have questions about how a
+ derivative work you are developing complies with the license, copyright,
+ trademark, or if you do not understand the difference between
+ open source and public domain, contact the original author at:
+ http://rocketgeek.com/contact/.
+
+
+ INSTALLATION PROCEDURE:
+
+ For complete installation and usage instructions,
+ visit http://rocketgeek.com
+*/
+
+
+/** initial constants **/
+define( 'WPMEM_VERSION', '2.9.9' );
+define( 'WPMEM_DEBUG', false );
+define( 'WPMEM_DIR', plugin_dir_url ( __FILE__ ) );
+define( 'WPMEM_PATH', plugin_dir_path( __FILE__ ) );
+
+/** initialize the plugin **/
+add_action( 'after_setup_theme', 'wpmem_init', 10 );
+
+/** install the pluign **/
+register_activation_hook( __FILE__, 'wpmem_install' );
+
+
+/**
+ * Initialize WP-Members.
+ *
+ * The initialization function contains much of what was previously just
+ * loaded in the main plugin file. It has been moved into this function
+ * in order to allow action hooks for loading the plugin and initializing
+ * its features and options.
+ *
+ * @since 2.9.0
+ */
+function wpmem_init()
+{
+ /**
+ * Fires before initialization of plugin options.
+ *
+ * @since 2.9.0
+ */
+ do_action( 'wpmem_pre_init' );
+
+ /**
+ * start with any potential translation
+ */
+ load_plugin_textdomain( 'wp-members', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
+
+
+ /**
+ * load options
+ */
+ $wpmem_settings = get_option( 'wpmembers_settings' );
+
+ /**
+ * Filter the options before they are loaded into constants.
+ *
+ * @since 2.9.0
+ *
+ * @param array $wpmem_settings An array of the WP-Members settings.
+ */
+ $wpmem_settings = apply_filters( 'wpmem_settings', $wpmem_settings );
+
+ /**
+ * define constants based on option settings
+ */
+ ( ! defined( 'WPMEM_BLOCK_POSTS' ) ) ? define( 'WPMEM_BLOCK_POSTS', $wpmem_settings[1] ) : '';
+ ( ! defined( 'WPMEM_BLOCK_PAGES' ) ) ? define( 'WPMEM_BLOCK_PAGES', $wpmem_settings[2] ) : '';
+ ( ! defined( 'WPMEM_SHOW_EXCERPT' ) ) ? define( 'WPMEM_SHOW_EXCERPT', $wpmem_settings[3] ) : '';
+ ( ! defined( 'WPMEM_NOTIFY_ADMIN' ) ) ? define( 'WPMEM_NOTIFY_ADMIN', $wpmem_settings[4] ) : '';
+ ( ! defined( 'WPMEM_MOD_REG' ) ) ? define( 'WPMEM_MOD_REG', $wpmem_settings[5] ) : '';
+ ( ! defined( 'WPMEM_CAPTCHA' ) ) ? define( 'WPMEM_CAPTCHA', $wpmem_settings[6] ) : '';
+ ( ! defined( 'WPMEM_NO_REG' ) ) ? define( 'WPMEM_NO_REG', $wpmem_settings[7] ) : '';
+ ( ! defined( 'WPMEM_USE_EXP' ) ) ? define( 'WPMEM_USE_EXP', $wpmem_settings[9] ) : '';
+ ( ! defined( 'WPMEM_USE_TRL' ) ) ? define( 'WPMEM_USE_TRL', $wpmem_settings[10] ) : '';
+ ( ! defined( 'WPMEM_IGNORE_WARN' ) ) ? define( 'WPMEM_IGNORE_WARN', $wpmem_settings[11] ) : '';
+
+ ( ! defined( 'WPMEM_MSURL' ) ) ? define( 'WPMEM_MSURL', get_option( 'wpmembers_msurl', null ) ) : '';
+ ( ! defined( 'WPMEM_REGURL' ) ) ? define( 'WPMEM_REGURL', get_option( 'wpmembers_regurl',null ) ) : '';
+ ( ! defined( 'WPMEM_LOGURL' ) ) ? define( 'WPMEM_LOGURL', get_option( 'wpmembers_logurl',null ) ) : '';
+
+ /**
+ * define the stylesheet
+ */
+ $wpmem_style = get_option( 'wpmembers_style', null );
+ $wpmem_style = ( $wpmem_style == 'use_custom' || ! $wpmem_style ) ? get_option( 'wpmembers_cssurl', null ) : $wpmem_style;
+ define( 'WPMEM_CSSURL', $wpmem_style );
+
+
+ /**
+ * Filter the location and name of the pluggable file.
+ *
+ * @since 2.9.0
+ *
+ * @param string The path to wp-members-pluggable.php.
+ */
+ $wpmem_pluggable = apply_filters( 'wpmem_plugins_file', WP_PLUGIN_DIR . '/wp-members-pluggable.php' );
+
+ /**
+ * preload any custom functions, if available
+ */
+ if( file_exists( $wpmem_pluggable ) ) {
+ include( $wpmem_pluggable );
+ }
+
+
+ /**
+ * preload the expiration module, if available
+ */
+ $exp_module = ( in_array( 'wp-members-expiration/module.php', get_option( 'active_plugins' ) ) ) ? true : false;
+ define( 'WPMEM_EXP_MODULE', $exp_module );
+
+
+ include_once( 'wp-members-core.php' );
+
+ add_action( 'init', 'wpmem' ); // runs before headers are sent
+ add_action( 'widgets_init', 'widget_wpmemwidget_init' ); // initializes the widget
+ add_action( 'wp_head', 'wpmem_head' ); // anything added to header
+ add_action( 'admin_init', 'wpmem_chk_admin' ); // check user role to load correct dashboard
+ add_action( 'admin_menu', 'wpmem_admin_options' ); // adds admin menu
+ add_action( 'user_register', 'wpmem_wp_reg_finalize' ); // handles wp native registration
+ add_action( 'login_enqueue_scripts', 'wpmem_wplogin_stylesheet' ); // styles the native registration
+ add_filter( 'comments_template', 'wpmem_securify_comments', 20, 1 ); // securifies the comments
+
+ add_filter( 'allow_password_reset', 'wpmem_no_reset' ); // no password reset for non-activated users
+ add_filter( 'the_content', 'wpmem_securify', 1, 1 ); // securifies the_content
+ add_filter( 'register_form', 'wpmem_wp_register_form' ); // adds fields to the default wp registration
+ add_filter( 'registration_errors', 'wpmem_wp_reg_validate', 10, 3 ); // native registration validation
+
+
+ /**
+ * add the wp-members shortcodes
+ */
+ add_shortcode( 'wp-members', 'wpmem_shortcode' );
+ add_shortcode( 'wpmem_field', 'wpmem_shortcode' );
+ add_shortcode( 'wpmem_logged_in', 'wpmem_shortcode' );
+ add_shortcode( 'wpmem_logged_out', 'wpmem_shortcode' );
+ add_shortcode( 'wpmem_logout', 'wpmem_shortcode' );
+
+
+ /**
+ * load the stylesheet if using the new forms
+ */
+ add_action( 'wp_print_styles', 'wpmem_enqueue_style' );
+
+
+ /**
+ * if registration is moderated, check for activation (blocks backend login by non-activated users)
+ */
+ if( WPMEM_MOD_REG == 1 ) {
+ add_filter( 'authenticate', 'wpmem_check_activated', 99, 3 );
+ }
+
+ /**
+ * Fires after initialization of plugin options.
+ *
+ * @since 2.9.0
+ */
+ do_action( 'wpmem_after_init' );
+}
+
+
+/**
+ * Scripts for admin panels.
+ *
+ * Determines which scripts to load and actions to use based on the
+ * current users capabilities.
+ *
+ * @since 2.5.2
+ */
+function wpmem_chk_admin()
+{
+ /**
+ * Fires before initialization of admin options.
+ *
+ * @since 2.9.0
+ */
+ do_action( 'wpmem_pre_admin_init' );
+
+ if( is_multisite() && current_user_can( 'edit_theme_options' ) ) {
+ require_once( WPMEM_PATH . 'admin/admin.php' );
+ }
+
+ // if user has a role that can edit users, load the admin functions
+ if( current_user_can( 'edit_users' ) ) {
+ require_once( 'admin/admin.php' );
+ require_once( 'admin/users.php' );
+ include_once( 'admin/user-profile.php' );
+ } else {
+ // user profile actions for non-admins
+ require_once( WPMEM_PATH . 'users.php' );
+ add_action( 'show_user_profile', 'wpmem_user_profile' );
+ add_action( 'edit_user_profile', 'wpmem_user_profile' );
+ add_action( 'profile_update', 'wpmem_profile_update' );
+ }
+
+ // do any admin approved plugin updates need to be processed?
+ if( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'wpmem_update' ) {
+ require_once( 'admin/update.php' );
+ }
+
+ // if user has a role that can edit posts, add the block/unblock meta boxes and custom post/page columns
+ if( current_user_can( 'edit_posts' ) ) {
+ include_once( 'admin/post.php' );
+ add_action( 'add_meta_boxes', 'wpmem_block_meta_add' );
+ add_action( 'save_post', 'wpmem_block_meta_save' );
+ add_filter( 'manage_posts_columns', 'wpmem_post_columns' );
+ add_action( 'manage_posts_custom_column', 'wpmem_post_columns_content', 10, 2 );
+ add_filter( 'manage_pages_columns', 'wpmem_page_columns' );
+ add_action( 'manage_pages_custom_column', 'wpmem_page_columns_content', 10, 2 );
+ }
+
+ /**
+ * Fires after initialization of admin options.
+ *
+ * @since 2.9.0
+ */
+ do_action( 'wpmem_after_admin_init' );
+}
+
+
+/**
+ * Adds the plugin options page and JavaScript.
+ *
+ * @since 2.5.2
+ */
+function wpmem_admin_options() {
+ if( ! is_multisite() || ( is_multisite() && current_user_can( 'edit_theme_options' ) ) ) {
+ $plugin_page = add_options_page ( 'WP-Members', 'WP-Members', 'manage_options', 'wpmem-settings', 'wpmem_admin' );
+ add_action( 'load-'.$plugin_page, 'wpmem_load_admin_js' ); // enqueues javascript for admin
+ }
+}
+
+
+/**
+ * Install the plugin options.
+ *
+ * @since 2.5.2
+ */
+function wpmem_install() {
+ require_once( 'wp-members-install.php' );
+ if( is_multisite() ) {
+ // if it is multisite, install options for each blog
+ global $wpdb;
+ $blogs = $wpdb->get_results("
+ SELECT blog_id
+ FROM {$wpdb->blogs}
+ WHERE site_id = '{$wpdb->siteid}'
+ AND spam = '0'
+ AND deleted = '0'
+ AND archived = '0'
+ ");
+ $original_blog_id = get_current_blog_id();
+ foreach ( $blogs as $blog_id ) {
+ switch_to_blog( $blog_id->blog_id );
+ wpmem_do_install();
+ }
+ switch_to_blog( $original_blog_id );
+ } else {
+ // normal single install
+ wpmem_do_install();
+ }
+}
+
+
+add_action( 'wpmu_new_blog', 'wpmem_mu_new_site', 10, 6 );
+/**
+ * Install default plugin options for a newly added blog in multisite.
+ *
+ * @since 2.9.3
+ *
+ * @param $blog_id
+ * @param $user_id
+ * @param $domain
+ * @param $path
+ * @param $site_id
+ * @param $meta
+ */
+function wpmem_mu_new_site( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
+ require_once( 'wp-members-install.php' );
+ switch_to_blog( $blog_id );
+ wpmem_do_install();
+ restore_current_blog();
+}
+
+
+/** End of File **/
From 27a263ef6a866e1b85f034d55111e2461bb46e33 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Sun, 8 Mar 2015 19:00:58 +0000
Subject: [PATCH 0028/1694] completed code standards update
---
wp-members-email.php | 140 +++++++++++++++++++++++++++++--------------
1 file changed, 94 insertions(+), 46 deletions(-)
diff --git a/wp-members-email.php b/wp-members-email.php
index 1db37c98..392984d7 100644
--- a/wp-members-email.php
+++ b/wp-members-email.php
@@ -99,9 +99,9 @@ function wpmem_inc_regemail( $user_id, $password, $toggle, $wpmem_fields = null,
* @since 2.7.4
*
* @param mixed $default_header The email headers.
- * @param string $toggle Toggle to determine what email is being generated (newreg|newmod|appmod|repass|admin).
+ * @param string $arr['toggle'] Toggle to determine what email is being generated (newreg|newmod|appmod|repass|admin).
*/
- $arr['headers'] = apply_filters( 'wpmem_email_headers', $default_header, $toggle );
+ $arr['headers'] = apply_filters( 'wpmem_email_headers', $default_header, $arr['toggle'] );
/** handle backward compatibility for customizations that may call the email function directly */
if ( ! $wpmem_fields ) {
@@ -124,19 +124,16 @@ function wpmem_inc_regemail( $user_id, $password, $toggle, $wpmem_fields = null,
* @param array $field_data An array of the posted registration data.
*/
$arr = apply_filters( 'wpmem_email_filter', $arr, $wpmem_fields, $field_data );
-
- /** extract the array **/
- extract( $arr );
/**
* If emails are not disabled, continue the email process
*/
- if ( ! $disable ) {
+ if ( ! $arr['disable'] ) {
/**
* Legacy email filters applied
*/
- switch ( $toggle ) {
+ switch ( $arr['toggle'] ) {
case 'newreg':
//this is a new registration
@@ -147,7 +144,7 @@ function wpmem_inc_regemail( $user_id, $password, $toggle, $wpmem_fields = null,
*
* @param string $arr['body'] The body content of the new registration email.
*/
- $body = apply_filters( 'wpmem_email_newreg', $body );
+ $arr['body'] = apply_filters( 'wpmem_email_newreg', $arr['body'] );
break;
case 'newmod':
@@ -157,9 +154,9 @@ function wpmem_inc_regemail( $user_id, $password, $toggle, $wpmem_fields = null,
*
* @since 2.7.4
*
- * @param string $body The body content of the moderated registration email.
+ * @param string $arr['body'] The body content of the moderated registration email.
*/
- $body = apply_filters( 'wpmem_email_newmod', $body );
+ $arr['body'] = apply_filters( 'wpmem_email_newmod', $arr['body'] );
break;
case 'appmod':
@@ -169,9 +166,9 @@ function wpmem_inc_regemail( $user_id, $password, $toggle, $wpmem_fields = null,
*
* @since 2.7.4
*
- * @param string $body The body content of the reset password email.
+ * @param string $arr['body'] The body content of the reset password email.
*/
- $body = apply_filters( 'wpmem_email_appmod', $body );
+ $arr['body'] = apply_filters( 'wpmem_email_appmod', $arr['body'] );
break;
case 'repass':
@@ -181,21 +178,40 @@ function wpmem_inc_regemail( $user_id, $password, $toggle, $wpmem_fields = null,
*
* @since 2.7.4
*
- * @param string $body The body content of the approved registration email.
+ * @param string $arr['body'] The body content of the approved registration email.
*/
- $body = apply_filters( 'wpmem_email_repass', $body );
+ $arr['body'] = apply_filters( 'wpmem_email_repass', $arr['body'] );
break;
}
/** Get the email footer if needed */
- $foot = ( $add_footer ) ? get_option ( 'wpmembers_email_footer' ) : '';
+ $foot = ( $arr['add_footer'] ) ? get_option ( 'wpmembers_email_footer' ) : '';
/** if doing shortcode replacements **/
- if ( $do_shortcodes ) {
+ if ( $arr['do_shortcodes'] ) {
+
/** Setup default shortcodes */
- $shortcd = array( '[blogname]', '[username]', '[password]', '[reglink]', '[members-area]', '[exp-type]', '[exp-data]' );
- $replace = array( $blogname, $user_login, $password, $reg_link, $wpmem_msurl, $exp_type, $exp_date );
+ $shortcd = array(
+ '[blogname]',
+ '[username]',
+ '[password]',
+ '[reglink]',
+ '[members-area]',
+ '[exp-type]',
+ '[exp-data]',
+ );
+
+ /** Replacement values for default shortcodes */
+ $replace = array(
+ $arr['blogname'],
+ $arr['user_login'],
+ $password,
+ $arr['reg_link'],
+ $arr['wpmem_msurl'],
+ $arr['exp_type'],
+ $arr['exp_date'],
+ );
/** Setup custom field shortcodes */
foreach ( $wpmem_fields as $field ) {
@@ -203,17 +219,17 @@ function wpmem_inc_regemail( $user_id, $password, $toggle, $wpmem_fields = null,
$replace[] = get_user_meta( $user_id, $field[2], true );
}
- /* Get the subject, body, and footer shortcodes */
- $subj = str_replace( $shortcd, $replace, $subj );
- $body = str_replace( $shortcd, $replace, $body );
- $foot = ( $add_footer ) ? str_replace( $shortcd, $replace, $foot ) : '';
+ /* Do replacements for subject, body, and footer shortcodes */
+ $arr['subj'] = str_replace( $shortcd, $replace, $arr['subj'] );
+ $arr['body'] = str_replace( $shortcd, $replace, $arr['body'] );
+ $foot = ( $arr['add_footer'] ) ? str_replace( $shortcd, $replace, $foot ) : '';
}
/** Append footer if needed **/
- $body = ( $add_footer ) ? $body . "\r\n" . $foot : $body;
+ $arr['body'] = ( $arr['add_footer'] ) ? $arr['body'] . "\r\n" . $foot : $arr['body'];
/* Send the message */
- wp_mail( $user_email, stripslashes( $subj ), stripslashes( $body ), $headers );
+ wp_mail( $arr['user_email'], stripslashes( $arr['subj'] ), stripslashes( $arr['body'] ), $arr['headers'] );
}
@@ -237,9 +253,20 @@ function wpmem_inc_regemail( $user_id, $password, $toggle, $wpmem_fields = null,
*/
function wpmem_notify_admin( $user_id, $wpmem_fields, $field_data = null ) {
- $wp_user_fields = array( 'user_login', 'user_nicename', 'user_url', 'user_registered', 'display_name', 'first_name', 'last_name', 'nickname', 'description' );
-
- /** get the user ID */
+ /** WP default user fields **/
+ $wp_user_fields = array(
+ 'user_login',
+ 'user_nicename',
+ 'user_url',
+ 'user_registered',
+ 'display_name',
+ 'first_name',
+ 'last_name',
+ 'nickname',
+ 'description',
+ );
+
+ /** get the user data */
$user = get_userdata( $user_id );
/** get the email stored values */
@@ -259,6 +286,7 @@ function wpmem_notify_admin( $user_id, $wpmem_fields, $field_data = null ) {
$arr['add_footer'] = true;
$arr['disable'] = false;
+ /** builds an array of the user data fields */
$field_arr = array();
foreach ( $wpmem_fields as $meta ) {
if ( $meta[4] == 'y' ) {
@@ -320,34 +348,54 @@ function wpmem_notify_admin( $user_id, $wpmem_fields, $field_data = null ) {
*
* @since 2.9.8
*
- * @param array $arr An array containing email body, subject, user id, and additional settings.
- * @param array $wpmem_fields An array of the WP-Members fields.
- * @param array $field_arr An array of the posted registration data.
+ * @param array $arr An array containing email body, subject, user id, and additional settings.
+ * @param array $wpmem_fields An array of the WP-Members fields.
+ * @param array $arr['field_arr'] An array of the posted registration data.
*/
$arr = apply_filters( 'wpmem_notify_filter', $arr, $wpmem_fields, $field_data );
- /** extract the array **/
- extract( $arr );
-
/**
* If emails are not disabled, continue the email process
*/
- if ( ! $disable ) {
+ if ( ! $arr['disable'] ) {
/** split field_arr into field_str */
$field_str = '';
- foreach ( $field_arr as $key => $val ) {
+ foreach ( $arr['field_arr'] as $key => $val ) {
$field_str.= $key . ': ' . $val . "\r\n";
}
/** Get the email footer if needed */
- $foot = ( $add_footer ) ? get_option ( 'wpmembers_email_footer' ) : '';
+ $foot = ( $arr['add_footer'] ) ? get_option ( 'wpmembers_email_footer' ) : '';
/** if doing shortcode replacements **/
- if ( $do_shortcodes ) {
+ if ( $arr['do_shortcodes'] ) {
+
/** Setup default shortcodes */
- $shortcd = array( '[blogname]', '[username]', '[email]', '[reglink]', '[exp-type]', '[exp-data]', '[user-ip]', '[activate-user]', '[fields]' );
- $replace = array( $blogname, $user->user_login, $user->user_email, $reg_link, $exp_type, $exp_date, $user_ip, $act_link, $field_str );
+ $shortcd = array(
+ '[blogname]',
+ '[username]',
+ '[email]',
+ '[reglink]',
+ '[exp-type]',
+ '[exp-data]',
+ '[user-ip]',
+ '[activate-user]',
+ '[fields]',
+ );
+
+ /** Replacement values for default shortcodes */
+ $replace = array(
+ $arr['blogname'],
+ $arr['user_login'],
+ $arr['user_email'],
+ $arr['reg_link'],
+ $arr['exp_type'],
+ $arr['exp_date'],
+ $arr['user_ip'],
+ $arr['act_link'],
+ $field_str,
+ );
/** create the custom field shortcodes */
foreach ( $wpmem_fields as $field ) {
@@ -356,25 +404,25 @@ function wpmem_notify_admin( $user_id, $wpmem_fields, $field_data = null ) {
}
/** Get the subject, body, and footer shortcodes */
- $subj = str_replace( $shortcd, $replace, $subj );
- $body = str_replace( $shortcd, $replace, $body );
- $foot = ( $add_footer ) ? str_replace( $shortcd, $replace, $foot ) : '';
+ $arr['subj'] = str_replace( $shortcd, $replace, $arr['subj'] );
+ $arr['body'] = str_replace( $shortcd, $replace, $arr['body'] );
+ $foot = ( $arr['add_footer'] ) ? str_replace( $shortcd, $replace, $foot ) : '';
}
/** Append footer if needed **/
- $body = ( $add_footer ) ? $body . "\r\n" . $foot : $body;
+ $arr['body'] = ( $arr['add_footer'] ) ? $arr['body'] . "\r\n" . $foot : $arr['body'];
/**
* Filters the admin notification email.
*
* @since 2.8.2
*
- * @param string $body The admin notification email body.
+ * @param string $arr['body'] The admin notification email body.
*/
- $body = apply_filters( 'wpmem_email_notify', $body );
+ $arr['body'] = apply_filters( 'wpmem_email_notify', $arr['body'] );
/* Send the message */
- wp_mail( $admin_email, stripslashes( $subj ), stripslashes( $body ), $headers );
+ wp_mail( $admin_email, stripslashes( $arr['subj'] ), stripslashes( $arr['body'] ), $arr['headers'] );
}
}
endif;
From 846b3a4d794649a3d89692c664639033bcb2da53 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 23 Mar 2015 11:23:44 -0500
Subject: [PATCH 0029/1694] 2.9.9 rc3
---
admin/tab-options.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/admin/tab-options.php b/admin/tab-options.php
index 91aa4a8e..9eaa6e84 100644
--- a/admin/tab-options.php
+++ b/admin/tab-options.php
@@ -103,7 +103,7 @@ function wpmem_a_build_options( $wpmem_settings )
+
From be6241a3b69ad0fe0b89905290871656f5a118e4 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 24 Mar 2015 11:12:51 -0500
Subject: [PATCH 0030/1694] added readme.md
---
README.md | 308 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 308 insertions(+)
create mode 100644 README.md
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..a6666a9d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,308 @@
+# WP-Members #
+**Contributors:** cbutlerjr
+
+**Tags:** access, authentication, content, login, member, membership, password, protect, register, registration, restriction, subscriber
+
+**Requires at least:** 3.1
+
+**Tested up to:** 4.1
+
+**Stable tag:** 2.9.9
+
+**License:** GPLv2
+
+
+WP-Members™ is a free membership management framework for WordPress® that restricts content to registered users.
+
+## Description ##
+
+WP-Members™ is a membership plugin for WordPress®. Perfect for newsletters, premium content sites, and more! The plugin restricts selected WordPress® content to registered site members. WP-Members™ puts the registration process on the site front end so it is inline with your content (and thus your branded theme) instead of the native WP login page. WP-Members™ works with no modifications to your theme, but it is scalable for users that want to customize the look and feel, or want to restrict only some content. It is a great tool for sites offering premium content to subscribers, and is adaptable to a variety of applications.
+
+[vimeo https://vimeo.com/84961265]
+
+### Features: ###
+
+* Block posts, pages, both, or none by default
+* Block individual posts/pages
+* Login/Registration is inline with content rather than the WP login page
+* User registration and profile integrated into your theme
+* Sidebar login widget
+* Create custom registration and profile fields
+* Set which fields display and which are required
+* Notify admin of new user registrations
+* Hold new registrations for admin approval
+* Automatically create post excerpts
+* Show excerpt on pages/posts for better SEO
+* Optional CAPTCHA for registration
+* More than 80 action and filter hooks for extensibility
+
+By default, WordPress® allows all content to be "open" and viewable by anyone and allows the site owner to restrict specific content if desired by setting a password for the post. WP-Members™ operates with the reverse assumption. It restricts all posts by default but allows the site owner to "unblock" content as desired. WP-Members™ also offers the ability to change the default plugin settings. For those that simply want to utilize the member management features and possibly restrict some content, the default setting can easily be toggled to block or unblock pages and/or posts by default. No matter what the default setting, individual posts or pages can be set to be blocked or unblocked at the article level, overriding the default setting.
+
+The plugin installs with additional registration fields including name, address, phone, and email. Using the WP-Members™ admin panel, you can also create your own custom registration fields and delete existing ones. Changing the field order is simple with a drag-and-drop interface. All of the registration process is inline with your theme and content rather than using the WordPress® login page. This offers you a premium content site with a professional and branded look and feel. It also provides an opportunity for the user to register without leaving the page to do so - less clicks = more conversions.
+
+There are also some special pages that can be created with simple shortcodes:
+
+* A User Profile page where registered members can edit their information and change/reset their password.
+* A Registration page available for those that need a specific URL for registrations (such as email marketing or banner ad landing pages). Note: this is strictly optional as a registration form can also be included by default on blocked content pages.
+* A Login page. This is also an optional page as the login form is included by default on blocked content. But if you need a specific login page, this can be created with a simple shortcode.
+* And more!
+
+The plugin runs on a framework with over 80 action and filter hooks so you can fully customize your implementation.
+
+In addition to all of the features above, the plugin can be extended with premium add-on modules available from the support site rocketgeek.com. Members of rocketgeek.com have access to support, examples, tutorials, and code snippets that will help you extend and customize the base plugin using the plugin's framework. Some of the add-ons have their own hooks and shortcodes to further extend the plugin's extensibility. [Visit the site for more info](http://rocketgeek.com/about/site-membership-subscription/).
+
+### What the plugin does not do ###
+
+WP-Members does not automatically hide absolutely everything from view. The default install of the plugin is designed to use "teaser" content to drive users to want to register. If you want certain content or menu elements completely hidden, there are ways to do that with some customization between your theme and the plugin, but it is not automatic.
+
+
+## Installation ##
+
+WP-Members™ is designed to run "out-of-the-box" with no modifications to your WP installation necessary. Please follow the installation instructions below. __Most of the support issues that arise are a result of improper installation or simply not reading/following directions__.
+
+### Basic Install: ###
+
+The best start is to follow the instructions in the [Quick Start Guide](http://rocketgeek.com/plugins/wp-members/quick-start-guide/). There is also a complete [Users Guide available](http://rocketgeek.com/plugins/wp-members/users-guide/) that covers all of the plugin's features in depth.
+
+1. Upload the `/wp-members/` directory and its contents to the `/wp-content/plugins/` directory
+2. Activate the plugin through the 'Plugins' menu in WordPress®
+
+You are ready to begin using WP-Members™. Now follow the instructions titled "Locking down your site" below.
+
+NOTE: Please follow instructions for installation. The vast majority of people that have marked the plugin as "broken" in the plugin compatibility form simply did not read/follow installation instructions. If something is unclear, ask for assistance.
+
+### Locking down your site: ###
+
+* To begin restricting posts, you will need to be using the `` link in your posts. Content above to the "more" split will display on summary pages (home, archive, category) but the user will be required to login to view the entire post. You may also use the plugin's auto excerpt setting to create post excerpts automatically. If you do not use the "more" tag or the auto excerpt setting, full post content is going to show on archive templates.
+* To begin restricting pages, change the plugin default setting for pages to be blocked. Unlike posts, the `` link is not necessary in the blocking of pages, but __must__ be used if you have the "show excerpts" setting turned on.
+* To protect comments, we recommend setting "Users must be registered and logged in to comment" under Settings > Discussion
+* Also on the page Settings > General, we recommend making sure "Anyone can register" is unchecked. While not required, this will prevent WP's native registration from colliding with WP-Members™, especially if you are using any of the WP-Members™ additional registration fields.
+* Under Settings > Reading, we recommend that "For each article in a feed, show" is set to "Summary." WordPress® installs with full feed settings by default. If you don't change this, your feeds will show full content.
+
+
+### Additional Settings and Information ###
+
+A full Users Guide is [available here](http://rocketgeek.com/plugins/wp-members/users-guide/). The guide outlines the installation process, and also documents how to use all of the settings.
+
+### Plugin Extensibility ###
+
+WP-Members™ is designed to be an out-of-the-box usable plugin, but also have an extensible framework for maximum flexibility and customization. For this purpose, there are a number of shortcodes, filters, and actions that can be used.
+
+See [this page](http://rocketgeek.com/plugins/wp-members/users-guide/shortcodes/) for a list of shortcodes and their description.
+
+The plugin has 80 filter and action hooks. For a list of hooks and a description of their use, see [this page](http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/)
+
+The plugin's premium support site has __loads__ of tips, tricks, and sample code for you to make maximum use out of the plugin. [Get more information here](http://rocketgeek.com/about/site-membership-subscription/). Members of the premium support site also have access to premium add-on modules.
+
+
+## Frequently Asked Questions ##
+
+The FAQs are maintained at http://rocketgeek.com/plugins/wp-members/users-guide/faqs/
+
+
+## Other Notes ##
+
+### Statement regarding the name WP-Members™ ###
+
+WP-Members™ is a trademark of butlerblog.com.
+
+There are a number of commercial vendors offering products called WP-Members™ or a derivative thereof. Most of these products are neither free, nor are all of them open source. The original plugin hosted here has been publicly available since 2006 and in no way associated with any of these vendors. Tagging your support request in the wordpress.org forums attaches it to this plugin. If you are seeking support for one of these commercial products, you should seek support from the vendor. If you got it from a site other than [here](http://wordpress.org/extend/plugins/wp-members) then it isn't WP-Members™.
+
+An [official statement is available here](http://butlerblog.com/regarding-wp-members).
+
+### Regarding RocketGeek.com ###
+
+Premium priority support is available at the plugin's site [RocketGeek.com](http://rocketgeek.com). A site membership includes priority support, members-only forum access, plugin extensions, and a custom code snippet library. [RocketGeek.com](http://rocketgeek.com) is the only site officially managed for this plugin's support.
+
+
+## Upgrade Notice ##
+
+WP-Members 2.9.9 is mostly minor updates preparing codebase for the 3.0 project.
+
+## Screenshots ##
+
+###1. The default when viewing a blocked post - the plugin will deliver a login screen and registration form in place of blocked content (this default can be changed to other options).
+###
+
+
+
+###2. Admin Panel - Options Tab - the various option settings for the plugin.
+###
+
+
+
+###3. Admin Panel - Fields Tab - the plugin field manager allows you to manage (or delete) the installed extra fields and field order, and also add your own custom fields.
+###
+
+
+
+###4. Admin Panel - Dialogs Tab - the major dialogs that the plugin uses for error and other messages can be edited in the plugin's admin panel.
+###
+
+
+
+###5. Admin Panel - Emails Tab - all of the emails that are sent by the plugin can be edited in the admin panel.
+###
+
+
+
+###6. Posts > All Posts - The plugin adds a column to the list of posts and pages to display if a post or page is unblocked or blocked (the opposite of whatver you have set for the plugin's default in the options tab).
+###
+
+
+
+###7. Posts > Edit Post - The plugin adds a meta box to the post/page editor allowing you to set an individual post to be blocked or unblocked (the opposite of whatver your default setting is).
+###
+
+
+
+
+## Changelog ##
+
+### 2.9.9 ###
+* Code standards in wp-members-email.php
+* Rebuilt admin notification email to follow new regular email structure with more filters in wp-members-email.com
+* Added $toggle to headers filter that is used in both emails so that headers could be filtered based on the email being sent (i.e. sending plain text for admin notification vs html for others. in wp-members-email.php
+* Added redirect_to parameter as a widget entry in wp-members-sidebar.php
+* Corrected flaws in error checking for adding new fields in /admin/tab-fields.php
+* Added functions for updating user_status in wp_users table in /admin/users.php
+* Fixed get_user_meta 'true' error in wp-members-core.php, users.php, /admin/users.php, /admin/user-profile.php
+* Added dummy comments template to protect comments without post password.
+* Added new action for deactivting a user (opposite of wpmem_user_activated).
+* Added check to remove password, confirm_password, and confirm_email from export (data for these was already skipped, but the field space was there).
+* Added wpmem_status_msg_args and wpmem_login_links_args filters.
+* Corrected Really Simple Captcha, added field wrapper and should not display on user profile edit.
+
+### 2.9.8 ###
+* Fixed bug in settings update that caused the stored version number to be erased.
+* Fixed bug with new email function that causes the wpmem_email_newreg not to apply any filtered changes to the email body.
+* Major updates to wpmem_block logic, changing to universal _wpmem_block from two separate metas (block & unblock).
+* Fixed bug in the page bulk action that caused the result to end up on the posts page.
+* Added wpmem_use_ssl utility function.
+* Added use of wpmem_use_ssl function to reCAPTCHA to load correctly (previously handled ssl directly).
+* Added use of wpmem_use_ssl function for default input text for custom register page, user profile page, and custom stylesheet settings inputs.
+* Added new redirect_to parameter to login page shortcode.
+* Fixed checkbox for checked by default on the add new user screen.
+* Fixed "admin only" fields to display on the add new user screen.
+* Added underscores parameter to the fields shortcode to strip underscores. Defaults to off.
+* Updated excerpt logic to not show excerpts on multipage posts if not the first page.
+* Added new 2015 stylesheets (currently available, but subject to changes/updates)
+
+### 2.9.7 ###
+* Fixed comparison for the checkbox CSS class in wpmem_create_formfield.
+* Corrected wp native registration function for use on localized sites.
+* Rebuilt export function, merges the two previous functions into one (export selected and export all) and will allow for calling custom exports.
+* Rebuilt user email function.
+* Added default "from" headers to email.
+* Added new filter wpmem_export_args.
+* Added new filter wpmem_email_filter.
+* Added a redirect_to parameter to the registration form similar to the login.
+* Fixed plugin admin page load for multisite, if user has theme options edit capabilities.
+
+### 2.9.6 ###
+* Updated admin.js to show/hide custom url fields for User Profile page, Register page, and Stylesheet settings.
+* Updated options panel to show/hide custom url fields mentioned above.
+* Updated admin.js to show/hide checkbox and dropdown extra settings when adding a custom field in Fields.
+* Updated fields panel to show/hide extra fields mentioned above.
+* Updated reCAPTCHA to automatically change language if the language is (1) set as WPLANG and (2) used by reCAPTCHA.
+* Added error checking if Really Simple CAPTCHA is enabled but not installed.
+* Updated registration function for improved operation when used with popular cache plugins.
+
+### 2.9.5 ###
+
+* Added support for Really Simple CAPTCHA (Really Simple CAPTCHA must also be installed).
+* Added support for custom field meta keys as shortcodes in emails.
+* Added support for default permalinks when using wpmem_logout shortcode.
+* Improved admin notification email to skip metas defined as excluded meta.
+* Fixed activation function for activations from user profile omitting passwords (see 2.9.4 bug fix for moderated password registration).
+
+### 2.9.4 ###
+
+* Bug fix for moderated password registration (changes in 2.9.3 introduced a bug that caused moderated registration to send a blank password).
+* Bug fix for premium PayPal Subscription extension showing expired users, improved user query.
+* Fixed user profile update so that wp_update_user is called only once.
+* Added [wpmem_logged_out] shortcode to show content to logged out users. Same as [wp-members status="out"] shortcode but can be used on blocked content without changing security status.
+* Removed checkbox for adding password and confirmation fields to the User Screen since these are not stored data.
+
+### 2.9.3 ###
+
+* Fixed a backend user profile update and create new user issue introduced with some 2.9.2 code improvements. The issue caused the additional fields not to save.
+* Added a confirm password and confirm email field to the default install, as well as automatic form validation when used.
+* Updated all functions that store/read user data to skip these fields as there is not need to store them, they are simply form validation fields.
+* Improved error checking in the admin Fields tab when attempting to add an option name that already exists.
+* Added separate registration validation for multisite (refers to WP-Members front end registration only). Multisite has different username requirements and the existing error message was valid, the wording did not fit well for multisite making it confusing. The multisite validation returns the WP error message rather than a custom error message. I may be updating other validation messages in the plugin to utilize this method (while allowing them to be filtered for customization).
+* Added a separate install for multisite.
+* Updated the template for all localization files (some strings still need translation).
+
+### 2.9.2 ###
+
+* Added user ID parameter to wpmem_login_redirect filter.
+* Added new action hooks
+* Added logout shortcode
+* Added wpmem_msg_dialog_arr filter
+* Improvements to registration function
+* Admin panel updates for smaller screens
+* Added bulk block/unblock for posts and pages
+
+### 2.9.1 ###
+
+This is primarily a cleanup and fix update with a few new features.
+
+* Added WP-Members registration fields to WordPress Users > Add New screen.
+* Fixed wpmem_test_shortcode error for TOS.
+* Plugin options tab - lists notify address for notify admin setting
+* Updated default password change success message - removed need to re-login string.
+* Make dropdown values in wpmem_create_formfield function translatable strings for localization
+* Changed "logout" to "log out"
+* Update to register function to check for unset values for WP native fields.
+* Moved the path constants to be defined earlier.
+* Added $action parameter to most of the login form filters, allows more direct filtering based on form state (login, password reset, password change).
+
+### 2.9.0 ###
+
+This is a major update focusing on upgrades to the form building functions, but also includes a number of other changes and improvements.
+
+Major updates
+
+* New form building functions include new hooks and a more customizable form building process.
+* Form functions moved from wp-members-dialogs.php to new file forms.php
+* Sidebar login form also rebuilt in the same way the login and register forms were changed.
+* Legacy (old table based) forms completely removed in 2.9
+* Updates to error and dialog messages, removed unnecessary html tags
+
+Changes in wp-members-core.php
+
+* updated calling of wpmem_test_shortcode, now it works like has_shortcode, put off deprecating at this time.
+* updated shortcode to include tos page, allow for new tags (wpmem_field, wpmem_logged_in) (added new shortcode calls in wp-members.php), and accept id attribute for fields. Added $tag argument, can use shortcode_atts_{$shortcode} filter
+* moved wpmem_test_shortcode to utilities.php
+* added new action hooks: wpmem_pwd_change and wpmem_pwd_reset
+* added new filter hook: wpmem_regchk
+
+Changes in wp-members.php
+
+* a pretty major overhaul of this file. Moved all but four declarations that weren't already in functions into the init function. Only two constants are declared before the function. This initialization comes after the theme is setup, so pre-initilization needs, such as loading pluggable functions can be declared in the theme's functions.php file. Pluggable functions do not need to be loaded only from the wp-members-pluggable.php file.
+* The file name of the wp-members-pluggable.php file is loaded in a filter hook, wpmem_plugins_file, so you could call it something else or load it from another location.
+* New action hooks: wpmem_pre_init, wpmem_after_init, wpmem_pre_admin_init, wpmem_after_admin_init
+* New filter hook: wpmem_settings
+
+Miscellaneous Changes
+
+* Updates to the html for some of the admin to better fit the new WP admin layout. Old html was compatible, but the new works better.
+* Updates to the options tab to better group options
+* Updates to native (wp-login.php) registration to include require field indication
+* Review of output, localized a few missed strings
+* Implementation of changes in localization of field names. English values are now stored in the db (except for custom fields that would be whatever language the user creates the field as). Fields are then translated when displayed, rather than stored as translated strings.
+* Updated user profile to fix some issues with checkbox and required fields in users.php
+* Updated user export to include wp_users table fields user_url, user_nicename, and display_name fields
+* Code cleanup in wpmem_block function
+* Updated autoexcerpt function
+* New filter hooks for post editor meta box titles: wpmem_admin_post_meta_title, wpmem_admin_page_meta_title
+* Some updates to existing stylesheets
+* Added new stylesheets, including two with non-floated elements. Generic, non-floated stylesheet new default for fresh installs
\ No newline at end of file
From 359135b1e1a7c7e37d0ca8325e4af9a63b9fef25 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Wed, 25 Mar 2015 13:20:47 -0500
Subject: [PATCH 0031/1694] 2.9.9.1 admin email fix
---
wp-members-email.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wp-members-email.php b/wp-members-email.php
index 392984d7..e1414829 100644
--- a/wp-members-email.php
+++ b/wp-members-email.php
@@ -422,7 +422,7 @@ function wpmem_notify_admin( $user_id, $wpmem_fields, $field_data = null ) {
$arr['body'] = apply_filters( 'wpmem_email_notify', $arr['body'] );
/* Send the message */
- wp_mail( $admin_email, stripslashes( $arr['subj'] ), stripslashes( $arr['body'] ), $arr['headers'] );
+ wp_mail( $arr['admin_email'], stripslashes( $arr['subj'] ), stripslashes( $arr['body'] ), $arr['headers'] );
}
}
endif;
From 142fe3b98b627a71bba18c37867b14e4f79f24c5 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Thu, 26 Mar 2015 08:50:13 -0500
Subject: [PATCH 0032/1694] updated readme.md
---
README.md | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
index a6666a9d..8fd7b5a9 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
**Tested up to:** 4.1
-**Stable tag:** 2.9.9
+**Stable tag:** 2.9.9.1
**License:** GPLv2
@@ -18,7 +18,7 @@ WP-Members™ is a free membership management framework for WordPress® t
WP-Members™ is a membership plugin for WordPress®. Perfect for newsletters, premium content sites, and more! The plugin restricts selected WordPress® content to registered site members. WP-Members™ puts the registration process on the site front end so it is inline with your content (and thus your branded theme) instead of the native WP login page. WP-Members™ works with no modifications to your theme, but it is scalable for users that want to customize the look and feel, or want to restrict only some content. It is a great tool for sites offering premium content to subscribers, and is adaptable to a variety of applications.
-[vimeo https://vimeo.com/84961265]
+[vimeo https://youtu.be/x4MEoRLSY_U]
### Features: ###
@@ -117,48 +117,49 @@ Premium priority support is available at the plugin's site [RocketGeek.com](http
## Upgrade Notice ##
+WP-Members 2.9.9.1 patches an issue with the admin notification email update in 2.9.9.
WP-Members 2.9.9 is mostly minor updates preparing codebase for the 3.0 project.
## Screenshots ##
-###1. The default when viewing a blocked post - the plugin will deliver a login screen and registration form in place of blocked content (this default can be changed to other options).
-###
+1. The default when viewing a blocked post - the plugin will deliver a login screen and registration form in place of blocked content (this default can be changed to other options).
+

-###2. Admin Panel - Options Tab - the various option settings for the plugin.
-###
+2. Admin Panel - Options Tab - the various option settings for the plugin.
+

-###3. Admin Panel - Fields Tab - the plugin field manager allows you to manage (or delete) the installed extra fields and field order, and also add your own custom fields.
-###
+3. Admin Panel - Fields Tab - the plugin field manager allows you to manage (or delete) the installed extra fields and field order, and also add your own custom fields.
+

-###4. Admin Panel - Dialogs Tab - the major dialogs that the plugin uses for error and other messages can be edited in the plugin's admin panel.
-###
+4. Admin Panel - Dialogs Tab - the major dialogs that the plugin uses for error and other messages can be edited in the plugin's admin panel.
+

-###5. Admin Panel - Emails Tab - all of the emails that are sent by the plugin can be edited in the admin panel.
-###
+5. Admin Panel - Emails Tab - all of the emails that are sent by the plugin can be edited in the admin panel.
+

-###6. Posts > All Posts - The plugin adds a column to the list of posts and pages to display if a post or page is unblocked or blocked (the opposite of whatver you have set for the plugin's default in the options tab).
-###
+6. Posts > All Posts - The plugin adds a column to the list of posts and pages to display if a post or page is unblocked or blocked (the opposite of whatver you have set for the plugin's default in the options tab).
+

-###7. Posts > Edit Post - The plugin adds a meta box to the post/page editor allowing you to set an individual post to be blocked or unblocked (the opposite of whatver your default setting is).
-###
+7. Posts > Edit Post - The plugin adds a meta box to the post/page editor allowing you to set an individual post to be blocked or unblocked (the opposite of whatver your default setting is).
+

@@ -166,6 +167,9 @@ WP-Members 2.9.9 is mostly minor updates preparing codebase for the 3.0 project.
## Changelog ##
+### 2.9.9.1 ###
+* Patches an issue with the admin notification email update in 2.9.9.
+
### 2.9.9 ###
* Code standards in wp-members-email.php
* Rebuilt admin notification email to follow new regular email structure with more filters in wp-members-email.com
From c7e9c6fa04397b88e8450f0be9c26b39f831339e Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 6 Apr 2015 10:30:55 -0500
Subject: [PATCH 0033/1694] added wpmem_settings_loaded action hook, applied
code standards
---
wp-members.php | 100 +++++++++++++++++++++++++++----------------------
1 file changed, 55 insertions(+), 45 deletions(-)
diff --git a/wp-members.php b/wp-members.php
index d6a0d589..b64edae0 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -3,7 +3,7 @@
Plugin Name: WP-Members
Plugin URI: http://rocketgeek.com
Description: WP access restriction and user registration. For more information on plugin features, refer to the online Users Guide. A Quick Start Guide is also available. WP-Members(tm) is a trademark of butlerblog.com.
-Version: 2.9.9.1
+Version: 3.0 build 2.9.9.1 base
Author: Chad Butler
Author URI: http://butlerblog.com/
License: GPLv2
@@ -60,7 +60,7 @@
/** initial constants **/
-define( 'WPMEM_VERSION', '2.9.9.1' );
+define( 'WPMEM_VERSION', '3.0 build 2.9.9.1 base' );
define( 'WPMEM_DEBUG', false );
define( 'WPMEM_DIR', plugin_dir_url ( __FILE__ ) );
define( 'WPMEM_PATH', plugin_dir_path( __FILE__ ) );
@@ -82,8 +82,8 @@
*
* @since 2.9.0
*/
-function wpmem_init()
-{
+function wpmem_init() {
+
/**
* Fires before initialization of plugin options.
*
@@ -92,13 +92,13 @@ function wpmem_init()
do_action( 'wpmem_pre_init' );
/**
- * start with any potential translation
+ * Start with any potential translation.
*/
load_plugin_textdomain( 'wp-members', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
/**
- * load options
+ * Load options.
*/
$wpmem_settings = get_option( 'wpmembers_settings' );
@@ -112,7 +112,7 @@ function wpmem_init()
$wpmem_settings = apply_filters( 'wpmem_settings', $wpmem_settings );
/**
- * define constants based on option settings
+ * define constants based on option settings.
*/
( ! defined( 'WPMEM_BLOCK_POSTS' ) ) ? define( 'WPMEM_BLOCK_POSTS', $wpmem_settings[1] ) : '';
( ! defined( 'WPMEM_BLOCK_PAGES' ) ) ? define( 'WPMEM_BLOCK_PAGES', $wpmem_settings[2] ) : '';
@@ -130,12 +130,18 @@ function wpmem_init()
( ! defined( 'WPMEM_LOGURL' ) ) ? define( 'WPMEM_LOGURL', get_option( 'wpmembers_logurl',null ) ) : '';
/**
- * define the stylesheet
+ * Define the stylesheet.
*/
$wpmem_style = get_option( 'wpmembers_style', null );
$wpmem_style = ( $wpmem_style == 'use_custom' || ! $wpmem_style ) ? get_option( 'wpmembers_cssurl', null ) : $wpmem_style;
define( 'WPMEM_CSSURL', $wpmem_style );
-
+
+ /**
+ * Fires after main settings are loaded.
+ *
+ * @since 3.0
+ */
+ add_action( 'wpmem_settings_loaded' );
/**
* Filter the location and name of the pluggable file.
@@ -147,39 +153,45 @@ function wpmem_init()
$wpmem_pluggable = apply_filters( 'wpmem_plugins_file', WP_PLUGIN_DIR . '/wp-members-pluggable.php' );
/**
- * preload any custom functions, if available
+ * Preload any custom functions, if available.
*/
- if( file_exists( $wpmem_pluggable ) ) {
+ if ( file_exists( $wpmem_pluggable ) ) {
include( $wpmem_pluggable );
}
-
/**
- * preload the expiration module, if available
+ * Preload the expiration module, if available.
*/
$exp_module = ( in_array( 'wp-members-expiration/module.php', get_option( 'active_plugins' ) ) ) ? true : false;
define( 'WPMEM_EXP_MODULE', $exp_module );
-
+ /**
+ * Load core file.
+ */
include_once( 'wp-members-core.php' );
-
+
+ /**
+ * Add actions.
+ */
add_action( 'init', 'wpmem' ); // runs before headers are sent
add_action( 'widgets_init', 'widget_wpmemwidget_init' ); // initializes the widget
add_action( 'wp_head', 'wpmem_head' ); // anything added to header
add_action( 'admin_init', 'wpmem_chk_admin' ); // check user role to load correct dashboard
add_action( 'admin_menu', 'wpmem_admin_options' ); // adds admin menu
add_action( 'user_register', 'wpmem_wp_reg_finalize' ); // handles wp native registration
- add_action( 'login_enqueue_scripts', 'wpmem_wplogin_stylesheet' ); // styles the native registration
- add_filter( 'comments_template', 'wpmem_securify_comments', 20, 1 ); // securifies the comments
+ add_action( 'login_enqueue_scripts', 'wpmem_wplogin_stylesheet' ); // styles the native registration
+ /**
+ * Add filters.
+ */
add_filter( 'allow_password_reset', 'wpmem_no_reset' ); // no password reset for non-activated users
add_filter( 'the_content', 'wpmem_securify', 1, 1 ); // securifies the_content
add_filter( 'register_form', 'wpmem_wp_register_form' ); // adds fields to the default wp registration
add_filter( 'registration_errors', 'wpmem_wp_reg_validate', 10, 3 ); // native registration validation
-
+ add_filter( 'comments_template', 'wpmem_securify_comments', 20, 1 ); // securifies the comments
/**
- * add the wp-members shortcodes
+ * Add shortcodes.
*/
add_shortcode( 'wp-members', 'wpmem_shortcode' );
add_shortcode( 'wpmem_field', 'wpmem_shortcode' );
@@ -187,17 +199,15 @@ function wpmem_init()
add_shortcode( 'wpmem_logged_out', 'wpmem_shortcode' );
add_shortcode( 'wpmem_logout', 'wpmem_shortcode' );
-
/**
- * load the stylesheet if using the new forms
+ * Load the stylesheet if using the new forms.
*/
add_action( 'wp_print_styles', 'wpmem_enqueue_style' );
-
/**
- * if registration is moderated, check for activation (blocks backend login by non-activated users)
+ * If registration is moderated, check for activation (blocks backend login by non-activated users).
*/
- if( WPMEM_MOD_REG == 1 ) {
+ if ( WPMEM_MOD_REG == 1 ) {
add_filter( 'authenticate', 'wpmem_check_activated', 99, 3 );
}
@@ -218,8 +228,8 @@ function wpmem_init()
*
* @since 2.5.2
*/
-function wpmem_chk_admin()
-{
+function wpmem_chk_admin() {
+
/**
* Fires before initialization of admin options.
*
@@ -227,30 +237,30 @@ function wpmem_chk_admin()
*/
do_action( 'wpmem_pre_admin_init' );
- if( is_multisite() && current_user_can( 'edit_theme_options' ) ) {
+ if ( is_multisite() && current_user_can( 'edit_theme_options' ) ) {
require_once( WPMEM_PATH . 'admin/admin.php' );
}
- // if user has a role that can edit users, load the admin functions
- if( current_user_can( 'edit_users' ) ) {
+ /**
+ * If user has a role that can edit users, load the admin functions,
+ * otherwise, load profile actions for non-admins.
+ */
+ if ( current_user_can( 'edit_users' ) ) {
require_once( 'admin/admin.php' );
require_once( 'admin/users.php' );
include_once( 'admin/user-profile.php' );
} else {
- // user profile actions for non-admins
require_once( WPMEM_PATH . 'users.php' );
add_action( 'show_user_profile', 'wpmem_user_profile' );
add_action( 'edit_user_profile', 'wpmem_user_profile' );
add_action( 'profile_update', 'wpmem_profile_update' );
}
- // do any admin approved plugin updates need to be processed?
- if( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'wpmem_update' ) {
- require_once( 'admin/update.php' );
- }
-
- // if user has a role that can edit posts, add the block/unblock meta boxes and custom post/page columns
- if( current_user_can( 'edit_posts' ) ) {
+ /**
+ * If user has a role that can edit posts, add the block/unblock
+ * meta boxes and custom post/page columns.
+ */
+ if ( current_user_can( 'edit_posts' ) ) {
include_once( 'admin/post.php' );
add_action( 'add_meta_boxes', 'wpmem_block_meta_add' );
add_action( 'save_post', 'wpmem_block_meta_save' );
@@ -275,8 +285,8 @@ function wpmem_chk_admin()
* @since 2.5.2
*/
function wpmem_admin_options() {
- if( ! is_multisite() || ( is_multisite() && current_user_can( 'edit_theme_options' ) ) ) {
- $plugin_page = add_options_page ( 'WP-Members', 'WP-Members', 'manage_options', 'wpmem-settings', 'wpmem_admin' );
+ if ( ! is_multisite() || ( is_multisite() && current_user_can( 'edit_theme_options' ) ) ) {
+ $plugin_page = add_options_page ( 'WP-Members', 'WP-Members', 'manage_options', 'wpmem-settings', 'wpmem_admin' );
add_action( 'load-'.$plugin_page, 'wpmem_load_admin_js' ); // enqueues javascript for admin
}
}
@@ -289,17 +299,17 @@ function wpmem_admin_options() {
*/
function wpmem_install() {
require_once( 'wp-members-install.php' );
- if( is_multisite() ) {
+ if ( is_multisite() ) {
// if it is multisite, install options for each blog
global $wpdb;
- $blogs = $wpdb->get_results("
- SELECT blog_id
+ $blogs = $wpdb->get_results(
+ "SELECT blog_id
FROM {$wpdb->blogs}
WHERE site_id = '{$wpdb->siteid}'
AND spam = '0'
AND deleted = '0'
- AND archived = '0'
- ");
+ AND archived = '0'"
+ );
$original_blog_id = get_current_blog_id();
foreach ( $blogs as $blog_id ) {
switch_to_blog( $blog_id->blog_id );
@@ -334,4 +344,4 @@ function wpmem_mu_new_site( $blog_id, $user_id, $domain, $path, $site_id, $meta
}
-/** End of File **/
+/** End of File **/
\ No newline at end of file
From 4c4bd2efbb221f07f217f048d923a6cf27f35f04 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 6 Apr 2015 11:01:54 -0500
Subject: [PATCH 0034/1694] code standards, removed extract
---
wp-members-core.php | 310 ++++++++++++++++++++---------------------
wp-members-dialogs.php | 100 ++++++-------
2 files changed, 202 insertions(+), 208 deletions(-)
diff --git a/wp-members-core.php b/wp-members-core.php
index e356823f..93f56025 100644
--- a/wp-members-core.php
+++ b/wp-members-core.php
@@ -25,47 +25,47 @@
if ( ! function_exists( 'wpmem' ) ):
/**
- * The Main Action Function
+ * The Main Action Function.
*
* Does actions required at initialization
* prior to headers being sent.
*
* @since 0.1
*
- * @global string $wpmem_a the action variable also used in wpmem_securify
- * @global string $wpmem_regchk contains messages returned from $wpmem_a action functions, used in wpmem_securify
+ * @global string $wpmem_a The action variable also used in wpmem_securify.
+ * @global string $wpmem_regchk Contains messages returned from $wpmem_a action functions, used in wpmem_securify.
*/
-function wpmem()
-{
+function wpmem() {
+
global $wpmem_a, $wpmem_regchk;
$wpmem_a = ( isset( $_REQUEST['a'] ) ) ? trim( $_REQUEST['a'] ) : '';
- switch ($wpmem_a) {
+ switch ( $wpmem_a ) {
- case ( 'login' ):
+ case 'login':
$wpmem_regchk = wpmem_login();
break;
- case ( 'logout' ):
+ case 'logout':
wpmem_logout();
break;
- case ( 'register' ):
+ case 'register':
include_once( 'wp-members-register.php' );
$wpmem_regchk = wpmem_registration( 'register' );
break;
- case ( 'update' ):
+ case 'update':
include_once( 'wp-members-register.php' );
$wpmem_regchk = wpmem_registration( 'update' );
break;
- case ( 'pwdchange' ):
+ case 'pwdchange':
$wpmem_regchk = wpmem_change_password();
break;
- case ( 'pwdreset' ):
+ case 'pwdreset':
$wpmem_regchk = wpmem_reset_password();
break;
@@ -90,36 +90,35 @@ function wpmem()
if ( ! function_exists( 'wpmem_securify' ) ):
/**
- * The Securify Content Filter
+ * The Securify Content Filter.
*
* This is the primary function that picks up where wpmem() leaves off.
- * Determines whether content is shown or hidden for both post and
- * pages.
+ * Determines whether content is shown or hidden for both post and pages.
*
* @since 2.0
*
- * @global var $wpmem_a the action variable received from wpmem()
- * @global string $wpmem_regchk contains messages returned from wpmem() action functions
- * @global string $wpmem_themsg contains messages to be output
- * @global string $wpmem_captcha_err contains error message for reCAPTCHA
- * @global array $post needed for protecting comments
+ * @global var $wpmem_a The action variable received from wpmem().
+ * @global string $wpmem_regchk Contains messages returned from wpmem() action functions.
+ * @global string $wpmem_themsg Contains messages to be output.
+ * @global string $wpmem_captcha_err Contains error message for reCAPTCHA.
+ * @global array $post Needed for protecting comments.
* @param string $content
* @return string $content
*/
-function wpmem_securify( $content = null )
-{
+function wpmem_securify( $content = null ) {
+
$content = ( is_single() || is_page() ) ? $content : wpmem_do_excerpt( $content );
if ( ( ! wpmem_test_shortcode( $content, 'wp-members' ) ) ) {
global $wpmem_regchk, $wpmem_themsg, $wpmem_a;
- if( $wpmem_regchk == "captcha" ) {
+ if ( $wpmem_regchk == "captcha" ) {
global $wpmem_captcha_err;
$wpmem_themsg = __( 'There was an error with the CAPTCHA form.' ) . '
' . $wpmem_captcha_err;
}
// Block/unblock Posts
- if( !is_user_logged_in() && wpmem_block() == true ) {
+ if ( !is_user_logged_in() && wpmem_block() == true ) {
// protects comments if user is not logged in
global $post;
@@ -135,7 +134,7 @@ function wpmem_securify( $content = null )
include_once( WPMEM_PATH . 'wp-members-dialogs.php' );
// show the login and registration forms
- if( $wpmem_regchk ) {
+ if ( $wpmem_regchk ) {
// empty content in any of these scenarios
$content = '';
@@ -161,14 +160,14 @@ function wpmem_securify( $content = null )
// toggle shows excerpt above login/reg on posts/pages
global $wp_query;
- if( $wp_query->query_vars['page'] > 1 ) {
+ if ( $wp_query->query_vars['page'] > 1 ) {
// shuts down excerpts on multipage posts if not on first page
$content = '';
- } elseif( WPMEM_SHOW_EXCERPT == 1 ) {
+ } elseif ( WPMEM_SHOW_EXCERPT == 1 ) {
- if( ! stristr( $content, ' ' . $wpmem_captcha_err;
}
- if( $wpmem_regchk == "loginfailed" ) {
+ if ( $wpmem_regchk == "loginfailed" ) {
return wpmem_inc_loginfailed();
}
- if( ! is_user_logged_in() ) {
- if( $wpmem_a == 'register' ) {
+ if ( ! is_user_logged_in() ) {
+ if ( $wpmem_a == 'register' ) {
switch( $wpmem_regchk ) {
@@ -272,7 +272,7 @@ function wpmem_do_sc_pages( $page, $redirect_to = null )
break;
}
- } elseif( $wpmem_a == 'pwdreset' ) {
+ } elseif ( $wpmem_a == 'pwdreset' ) {
$content = wpmem_page_pwd_reset( $wpmem_regchk, $content );
@@ -282,7 +282,7 @@ function wpmem_do_sc_pages( $page, $redirect_to = null )
$content = ( $page == 'register' || WPMEM_NO_REG != 1 ) ? $content . wpmem_inc_registration() : $content;
}
- } elseif( is_user_logged_in() && $page == 'members-area' ) {
+ } elseif ( is_user_logged_in() && $page == 'members-area' ) {
/**
* Filter the default heading in User Profile edit mode.
@@ -303,7 +303,7 @@ function wpmem_do_sc_pages( $page, $redirect_to = null )
// determine if there are any errors/empty fields
- if( $wpmem_regchk == "updaterr" || $wpmem_regchk == "email" ) {
+ if ( $wpmem_regchk == "updaterr" || $wpmem_regchk == "email" ) {
$content = $content . wpmem_inc_regmessage( $wpmem_regchk, $wpmem_themsg );
$content = $content . wpmem_inc_registration( 'edit', $heading );
@@ -331,7 +331,7 @@ function wpmem_do_sc_pages( $page, $redirect_to = null )
break;
}
- } elseif( is_user_logged_in() && $page == 'register' ) {
+ } elseif ( is_user_logged_in() && $page == 'register' ) {
//return wpmem_inc_memberlinks( 'register' );
@@ -341,16 +341,16 @@ function wpmem_do_sc_pages( $page, $redirect_to = null )
}
- if( $page == 'login' ) {
+ if ( $page == 'login' ) {
$content = ( $wpmem_regchk == "loginfailed" ) ? wpmem_inc_loginfailed() : $content;
$content = ( ! is_user_logged_in() ) ? $content . wpmem_inc_login( 'login', $redirect_to ) : wpmem_inc_memberlinks( 'login' );
}
- if( $page == 'password' ) {
+ if ( $page == 'password' ) {
$content = wpmem_page_pwd_reset( $wpmem_regchk, $content );
}
- if( $page == 'user-edit' ) {
+ if ( $page == 'user-edit' ) {
$content = wpmem_page_user_edit( $wpmem_regchk, $content );
}
@@ -361,21 +361,21 @@ function wpmem_do_sc_pages( $page, $redirect_to = null )
if ( ! function_exists( 'wpmem_block' ) ):
/**
- * Determines if content should be blocked
+ * Determines if content should be blocked.
*
* @since 2.6
*
* @return bool $block
*/
-function wpmem_block()
-{
+function wpmem_block() {
+
global $post;
/**
* Backward compatibility for old block/unblock meta
*/
$meta = get_post_meta( $post->ID, '_wpmem_block', true );
- if( ! $meta ) {
+ if ( ! $meta ) {
// check for old meta
$old_block = get_post_meta( $post->ID, 'block', true );
$old_unblock = get_post_meta( $post->ID, 'unblock', true );
@@ -388,7 +388,7 @@ function wpmem_block()
'post_type' => $post->post_type,
'block' => ( ( $post->post_type == 'post' && WPMEM_BLOCK_POSTS == 1 ) || ( $post->post_type == 'page' && WPMEM_BLOCK_PAGES == 1 ) ) ? true : false,
'block_meta' => $meta, // get_post_meta( $post->ID, '_wpmem_block', true ),
- 'block_type' => ( $post->post_type == 'post' ) ? WPMEM_BLOCK_POSTS : ( ( $post->post_type == 'page' ) ? WPMEM_BLOCK_PAGES : 0 )
+ 'block_type' => ( $post->post_type == 'post' ) ? WPMEM_BLOCK_POSTS : ( ( $post->post_type == 'page' ) ? WPMEM_BLOCK_PAGES : 0 ),
);
/**
@@ -401,21 +401,21 @@ function wpmem_block()
*/
$args = apply_filters( 'wpmem_block_args', '', $defaults );
- // merge $args with defaults and extract
- extract( wp_parse_args( $args, $defaults ) );
+ // merge $args with defaults
+ $args = ( wp_parse_args( $args, $defaults ) );
- if( is_single() || is_page() ) {
- switch( $block_type ) {
+ if ( is_single() || is_page() ) {
+ switch( $args['block_type'] ) {
case 1: // if content is blocked by default
- $block = ( $block_meta == '0' ) ? false : $block;
+ $args['block'] = ( $args['block_meta'] == '0' ) ? false : $args['block'];
break;
case 0 : // if content is unblocked by default
- $block = ( $block_meta == '1' ) ? true : $block;
+ $args['block'] = ( $args['block_meta'] == '1' ) ? true : $args['block'];
break;
}
} else {
- $block = false;
+ $args['block'] = false;
}
@@ -424,21 +424,21 @@ function wpmem_block()
*
* @since 2.7.5
*
- * @param bool $block
+ * @param bool $args['block']
* @param array $args
*/
- return apply_filters( 'wpmem_block', $block, $args );
+ return apply_filters( 'wpmem_block', $args['block'], $args );
}
endif;
if ( ! function_exists( 'wpmem_shortcode' ) ):
/**
- * Executes various shortcodes
+ * Executes various shortcodes.
*
- * This function executes shortcodes for pages (settings, register, login, user-list,
+ * This function executes shortcodes for pages (settings, register, login, user-list,
* and tos pages), as well as login status and field attributes when the wp-members tag
- * is used. Also executes shortcodes for login status with the wpmem_logged_in tags
+ * is used. Also executes shortcodes for login status with the wpmem_logged_in tags
* and fields when the wpmem_field tags are used.
*
* @since 2.4
@@ -448,8 +448,8 @@ function wpmem_block()
* @param string $tag
* @return string returns the result of wpmem_do_sc_pages|wpmem_list_users|wpmem_sc_expmessage|$content
*/
-function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' )
-{
+function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' ) {
+
// set all default attributes to false
$defaults = array(
'page' => false,
@@ -459,29 +459,27 @@ function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' )
'msg' => false,
'field' => false,
'id' => false,
- 'underscores' => 'off'
+ 'underscores' => 'off',
);
- // merge defaults with $attr and extract
- extract( shortcode_atts( $defaults, $attr, $tag ) );
+ // merge defaults with $attr
+ $atts = shortcode_atts( $defaults, $attr, $tag );
// handles the 'page' attribute
- if( $page ) {
- if( $page == 'user-list' ) {
- //return ( function_exists( 'wpmem_list_users' ) ) ? do_shortcode( wpmem_list_users( $attr, $content ) ) : '';
- if( function_exists( 'wpmem_list_users' ) ) {
+ if ( $atts['page'] ) {
+ if ( $atts['page'] == 'user-list' ) {
+ if ( function_exists( 'wpmem_list_users' ) ) {
$content = do_shortcode( wpmem_list_users( $attr, $content ) );
}
- } elseif( $page == 'tos' ) {
- return $url;
+ } elseif ( $atts['page'] == 'tos' ) {
+ return $atts['url'];
} else {
- //return do_shortcode( wpmem_do_sc_pages( $page ) );
- $content = do_shortcode( wpmem_do_sc_pages( $page, $redirect_to ) );
+ $content = do_shortcode( wpmem_do_sc_pages( $atts['page'], $atts['redirect_to'] ) );
}
// resolve any texturize issues...
- if( strstr( $content, '[wpmem_txt]' ) ) {
- // fix the wptexturize
+ if ( strstr( $content, '[wpmem_txt]' ) ) {
+ // fixes the wptexturize
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_content', 'wptexturize' );
add_filter( 'the_content', 'wpmem_texturize', 99 );
@@ -490,28 +488,28 @@ function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' )
}
// handles the 'status' attribute
- if( ( $status ) || $tag == 'wpmem_logged_in' ) {
+ if ( ( $atts['status'] ) || $tag == 'wpmem_logged_in' ) {
$do_return = false;
// if using the wpmem_logged_in tag with no attributes & the user is logged in
- if( $tag == 'wpmem_logged_in' && ( ! $attr ) && is_user_logged_in() )
+ if ( $tag == 'wpmem_logged_in' && ( ! $attr ) && is_user_logged_in() )
$do_return = true;
// if there is a status attribute of "in" and the user is logged in
- if( $status == 'in' && is_user_logged_in() )
+ if ( $atts['status'] == 'in' && is_user_logged_in() )
$do_return = true;
// if there is a status attribute of "out" and the user is not logged in
- if( $status == 'out' && ! is_user_logged_in() )
+ if ( $atts['status'] == 'out' && ! is_user_logged_in() )
$do_return = true;
// if there is a status attribute of "sub" and the user is logged in
- if( $status == 'sub' && is_user_logged_in() ) {
- if( WPMEM_USE_EXP == 1 ) {
- if( ! wpmem_chk_exp() ) {
+ if ( $atts['status'] == 'sub' && is_user_logged_in() ) {
+ if ( WPMEM_USE_EXP == 1 ) {
+ if ( ! wpmem_chk_exp() ) {
$do_return = true;
- } elseif( $msg == true ) {
+ } elseif ( $atts['msg'] == true ) {
$do_return = true;
$content = wpmem_sc_expmessage();
}
@@ -523,18 +521,18 @@ function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' )
}
// handles the wpmem_logged_out tag with no attributes & the user is not logged in
- if( $tag == 'wpmem_logged_out' && ( ! $attr ) && ! is_user_logged_in() ) {
+ if ( $tag == 'wpmem_logged_out' && ( ! $attr ) && ! is_user_logged_in() ) {
return do_shortcode( $content );
}
// handles the 'field' attribute
- if( $field || $tag == 'wpmem_field' ) {
- if( $id ) {
+ if ( $atts['field'] || $tag == 'wpmem_field' ) {
+ if ( $atts['id'] ) {
// we are getting some other user
- if( $id == 'get' ) {
+ if ( $atts['id'] == 'get' ) {
$the_user_ID = ( isset( $_GET['uid'] ) ) ? $_GET['uid'] : '';
} else {
- $the_user_ID = $id;
+ $the_user_ID = $atts['id'];
}
} else {
// get the current user
@@ -542,18 +540,16 @@ function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' )
}
$user_info = get_userdata( $the_user_ID );
- if( $underscores == 'off' && $user_info ) {
- $user_info->$field = str_replace( '_', ' ', $user_info->$field );
+ if ( $atts['underscores'] == 'off' && $user_info ) {
+ $user_info->$atts['field'] = str_replace( '_', ' ', $user_info->$atts['field'] );
}
- // @todo - check this change
- return ( $user_info ) ? htmlspecialchars( $user_info->$field ) . do_shortcode( $content ) : do_shortcode( $content );
- // return ( $user_info ) ? htmlspecialchars( $user_info->$field ) . do_shortcode( $content ) : '';
+ return ( $user_info ) ? htmlspecialchars( $user_info->$atts['field'] ) . do_shortcode( $content ) : do_shortcode( $content );
}
// logout link shortcode
- if( is_user_logged_in() && $tag == 'wpmem_logout' ) {
- $link = ( $url ) ? wpmem_chk_qstr( $url ) . 'a=logout' : wpmem_chk_qstr( get_permalink() ) . 'a=logout';
+ if ( is_user_logged_in() && $tag == 'wpmem_logout' ) {
+ $link = ( $atts['url'] ) ? wpmem_chk_qstr( $atts['url'] ) . 'a=logout' : wpmem_chk_qstr( get_permalink() ) . 'a=logout';
$text = ( $content ) ? $content : __( 'Click here to log out.', 'wp-members' );
return do_shortcode( "$text" );
}
@@ -562,9 +558,9 @@ function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' )
endif;
-if( ! function_exists( 'wpmem_check_activated' ) ):
+if ( ! function_exists( 'wpmem_check_activated' ) ):
/**
- * Checks if a user is activated
+ * Checks if a user is activated.
*
* @since 2.7.1
*
@@ -574,18 +570,18 @@ function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' )
* @uses wp_check_password
* @return int $user
*/
-function wpmem_check_activated( $user, $username, $password )
-{
+function wpmem_check_activated( $user, $username, $password ) {
+
// password must be validated
$pass = ( ( ! is_wp_error( $user ) ) && $password ) ? wp_check_password( $password, $user->user_pass, $user->ID ) : false;
- if( ! $pass ) {
- return $user;
+ if ( ! $pass ) {
+ return $user;
}
// activation flag must be validated
$active = get_user_meta( $user->ID, 'active', true );
- if( $active != 1 ) {
+ if ( $active != 1 ) {
return new WP_Error( 'authentication_failed', __( 'ERROR: User has not been activated.', 'wp-members' ) );
}
@@ -595,9 +591,9 @@ function wpmem_check_activated( $user, $username, $password )
endif;
-if( ! function_exists( 'wpmem_login' ) ):
+if ( ! function_exists( 'wpmem_login' ) ):
/**
- * Logs in the user
+ * Logs in the user.
*
* Logs in the the user using wp_signon (since 2.5.2). If login is
* successful, it will set a cookie using wp_set_auth_cookie (since 2.7.7),
@@ -607,12 +603,12 @@ function wpmem_check_activated( $user, $username, $password )
*
* @uses wp_signon
* @uses wp_set_auth_cookie
- * @uses wp_redirect Redirects to $redirect_to if login is successful
- * @return string Returns "loginfailed" if the login fails
+ * @uses wp_redirect Redirects to $redirect_to if login is successful.
+ * @return string Returns "loginfailed" if the login fails.
*/
-function wpmem_login()
-{
- if( $_POST['log'] && $_POST['pwd'] ) {
+function wpmem_login() {
+
+ if ( $_POST['log'] && $_POST['pwd'] ) {
/** get username and sanitize */
$user_login = sanitize_user( $_POST['log'] );
@@ -630,7 +626,7 @@ function wpmem_login()
$user = wp_signon( $creds, false );
/** if no error, user is a valid signon. continue */
- if( ! is_wp_error( $user ) ) {
+ if ( ! is_wp_error( $user ) ) {
/** set the auth cookie */
wp_set_auth_cookie( $user->ID, $rememberme );
@@ -705,16 +701,16 @@ function wpmem_logout() {
if ( ! function_exists( 'wpmem_login_status' ) ):
/**
- * Displays the user's login status
+ * Displays the user's login status.
*
* @since 2.0
*
- * @uses wpmem_inc_memberlinks().
- * @param boolean $echo Determines whether function should print result or not (default: true).
- * @return string $status The user status string produced by wpmem_inc_memberlinks().
+ * @uses wpmem_inc_memberlinks()
+ * @param boolean $echo Determines whether function should print result or not (default: true).
+ * @return string $status The user status string produced by wpmem_inc_memberlinks().
*/
-function wpmem_login_status( $echo = true )
-{
+function wpmem_login_status( $echo = true ) {
+
include_once( 'wp-members-dialogs.php' );
if ( is_user_logged_in() ) {
$status = wpmem_inc_memberlinks( 'status' );
@@ -729,14 +725,13 @@ function wpmem_login_status( $echo = true )
if ( ! function_exists( 'wpmem_inc_sidebar' ) ):
/**
- * Displays the sidebar
+ * Displays the sidebar.
*
* @since 2.0
*
* @uses wpmem_do_sidebar()
*/
-function wpmem_inc_sidebar()
-{
+function wpmem_inc_sidebar() {
include_once('wp-members-sidebar.php');
wpmem_do_sidebar();
}
@@ -745,14 +740,13 @@ function wpmem_inc_sidebar()
if ( ! function_exists( 'widget_wpmemwidget_init' ) ):
/**
- * Initializes the widget
+ * Initializes the widget.
*
* @since 2.0
*
* @uses register_widget
*/
-function widget_wpmemwidget_init()
-{
+function widget_wpmemwidget_init() {
include_once( 'wp-members-sidebar.php' );
register_widget( 'widget_wpmemwidget' );
}
@@ -761,17 +755,17 @@ function widget_wpmemwidget_init()
if ( ! function_exists( 'wpmem_change_password' ) ):
/**
- * Handles user password change (not reset)
+ * Handles user password change (not reset).
*
* @since 2.1
*
* @global $user_ID
* @return string the value for $wpmem_regchk
*/
-function wpmem_change_password()
-{
+function wpmem_change_password() {
+
global $user_ID;
- if( isset( $_POST['formsubmit'] ) ) {
+ if ( isset( $_POST['formsubmit'] ) ) {
$pass1 = $_POST['pass1'];
$pass2 = $_POST['pass2'];
@@ -806,9 +800,9 @@ function wpmem_change_password()
endif;
-if( ! function_exists( 'wpmem_reset_password' ) ):
+if ( ! function_exists( 'wpmem_reset_password' ) ):
/**
- * Resets a forgotten password
+ * Resets a forgotten password.
*
* @since 2.1
*
@@ -816,9 +810,9 @@ function wpmem_change_password()
* @uses wp_update_user
* @return string value for $wpmem_regchk
*/
-function wpmem_reset_password()
-{
- if( isset( $_POST['formsubmit'] ) ) {
+function wpmem_reset_password() {
+
+ if ( isset( $_POST['formsubmit'] ) ) {
/**
* Filter the password reset arguments.
@@ -829,21 +823,21 @@ function wpmem_reset_password()
*/
$arr = apply_filters( 'wpmem_pwdreset_args', array(
'user' => ( isset( $_POST['user'] ) ) ? $_POST['user'] : '',
- 'email' => ( isset( $_POST['email'] ) ) ? $_POST['email'] : ''
+ 'email' => ( isset( $_POST['email'] ) ) ? $_POST['email'] : '',
) );
- if( ! $arr['user'] || ! $arr['email'] ) {
+ if ( ! $arr['user'] || ! $arr['email'] ) {
// there was an empty field
return "pwdreseterr";
} else {
- if( username_exists( $arr['user'] ) ) {
+ if ( username_exists( $arr['user'] ) ) {
$user = get_user_by( 'login', $arr['user'] );
- if( strtolower( $user->user_email ) !== strtolower( $arr['email'] ) || ( ( WPMEM_MOD_REG == 1 ) && ( get_user_meta( $user->ID,'active', true ) != 1 ) ) ) {
+ if ( strtolower( $user->user_email ) !== strtolower( $arr['email'] ) || ( ( WPMEM_MOD_REG == 1 ) && ( get_user_meta( $user->ID,'active', true ) != 1 ) ) ) {
// the username was there, but the email did not match OR the user hasn't been activated
return "pwdreseterr";
@@ -882,7 +876,7 @@ function wpmem_reset_password()
endif;
-if( ! function_exists( 'wpmem_no_reset' ) ):
+if ( ! function_exists( 'wpmem_no_reset' ) ):
/**
* Keeps users not activated from resetting their password
* via wp-login when using registration moderation.
@@ -893,15 +887,15 @@ function wpmem_reset_password()
*/
function wpmem_no_reset() {
- if( strpos( $_POST['user_login'], '@' ) ) {
+ if ( strpos( $_POST['user_login'], '@' ) ) {
$user = get_user_by( 'email', trim( $_POST['user_login'] ) );
} else {
$username = trim( $_POST['user_login'] );
$user = get_user_by( 'login', $username );
}
- if( WPMEM_MOD_REG == 1 ) {
- if( get_user_meta( $user->ID, 'active', true ) != 1 ) {
+ if ( WPMEM_MOD_REG == 1 ) {
+ if ( get_user_meta( $user->ID, 'active', true ) != 1 ) {
return false;
}
}
@@ -912,7 +906,7 @@ function wpmem_no_reset() {
/**
- * Anything that gets added to the the
+ * Anything that gets added to the the .
*
* @since 2.2
*/
@@ -922,7 +916,7 @@ function wpmem_head() {
/**
- * Add registration fields to the native WP registration
+ * Add registration fields to the native WP registration.
*
* @since 2.8.3
*/
@@ -933,7 +927,7 @@ function wpmem_wp_register_form() {
/**
- * Validates registration fields in the native WP registration
+ * Validates registration fields in the native WP registration.
*
* @since 2.8.3
*
@@ -942,21 +936,21 @@ function wpmem_wp_register_form() {
* @param $user_email
* @return $errors
*/
-function wpmem_wp_reg_validate( $errors, $sanitized_user_login, $user_email )
-{
+function wpmem_wp_reg_validate( $errors, $sanitized_user_login, $user_email ) {
+
$wpmem_fields = get_option( 'wpmembers_fields' );
$exclude = wpmem_get_excluded_meta( 'register' );
- foreach( $wpmem_fields as $field ) {
+ foreach ( $wpmem_fields as $field ) {
$is_error = false;
- if( $field[5] == 'y' && $field[2] != 'user_email' && ! in_array( $field[2], $exclude ) ) {
- if( ( $field[3] == 'checkbox' ) && ( ! isset( $_POST[$field[2]] ) ) ) {
+ if ( $field[5] == 'y' && $field[2] != 'user_email' && ! in_array( $field[2], $exclude ) ) {
+ if ( ( $field[3] == 'checkbox' ) && ( ! isset( $_POST[$field[2]] ) ) ) {
$is_error = true;
}
- if( ( $field[3] != 'checkbox' ) && ( ! $_POST[$field[2]] ) ) {
+ if ( ( $field[3] != 'checkbox' ) && ( ! $_POST[$field[2]] ) ) {
$is_error = true;
}
- if( $is_error ) { $errors->add( 'wpmem_error', sprintf( __('Sorry, %s is a required field.', 'wp-members'), $field[1] ) ); }
+ if ( $is_error ) { $errors->add( 'wpmem_error', sprintf( __('Sorry, %s is a required field.', 'wp-members'), $field[1] ) ); }
}
}
@@ -965,22 +959,22 @@ function wpmem_wp_reg_validate( $errors, $sanitized_user_login, $user_email )
/**
- * Inserts registration data from the native WP registration
+ * Inserts registration data from the native WP registration.
*
* @since 2.8.3
*
* @param $user_id
*/
-function wpmem_wp_reg_finalize( $user_id )
-{
+function wpmem_wp_reg_finalize( $user_id ) {
+
$native_reg = ( isset( $_POST['wp-submit'] ) && $_POST['wp-submit'] == esc_attr( __( 'Register' ) ) ) ? true : false;
$add_new = ( isset( $_POST['action'] ) && $_POST['action'] == 'createuser' ) ? true : false;
- if( $native_reg || $add_new ) {
+ if ( $native_reg || $add_new ) {
// get the fields
$wpmem_fields = get_option( 'wpmembers_fields' );
// get any excluded meta fields
$exclude = wpmem_get_excluded_meta( 'register' );
- foreach( $wpmem_fields as $meta ) {
+ foreach ( $wpmem_fields as $meta ) {
if ( isset( $_POST[$meta[2]] ) && ! in_array( $meta[2], $exclude ) ) {
update_user_meta( $user_id, $meta[2], sanitize_text_field( $_POST[$meta[2]] ) );
}
@@ -991,7 +985,7 @@ function wpmem_wp_reg_finalize( $user_id )
/**
- * Loads the stylesheet for backend registration
+ * Loads the stylesheet for backend registration.
*
* @since 2.8.7
*/
diff --git a/wp-members-dialogs.php b/wp-members-dialogs.php
index 5ff3bbc2..cd7352ae 100644
--- a/wp-members-dialogs.php
+++ b/wp-members-dialogs.php
@@ -17,23 +17,23 @@
/**
- * include the form building functions
+ * Include the form building functions.
*/
include_once( 'forms.php' );
if ( ! function_exists( 'wpmem_inc_loginfailed' ) ):
/**
- * Login Failed Dialog
+ * Login Failed Dialog.
*
* Returns the login failed error message.
*
* @since 1.8
*
- * @return string $str the generated html for the login failed message
+ * @return string $str the generated html for the login failed message.
*/
-function wpmem_inc_loginfailed()
-{
+function wpmem_inc_loginfailed() {
+
// defaults
$defaults = array(
'div_before' => '
',
@@ -44,7 +44,7 @@ function wpmem_inc_loginfailed()
'p_before' => '
',
'message' => __( 'You entered an invalid username or password.', 'wp-members' ),
'p_after' => '
',
- 'link' => '' . __( 'Click here to continue.', 'wp-members' ) . ''
+ 'link' => '' . __( 'Click here to continue.', 'wp-members' ) . '',
);
/**
@@ -56,14 +56,14 @@ function wpmem_inc_loginfailed()
*/
$args = apply_filters( 'wpmem_login_failed_args', '' );
- // merge $args with defaults and extract
- extract( wp_parse_args( $args, $defaults ) );
+ // merge $args with defaults
+ $args = wp_parse_args( $args, $defaults );
- $str = $div_before
- . $heading_before . $heading . $heading_after
- . $p_before . $message . $p_after
- . $p_before . $link . $p_after
- . $div_after;
+ $str = $args['div_before']
+ . $args['heading_before'] . $args['heading'] . $args['heading_after']
+ . $args['p_before'] . $args['message'] . $args['p_after']
+ . $args['p_before'] . $args['link'] . $args['p_after']
+ . $args['div_after'];
/**
* Filter the login failed dialog.
@@ -81,34 +81,34 @@ function wpmem_inc_loginfailed()
if ( ! function_exists( 'wpmem_inc_regmessage' ) ):
/**
- * Message Dialog
+ * Message Dialog.
*
* Returns various dialogs and error messages.
*
* @since 1.8
*
- * @param string $toggle error message toggle to look for specific error messages
- * @param string $msg a message that has no toggle that is passed directly to the function
- * @return string $str The final HTML for the message
+ * @param string $toggle Error message toggle to look for specific error messages.
+ * @param string $msg A message that has no toggle that is passed directly to the function.
+ * @return string $str The final HTML for the message.
*/
-function wpmem_inc_regmessage( $toggle, $msg = '' )
-{
+function wpmem_inc_regmessage( $toggle, $msg = '' ) {
+
// defaults
$defaults = array(
'div_before' => '
';
+ foreach ( $links as $link ) {
+ echo $link;
+ }
+ echo '';
}
/**
- * Handles the various update actions for the default tabs
+ * Handles the various update actions for the default tabs.
*
* @since 2.8
*
- * @param string $action The action that is being done
+ * @param string $action The action that is being done.
*/
-function wpmem_admin_action( $action )
-{
+function wpmem_admin_action( $action ) {
+
$did_update = ''; // makes sure $did_update is defined
- switch( $action ) {
+ switch ( $action ) {
- case( 'update_settings' ):
+ case 'update_settings':
include_once( 'tab-options.php' );
- $did_update = wpmem_update_options();
+ $did_update = wpmem_update_options();
break;
- case( 'update_fields' ):
- case( 'add_field' ):
- case( 'edit_field' ):
+ case 'update_fields':
+ case 'add_field':
+ case 'edit_field':
include_once( 'tab-fields.php' );
$did_update = wpmem_update_fields( $action );
break;
- case( 'update_dialogs' ):
+ case 'update_dialogs':
include_once( 'tab-dialogs.php' );
$did_update = wpmem_update_dialogs();
break;
- case( 'update_emails' ):
+ case 'update_emails':
include_once( 'tab-emails.php' );
$did_update = wpmem_update_emails();
break;
- case( 'update_captcha' ):
+ case 'update_captcha':
include_once( 'tab-captcha.php' );
$did_update = wpmem_update_captcha();
break;
@@ -269,12 +266,11 @@ function wpmem_admin_action( $action )
/**
- * Adds WP-Members custom fields to the WP Add New User form
+ * Adds WP-Members custom fields to the WP Add New User form.
*
* @since 2.9.1
*/
-function wpmem_admin_add_new_user()
-{
+function wpmem_admin_add_new_user() {
include_once( WPMEM_PATH . '/native-registration.php' );
echo wpmem_do_wp_newuser_form();
return;
diff --git a/admin/dialogs.php b/admin/dialogs.php
index 8eb28510..14a37a9b 100644
--- a/admin/dialogs.php
+++ b/admin/dialogs.php
@@ -51,36 +51,32 @@ function wpmem_a_do_warnings( $did_update, $wpmem_settings )
/**
* Warning messages
*/
+
+ // are warnings turned off?
+ $warnings_off = ( $wpmem_settings['warnings'] == 0 ) ? true : false;
// settings allow anyone to register
- if( get_option( 'users_can_register' ) != 0 && $wpmem_settings[11] == 0 ) {
+ if( get_option( 'users_can_register' ) != 0 && $warnings_off ) {
wpmem_a_warning_msg(1);
}
// settings allow anyone to comment
- if( get_option( 'comment_registration' ) !=1 && $wpmem_settings[11] == 0 ) {
+ if( get_option( 'comment_registration' ) !=1 && $warnings_off ) {
wpmem_a_warning_msg(2);
}
// rss set to full text feeds
- if( get_option( 'rss_use_excerpt' ) !=1 && $wpmem_settings[11] == 0 ) {
+ if( get_option( 'rss_use_excerpt' ) !=1 && $warnings_off ) {
wpmem_a_warning_msg(3);
}
// holding registrations but haven't changed default successful registration message
- if( $wpmem_settings[11] == 0 && $wpmem_settings[5] == 1 && $wpmem_dialogs[3] == 'Congratulations! Your registration was successful.
You may now login using the password that was emailed to you.' ) {
+ if( $warnings_off && $wpmem_settings['mod_reg'] == 1 && $wpmem_dialogs[3] == 'Congratulations! Your registration was successful.
You may now login using the password that was emailed to you.' ) {
wpmem_a_warning_msg(4);
- }
-
- // turned off registration but also have set to moderate and/or email new registrations
- if( $wpmem_settings[11] == 0 && $wpmem_settings[7] == 1 ) {
- if( $wpmem_settings[5] == 1 || $wpmem_settings[4] ==1 ) {
- wpmem_a_warning_msg(5);
- }
- }
+ }
// haven't entered recaptcha api keys
- if( $wpmem_settings[11] == 0 && $wpmem_settings[6] == 1 ) {
+ if( $warnings_off && $wpmem_settings['captcha'] == 1 ) {
$wpmem_captcha = get_option('wpmembers_captcha');
if( !$wpmem_captcha['recaptcha']['public'] || !$wpmem_captcha['recaptcha']['private'] ) {
wpmem_a_warning_msg(6);
diff --git a/admin/tab-emails.php b/admin/tab-emails.php
index 88b96ac9..0b76b375 100644
--- a/admin/tab-emails.php
+++ b/admin/tab-emails.php
@@ -25,7 +25,7 @@
*/
function wpmem_a_build_emails( $wpmem_settings )
{
- if( $wpmem_settings[5] == 0 ) {
+ if( $wpmem_settings['mod_reg'] == 0 ) {
$wpmem_email_title_arr = array(
array( __( "New Registration", 'wp-members' ), 'wpmembers_email_newreg' )
);
@@ -39,7 +39,7 @@ function wpmem_a_build_emails( $wpmem_settings )
$wpmem_email_title_arr,
array( __( "Password Reset", 'wp-members' ), 'wpmembers_email_repass' )
);
- if( $wpmem_settings[4] == 1 ) {
+ if( $wpmem_settings['notify'] == 1 ) {
array_push(
$wpmem_email_title_arr,
array( __( "Admin Notification", 'wp-members' ), 'wpmembers_email_notify' )
diff --git a/admin/tab-options.php b/admin/tab-options.php
index 9eaa6e84..f762e133 100644
--- a/admin/tab-options.php
+++ b/admin/tab-options.php
@@ -1,6 +1,6 @@
', '', '', '' ), 'wp-members' );
$help_link = __( sprintf( 'See the %sUsers Guide on plugin options%s.', '', '' ), 'wp-members' );
@@ -49,56 +49,97 @@ function wpmem_a_build_options( $wpmem_settings )
You may now login using the password that was emailed to you.' ) {
+ if ( $warnings_off && $wpmem->mod_reg == 1 && $wpmem_dialogs[3] == 'Congratulations! Your registration was successful.
You may now login using the password that was emailed to you.' ) {
wpmem_a_warning_msg(4);
- }
-
+ }
+
// haven't entered recaptcha api keys
- if( $warnings_off && $wpmem_settings['captcha'] == 1 ) {
+ if ( $warnings_off && $wpmem->captcha == 1 ) {
$wpmem_captcha = get_option('wpmembers_captcha');
- if( !$wpmem_captcha['recaptcha']['public'] || !$wpmem_captcha['recaptcha']['private'] ) {
+ if ( !$wpmem_captcha['recaptcha']['public'] || !$wpmem_captcha['recaptcha']['private'] ) {
wpmem_a_warning_msg(6);
}
}
-
+
}
/**
- * Assembles the various admin warning messages
+ * Assembles the various admin warning messages.
*
* @since 2.4.0
*
- * @param int $msg The number for which message should be displayed
+ * @param int $msg The number for which message should be displayed.
*/
-function wpmem_a_warning_msg( $msg )
-{
+function wpmem_a_warning_msg( $msg ) {
+
$strong_msg = $remain_msg = $span_msg = '';
- switch( $msg ) {
-
- case 1:
+ switch ( $msg ) {
+ case 1:
$strong_msg = __( 'Your WP settings allow anyone to register - this is not the recommended setting.', 'wp-members' );
$remain_msg = sprintf( __( 'You can %s change this here %s making sure the box next to "Anyone can register" is unchecked.', 'wp-members'), '', '' );
$span_msg = __( 'This setting allows a link on the /wp-login.php page to register using the WP native registration process thus circumventing any registration you are using with WP-Members. In some cases, this may suit the users wants/needs, but most users should uncheck this option. If you do not change this setting, you can choose to ignore these warning messages under WP-Members Settings.', 'wp-members' );
-
break;
-
- case 2:
+ case 2:
$strong_msg = __( 'Your WP settings allow anyone to comment - this is not the recommended setting.', 'wp-members' );
$remain_msg = sprintf( __( 'You can %s change this here %s by checking the box next to "Users must be registered and logged in to comment."', 'wp-members' ), '', '' );
$span_msg = __( 'This setting allows any users to comment, whether or not they are registered. Depending on how you are using WP-Members will determine whether you should change this setting or not. If you do not change this setting, you can choose to ignore these warning messages under WP-Members Settings.', 'wp-members' );
+ break;
- break;
-
- case 3:
-
+ case 3:
$strong_msg = __( 'Your WP settings allow full text rss feeds - this is not the recommended setting.', 'wp-members' );
$remain_msg = sprintf( __( 'You can %s change this here %s by changing "For each article in a feed, show" to "Summary."', 'wp-members' ), '' , '' );
$span_msg = __( 'Leaving this set to full text allows anyone to read your protected content in an RSS reader. Changing this to Summary prevents this as your feeds will only show summary text.', 'wp-members' );
-
break;
-
- case 4:
-
+
+ case 4:
$strong_msg = __( 'You have set WP-Members to hold registrations for approval', 'wp-members' );
$remain_msg = __( 'but you have not changed the default message for "Registration Completed" under "WP-Members Dialogs and Error Messages." You should change this message to let users know they are pending approval.', 'wp-members' );
-
break;
- case 5:
-
+ case 5:
$strong_msg = __( 'You have set WP-Members to turn off the registration process', 'wp-members' );
- $remain_msg = __( 'but you also set to moderate and/or email admin new registrations. You will need to set up a registration page for users to register.', 'wp-members' );
-
+ $remain_msg = __( 'but you also set to moderate and/or email admin new registrations. You will need to set up a registration page for users to register.', 'wp-members' );
break;
-
+
case 6:
-
$strong_msg = __( 'You have turned on reCAPTCHA', 'wp-members');
$remain_msg = __( 'but you have not entered API keys. You will need both a public and private key. The CAPTCHA will not display unless a valid API key is included.', 'wp-members' );
-
break;
}
-
- if ( $span_msg ) { $span_msg = ' [why is this?]'; }
+
+ if ( $span_msg ) {
+ $span_msg = ' [why is this?]';
+ }
echo '
';
}
/**
- * Assemble the side meta box
+ * Assemble the side meta box.
*
* @since 2.8
*/
-function wpmem_a_meta_box()
-{
+function wpmem_a_meta_box() {
+
?>
WP-Members Information
@@ -171,7 +161,7 @@ function wpmem_a_meta_box()
Find out how to get access to WP-Members private members forum, premium code snippets, tutorials, and add-on modules!
-
+
™!
Chad Butler
@@ -185,53 +175,53 @@ function wpmem_a_meta_box()
/**
- * Assemble the rocketgeek.com rss feed box
+ * Assemble the rocketgeek.com rss feed box.
*
* @since 2.8.0
*/
-function wpmem_a_rss_box()
-{
+function wpmem_a_rss_box() {
+
?>
'http://rocketgeek.com/feed/', //put your feed URL here
- 'title' => __( 'Latest from RocketGeek', 'wp-members' ),
- 'items' => 4, //how many posts to show
+ wp_widget_rss_output( array(
+ 'url' => 'http://rocketgeek.com/feed/', //put your feed URL here
+ 'title' => __( 'Latest from RocketGeek', 'wp-members' ),
+ 'items' => 4, //how many posts to show
'show_summary' => 0,
- 'show_author' => 0,
- 'show_date' => 0
- ));?>
+ 'show_author' => 0,
+ 'show_date' => 0,
+ ) );?>
';
-
+ // if the row is set to display, add the row to the form array
+ $rows[$field[2]] = array(
+ 'type' => $field[3],
+ 'row_before' => $row_before,
+ 'label' => $label,
+ 'field' => $input,
+ 'row_after' => $row_after,
+ );
}
-
- // if the row is set to display, add the row to the form array
- $rows[$field[2]] = array(
- 'type' => $field[3],
- 'row_before' => $row_before,
- 'label' => $label,
- 'field' => $input,
- 'row_after' => $row_after,
- );
}
- }
-
- /**
- * Filter the native registration form rows.
- *
- * @since 2.9.3.
- *
- * @param array $rows The custom rows added to the form.
- */
- $rows = apply_filters( 'wpmem_native_form_rows', $rows );
-
- foreach ( $rows as $row_item ) {
- if ( $row_item['type'] == 'checkbox' ) {
- echo $row_item['row_before'] . $row_item['field'] . $row_item['label'] . $row_item['row_after'];
- } else {
- echo $row_item['row_before'] . $row_item['label'] . $row_item['field'] . $row_item['row_after'];
+
+ if ( isset( $rows ) && is_array( $rows ) ) {
+
+ /**
+ * Filter the native registration form rows.
+ *
+ * @since 2.9.3.
+ *
+ * @param array $rows The custom rows added to the form.
+ */
+ $rows = apply_filters( 'wpmem_native_form_rows', $rows );
+
+ foreach ( $rows as $row_item ) {
+ if ( $row_item['type'] == 'checkbox' ) {
+ echo $row_item['row_before'] . $row_item['field'] . $row_item['label'] . $row_item['row_after'];
+ } else {
+ echo $row_item['row_before'] . $row_item['label'] . $row_item['field'] . $row_item['row_after'];
+ }
+ }
}
}
-
}
From 87dc1d0961e01ec0d0bf8fc23fd477c4f1529f7f Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 28 Sep 2015 13:11:44 -0500
Subject: [PATCH 0157/1694] rolling back sortable custom user columns for 3.0.5
---
...class-wp-members-sortable-user-columns.php | 51 +++++++++++++------
admin/users.php | 7 +--
2 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/admin/includes/class-wp-members-sortable-user-columns.php b/admin/includes/class-wp-members-sortable-user-columns.php
index 78b5ce6e..57cb433a 100644
--- a/admin/includes/class-wp-members-sortable-user-columns.php
+++ b/admin/includes/class-wp-members-sortable-user-columns.php
@@ -3,7 +3,7 @@
/**
* WP-Members Sortable Columns Class.
*
- * @since 3.1
+ * @since 3.0
*/
if( ! class_exists( 'WP_Members_Sortable_User_Columns' ) ):
@@ -33,22 +33,24 @@ class WP_Members_Sortable_User_Columns
/**
* Initial contruct function.
*
- * @since 3.1
+ * @since 3.0
*
* @param array $args
*/
function __construct( $args ) {
$this->args = $args;
- add_action( 'pre_user_query', array(&$this, 'query' ) );
- add_action( 'manage_users_custom_column', array( &$this, 'content' ), 10, 3 );
- add_filter( 'manage_users_columns', array( &$this, 'columns' ) );
- add_filter( 'manage_users_sortable_columns', array( &$this, 'sortable') );
+ //add_action( 'pre_user_query', array(&$this, 'query' ) );
+ add_action( 'manage_users_custom_column', array( &$this, 'column_content' ), 10, 3 );
+ add_filter( 'manage_users_columns', array( &$this, 'add_to_columns' ) );
+ add_filter( 'manage_users_sortable_columns', array( &$this, 'make_column_sortable') );
+
+ add_filter( 'request', array( &$this, 'custom_column_orderby' ) );
}
/**
* Prequery function.
*
- * @since 3.1
+ * @since 3.0
*
* @param string $query
*/
@@ -66,13 +68,13 @@ function query( $query ) {
}
/**
- * Columns function.
+ * Adds selected WP-Members columns to the Users > All Users columns.
*
- * @since 3.1
+ * @since 3.0
*
* @param array $columns
*/
- function columns( $columns ) { echo 'you are here';
+ function add_to_columns( $columns ) {
foreach ( $this->args as $key => $value ) {
$columns[ $key ] = $value;
}
@@ -80,13 +82,13 @@ function columns( $columns ) { echo 'you are here';
}
/**
- * Column sorting function.
+ * Sets selected WP-Members columns as sortable.
*
- * @since 3.1
+ * @since 3.0
*
* @param array $columns
*/
- function sortable( $columns ) {
+ function make_column_sortable( $columns ) {
$custom = array();
foreach ( $this->args as $key => $value ) {
$custom[ $key ] = $key;
@@ -95,15 +97,15 @@ function sortable( $columns ) {
}
/**
- * Column content function.
+ * Returns the column content value for WP-Members selected columns.
*
- * @since 3.1
+ * @since 3.0
*
* @param string $value
* @param string $column_name
* @param int $user_id
*/
- function content( $value, $column_name, $user_id ) {
+ function column_content( $value, $column_name, $user_id ) {
foreach ( $this->args as $key => $val ) {
if ( $column_name == $key ) {
$user = get_userdata( $user_id );
@@ -112,5 +114,22 @@ function content( $value, $column_name, $user_id ) {
}
return $value;
}
+
+ /**
+ * Sort custom column.
+ *
+ * @since 3.0.5
+ */
+ function custom_column_orderby( $vars ) {
+ foreach ( $this->args as $key => $val ) {
+ if ( isset( $vars[ $key ] ) && $val == $vars[ $key ] ) {
+ $vars = array_merge( $vars, array(
+ 'meta_key' => $key,
+ 'orderby' => $key,
+ ) );
+ }
+ }
+ return $vars;
+ }
}
endif;
\ No newline at end of file
diff --git a/admin/users.php b/admin/users.php
index a15081e4..75818647 100644
--- a/admin/users.php
+++ b/admin/users.php
@@ -298,10 +298,11 @@ function wpmem_add_user_column( $columns ) {
$columns = array_merge( $columns, $wpmem_user_columns );
}
-
+
// Makes WP-Members columns sortable.
- require_once( WPMEM_PATH . 'admin/includes/class-wp-members-sortable-user-columns.php' );
- new WP_Members_Sortable_User_Columns( $wpmem_user_columns );
+ // @todo - finish debugging class or add sortable functions to users.php.
+ // require_once( WPMEM_PATH . 'admin/includes/class-wp-members-sortable-user-columns.php' );
+ // new WP_Members_Sortable_User_Columns( $wpmem_user_columns );
return $columns;
}
From 8d7e0b16d6ba8c94ff5a708e2dc7171c44eaac34 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 28 Sep 2015 14:55:01 -0500
Subject: [PATCH 0158/1694] updated readme for 3.0.5 release
---
readme.txt | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/readme.txt b/readme.txt
index a65af97a..9876bcdb 100644
--- a/readme.txt
+++ b/readme.txt
@@ -2,8 +2,8 @@
Contributors: cbutlerjr
Tags: access, authentication, content, login, member, membership, password, protect, register, registration, restriction, subscriber
Requires at least: 3.1
-Tested up to: 4.3
-Stable tag: 3.0.4
+Tested up to: 4.3.1
+Stable tag: 3.0.5
License: GPLv2
WP-Members™ is a free membership management framework for WordPress® that restricts content to registered users.
@@ -111,7 +111,7 @@ Premium priority support is available at the plugin's site [RocketGeek.com](http
== Upgrade Notice ==
-WP-Members 3.0.4 is a functional improvement release. See the change log for details.
+WP-Members 3.0.5 is primarily a functional improvement release with minimal core changes. See the change log for details.
WP-Members 3.0.0 is a major version release. Please be sure you have reviewed the changelog before upgrading. http://rkt.bz/v30
== Screenshots ==
@@ -135,6 +135,16 @@ WP-Members 3.0.0 is a major version release. Please be sure you have reviewed th
== Changelog ==
+= 3.0.5 =
+
+* Updated wpmem_pwd_change and wpmem_pwd_reset action hooks to include password as a parameter.
+* Stylesheet updates for 2015, 2014, and generic (both float and no float).
+* Fix to TinyMCE shortcode button, should now load button on new post/page editor.
+* Added [WP-Members] to the TinyMCE shortcode button for clarity as to what it is.
+* Moved admin js and css files to /admin/js/ and /admin/css/
+* Moved admin class files to /admin/includes/
+* Updated and verified all directories contain an index.php file to prevent directory browsing.
+
= 3.0.4 =
* Reintroduced the global action variable $wpmem_a for backward compatibility with certain add-ons, most notably the WP-Members MailChimp extension ( see http://rkt.bz/3b ). Users of this extension should upgrade. This variable had been replaced with the new WP-Members object class introduced in 3.0. However, users of older extensions and those that may have customziations with logic may be using this variable, so rather than force updating and upgrading, it is being added back in.
From fee4615509eeeb84bc4c764dda816db6d87a2a4a Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 28 Sep 2015 17:07:29 -0500
Subject: [PATCH 0159/1694] updated localization template (pot)
---
lang/wp-members.pot | 419 ++++++++++++++++++++++++--------------------
1 file changed, 233 insertions(+), 186 deletions(-)
diff --git a/lang/wp-members.pot b/lang/wp-members.pot
index ba324800..13306594 100644
--- a/lang/wp-members.pot
+++ b/lang/wp-members.pot
@@ -1,20 +1,23 @@
msgid ""
msgstr ""
-"Project-Id-Version: WP-Members\n"
-"POT-Creation-Date: 2015-06-16 12:01-0600\n"
-"PO-Revision-Date: 2015-06-16 12:01-0600\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+"Project-Id-Version: WP-Members 3.0.5\n"
+"POT-Creation-Date: 2015-09-28 16:50-0500\n"
+"PO-Revision-Date: 2015-09-28 16:47-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.6.4\n"
+"X-Generator: Poedit 1.8.5\n"
"X-Poedit-Basepath: ..\n"
+"X-Poedit-WPHeader: wp-members.php\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
+"X-Poedit-SearchPathExcluded-0: *.js\n"
#: admin/admin.php:71 admin/admin.php:138
msgid "Settings"
@@ -36,20 +39,20 @@ msgstr ""
msgid "Emails"
msgstr ""
-#: admin/dialogs.php:103
+#: admin/dialogs.php:105
msgid ""
"Your WP settings allow anyone to register - this is not the recommended "
"setting."
msgstr ""
-#: admin/dialogs.php:104
+#: admin/dialogs.php:106
#, php-format
msgid ""
"You can %s change this here %s making sure the box next to \"Anyone can "
"register\" is unchecked."
msgstr ""
-#: admin/dialogs.php:105
+#: admin/dialogs.php:107
msgid ""
"This setting allows a link on the /wp-login.php page to register using the "
"WP native registration process thus circumventing any registration you are "
@@ -59,20 +62,20 @@ msgid ""
"Settings."
msgstr ""
-#: admin/dialogs.php:109
+#: admin/dialogs.php:111
msgid ""
"Your WP settings allow anyone to comment - this is not the recommended "
"setting."
msgstr ""
-#: admin/dialogs.php:110
+#: admin/dialogs.php:112
#, php-format
msgid ""
"You can %s change this here %s by checking the box next to \"Users must be "
"registered and logged in to comment.\""
msgstr ""
-#: admin/dialogs.php:111
+#: admin/dialogs.php:113
msgid ""
"This setting allows any users to comment, whether or not they are "
"registered. Depending on how you are using WP-Members will determine whether "
@@ -80,114 +83,114 @@ msgid ""
"you can choose to ignore these warning messages under WP-Members Settings."
msgstr ""
-#: admin/dialogs.php:115
+#: admin/dialogs.php:117
msgid ""
"Your WP settings allow full text rss feeds - this is not the recommended "
"setting."
msgstr ""
-#: admin/dialogs.php:116
+#: admin/dialogs.php:118
#, php-format
msgid ""
"You can %s change this here %s by changing \"For each article in a feed, show"
"\" to \"Summary.\""
msgstr ""
-#: admin/dialogs.php:117
+#: admin/dialogs.php:119
msgid ""
"Leaving this set to full text allows anyone to read your protected content "
"in an RSS reader. Changing this to Summary prevents this as your feeds will "
"only show summary text."
msgstr ""
-#: admin/dialogs.php:121
+#: admin/dialogs.php:123
msgid "You have set WP-Members to hold registrations for approval"
msgstr ""
-#: admin/dialogs.php:122
+#: admin/dialogs.php:124
msgid ""
"but you have not changed the default message for \"Registration Completed\" "
"under \"WP-Members Dialogs and Error Messages.\" You should change this "
"message to let users know they are pending approval."
msgstr ""
-#: admin/dialogs.php:126
+#: admin/dialogs.php:128
msgid "You have set WP-Members to turn off the registration process"
msgstr ""
-#: admin/dialogs.php:127
+#: admin/dialogs.php:129
msgid ""
"but you also set to moderate and/or email admin new registrations. You will "
"need to set up a registration page for users to register."
msgstr ""
-#: admin/dialogs.php:131
+#: admin/dialogs.php:133
msgid "You have turned on reCAPTCHA"
msgstr ""
-#: admin/dialogs.php:132
+#: admin/dialogs.php:134
msgid ""
"but you have not entered API keys. You will need both a public and private "
"key. The CAPTCHA will not display unless a valid API key is included."
msgstr ""
-#: admin/dialogs.php:156
+#: admin/dialogs.php:158
msgid "Version:"
msgstr ""
-#: admin/dialogs.php:157
+#: admin/dialogs.php:159
msgid "Quick Start Guide"
msgstr ""
-#: admin/dialogs.php:158
+#: admin/dialogs.php:160
msgid "Online User Guide"
msgstr ""
-#: admin/dialogs.php:159
+#: admin/dialogs.php:161
msgid "FAQs"
msgstr ""
-#: admin/dialogs.php:166
+#: admin/dialogs.php:168
msgid "Thank you for using WP-Members"
msgstr ""
-#: admin/dialogs.php:167
+#: admin/dialogs.php:169
msgid "A plugin developed by"
msgstr ""
-#: admin/dialogs.php:168
+#: admin/dialogs.php:170
msgid "Follow"
msgstr ""
-#: admin/dialogs.php:185 admin/dialogs.php:189
+#: admin/dialogs.php:187 admin/dialogs.php:191
msgid "Latest from RocketGeek"
msgstr ""
-#: admin/dialogs.php:206 admin/dialogs.php:219
+#: admin/dialogs.php:208 admin/dialogs.php:221
msgid "Latest from ButlerBlog"
msgstr ""
-#: admin/post.php:47 admin/post.php:49 admin/tab-options.php:83
+#: admin/post.php:50 admin/post.php:52 admin/tab-options.php:84
msgid "Block"
msgstr ""
-#: admin/post.php:48 admin/post.php:50
+#: admin/post.php:51 admin/post.php:53
msgid "Unblock"
msgstr ""
-#: admin/post.php:173
+#: admin/post.php:178
msgid " Restriction"
msgstr ""
-#: admin/post.php:301
+#: admin/post.php:308
msgid "Unblocked?"
msgstr ""
-#: admin/post.php:301
+#: admin/post.php:308
msgid "Blocked?"
msgstr ""
-#: admin/post.php:331 admin/post.php:332 admin/user-export.php:112
+#: admin/post.php:339 admin/post.php:340 admin/user-export.php:112
msgid "Yes"
msgstr ""
@@ -200,96 +203,127 @@ msgstr ""
msgid "Manage reCAPTCHA Options"
msgstr ""
-#: admin/tab-captcha.php:69
+#: admin/tab-captcha.php:67
+msgid ""
+"reCAPTCHA is a free, accessible CAPTCHA service that helps to digitize books "
+"while blocking spam on your blog."
+msgstr ""
+
+#: admin/tab-captcha.php:68
+#, php-format
+msgid ""
+"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"
+msgstr ""
+
+#: admin/tab-captcha.php:73 admin/tab-captcha.php:99
msgid "reCAPTCHA Keys"
msgstr ""
-#: admin/tab-captcha.php:71
+#: admin/tab-captcha.php:75
#, php-format
msgid ""
-"reCAPTCHA requires an API key, consisting of a \"site\" and a \"secret\" "
+"reCAPTCHA requires an API key, consisting of a \"public\" and a \"private\" "
"key. You can sign up for a %s free reCAPTCHA key%s"
msgstr ""
-#: admin/tab-captcha.php:72
-msgid "Site Key"
+#: admin/tab-captcha.php:76
+msgid "Public Key"
msgstr ""
-#: admin/tab-captcha.php:73
-msgid "Secret Key"
+#: admin/tab-captcha.php:77
+msgid "Private Key"
msgstr ""
-#: admin/tab-captcha.php:77
+#: admin/tab-captcha.php:81
msgid "Choose Theme"
msgstr ""
-#: admin/tab-captcha.php:80
+#: admin/tab-captcha.php:84
msgid "Red"
msgstr ""
-#: admin/tab-captcha.php:81
+#: admin/tab-captcha.php:85
msgid "White"
msgstr ""
-#: admin/tab-captcha.php:82
+#: admin/tab-captcha.php:86
msgid "Black Glass"
msgstr ""
-#: admin/tab-captcha.php:83
+#: admin/tab-captcha.php:87
msgid "Clean"
msgstr ""
-#: admin/tab-captcha.php:115
+#: admin/tab-captcha.php:101
+#, php-format
+msgid ""
+"reCAPTCHA requires an API key, consisting of a \"site\" and a \"secret\" "
+"key. You can sign up for a %s free reCAPTCHA key%s"
+msgstr ""
+
+#: admin/tab-captcha.php:102
+msgid "Site Key"
+msgstr ""
+
+#: admin/tab-captcha.php:103
+msgid "Secret Key"
+msgstr ""
+
+#: admin/tab-captcha.php:134
msgid "Characters for image"
msgstr ""
-#: admin/tab-captcha.php:119
+#: admin/tab-captcha.php:138
msgid "Number of characters"
msgstr ""
-#: admin/tab-captcha.php:123
+#: admin/tab-captcha.php:142
msgid "Image dimensions"
msgstr ""
-#: admin/tab-captcha.php:124
+#: admin/tab-captcha.php:143
msgid "Width"
msgstr ""
-#: admin/tab-captcha.php:124
+#: admin/tab-captcha.php:143
msgid "Height"
msgstr ""
-#: admin/tab-captcha.php:127
+#: admin/tab-captcha.php:146
msgid "Font color of characters"
msgstr ""
-#: admin/tab-captcha.php:131
+#: admin/tab-captcha.php:150
msgid "Background color of image"
msgstr ""
-#: admin/tab-captcha.php:135
+#: admin/tab-captcha.php:154
msgid "Font size"
msgstr ""
-#: admin/tab-captcha.php:139
+#: admin/tab-captcha.php:158
msgid "Width between characters"
msgstr ""
-#: admin/tab-captcha.php:143
+#: admin/tab-captcha.php:162
msgid "Image type"
msgstr ""
-#: admin/tab-captcha.php:157
+#: admin/tab-captcha.php:176
msgid ""
"To use Really Simple CAPTCHA, you must have the Really Simple CAPTCHA plugin "
"installed and activated."
msgstr ""
-#: admin/tab-captcha.php:169
+#: admin/tab-captcha.php:200
msgid "Update CAPTCHA Settings"
msgstr ""
-#: admin/tab-captcha.php:233
+#: admin/tab-captcha.php:266
msgid "CAPTCHA was updated for WP-Members"
msgstr ""
@@ -436,179 +470,187 @@ msgstr ""
msgid "A field with that option name already exists"
msgstr ""
-#: admin/tab-fields.php:209
+#: admin/tab-fields.php:198
+#, php-format
+msgid ""
+"Sorry, \"%s\" is a reserved term. "
+"Field was not added."
+msgstr ""
+
+#: admin/tab-fields.php:216
msgid "Checked value is required for checkboxes. Nothing was updated."
msgstr ""
-#: admin/tab-fields.php:235
+#: admin/tab-fields.php:242
msgid "field was added"
msgstr ""
-#: admin/tab-fields.php:253
+#: admin/tab-fields.php:260
msgid "field was updated"
msgstr ""
-#: admin/tab-fields.php:272 admin/tab-fields.php:451
+#: admin/tab-fields.php:279 admin/tab-fields.php:459
msgid "Edit"
msgstr ""
-#: admin/tab-fields.php:299 admin/tab-fields.php:416
+#: admin/tab-fields.php:306 admin/tab-fields.php:423
msgid "Edit Field"
msgstr ""
-#: admin/tab-fields.php:299
+#: admin/tab-fields.php:306
msgid "Add a Field"
msgstr ""
-#: admin/tab-fields.php:305 admin/tab-fields.php:445
+#: admin/tab-fields.php:312 admin/tab-fields.php:453
msgid "Field Label"
msgstr ""
-#: admin/tab-fields.php:307
+#: admin/tab-fields.php:314
msgid "The name of the field as it will be displayed to the user."
msgstr ""
-#: admin/tab-fields.php:310 admin/tab-fields.php:446
+#: admin/tab-fields.php:317 admin/tab-fields.php:454
msgid "Option Name"
msgstr ""
-#: admin/tab-fields.php:316
+#: admin/tab-fields.php:323
msgid ""
"The database meta value for the field. It must be unique and contain no "
"spaces (underscores are ok)."
msgstr ""
-#: admin/tab-fields.php:320 admin/tab-fields.php:447
+#: admin/tab-fields.php:327 admin/tab-fields.php:455
msgid "Field Type"
msgstr ""
-#: admin/tab-fields.php:326
+#: admin/tab-fields.php:333
msgid "text"
msgstr ""
-#: admin/tab-fields.php:327
+#: admin/tab-fields.php:334
msgid "textarea"
msgstr ""
-#: admin/tab-fields.php:328
+#: admin/tab-fields.php:335
msgid "checkbox"
msgstr ""
-#: admin/tab-fields.php:329
+#: admin/tab-fields.php:336
msgid "dropdown"
msgstr ""
-#: admin/tab-fields.php:330
+#: admin/tab-fields.php:337
msgid "password"
msgstr ""
-#: admin/tab-fields.php:331
+#: admin/tab-fields.php:338
msgid "file"
msgstr ""
-#: admin/tab-fields.php:336 admin/tab-fields.php:448
+#: admin/tab-fields.php:343 admin/tab-fields.php:456
msgid "Display?"
msgstr ""
-#: admin/tab-fields.php:340 admin/tab-fields.php:449
+#: admin/tab-fields.php:347 admin/tab-fields.php:457
msgid "Required?"
msgstr ""
-#: admin/tab-fields.php:346
+#: admin/tab-fields.php:353
msgid "Additional information for field upload fields"
msgstr ""
-#: admin/tab-fields.php:349
+#: admin/tab-fields.php:356
msgid "Accepted file types:"
msgstr ""
-#: admin/tab-fields.php:354
+#: admin/tab-fields.php:361
msgid "Accepted file types should be set like this: jpg|jpeg|png|gif"
msgstr ""
-#: admin/tab-fields.php:361
+#: admin/tab-fields.php:368
msgid "Additional information for checkbox fields"
msgstr ""
-#: admin/tab-fields.php:364
+#: admin/tab-fields.php:371
msgid "Checked by default?"
msgstr ""
-#: admin/tab-fields.php:368
+#: admin/tab-fields.php:375
msgid "Stored value if checked:"
msgstr ""
-#: admin/tab-fields.php:376
+#: admin/tab-fields.php:383
msgid "Additional information for dropdown fields"
msgstr ""
-#: admin/tab-fields.php:379
+#: admin/tab-fields.php:386
msgid "For dropdown, array of values:"
msgstr ""
-#: admin/tab-fields.php:404
+#: admin/tab-fields.php:411
msgid "Options should be Option Name|option_value,"
msgstr ""
-#: admin/tab-fields.php:408
+#: admin/tab-fields.php:415
msgid "Visit plugin site for more information"
msgstr ""
-#: admin/tab-fields.php:416
+#: admin/tab-fields.php:423
msgid "Add Field"
msgstr ""
-#: admin/tab-fields.php:436
+#: admin/tab-fields.php:444
msgid "Manage Fields"
msgstr ""
-#: admin/tab-fields.php:438
+#: admin/tab-fields.php:446
msgid ""
"Determine which fields will display and which are required. This includes "
"all fields, both native WP fields and WP-Members custom fields."
msgstr ""
-#: admin/tab-fields.php:439
+#: admin/tab-fields.php:447
msgid "(Note: Email is always mandatory and cannot be changed.)"
msgstr ""
-#: admin/tab-fields.php:444
+#: admin/tab-fields.php:452
msgid "Add/Delete"
msgstr ""
-#: admin/tab-fields.php:450
+#: admin/tab-fields.php:458
msgid "Checked?"
msgstr ""
-#: admin/tab-fields.php:452
+#: admin/tab-fields.php:460
msgid "Users Screen"
msgstr ""
-#: admin/tab-fields.php:464
+#: admin/tab-fields.php:472
msgid "Delete"
msgstr ""
-#: admin/tab-fields.php:476
+#: admin/tab-fields.php:484
msgid "(Email cannot be removed)"
msgstr ""
-#: admin/tab-fields.php:496
+#: admin/tab-fields.php:504
msgid "Registration Date"
msgstr ""
-#: admin/tab-fields.php:499
+#: admin/tab-fields.php:507
msgid "native"
msgstr ""
-#: admin/tab-fields.php:509
+#: admin/tab-fields.php:517
msgid "Active"
msgstr ""
-#: admin/tab-fields.php:521
+#: admin/tab-fields.php:529
msgid "Registration IP"
msgstr ""
-#: admin/tab-fields.php:556
+#: admin/tab-fields.php:564
msgid "Update Fields"
msgstr ""
@@ -616,149 +658,149 @@ msgstr ""
msgid "Manage Options"
msgstr ""
-#: admin/tab-options.php:82
+#: admin/tab-options.php:83
msgid "Do not block"
msgstr ""
-#: admin/tab-options.php:84
+#: admin/tab-options.php:85
msgid "Hide"
msgstr ""
-#: admin/tab-options.php:94
+#: admin/tab-options.php:96
msgid "Show Excerpts"
msgstr ""
-#: admin/tab-options.php:95
+#: admin/tab-options.php:97
msgid "Show Login Form"
msgstr ""
-#: admin/tab-options.php:96
+#: admin/tab-options.php:98
msgid "Show Registration Form"
msgstr ""
-#: admin/tab-options.php:116
+#: admin/tab-options.php:120
msgid "Time-based expiration"
msgstr ""
-#: admin/tab-options.php:116
+#: admin/tab-options.php:120
msgid "Allows for access to expire"
msgstr ""
-#: admin/tab-options.php:117
+#: admin/tab-options.php:121
msgid "Trial period"
msgstr ""
-#: admin/tab-options.php:117
+#: admin/tab-options.php:121
msgid "Allows for a trial period"
msgstr ""
-#: admin/tab-options.php:133
+#: admin/tab-options.php:137
msgid "Notify admin"
msgstr ""
-#: admin/tab-options.php:133
+#: admin/tab-options.php:137
#, php-format
msgid "Notify %s for each new registration? %s"
msgstr ""
-#: admin/tab-options.php:134
+#: admin/tab-options.php:138
msgid "Moderate registration"
msgstr ""
-#: admin/tab-options.php:134
+#: admin/tab-options.php:138
msgid "Holds new registrations for admin approval"
msgstr ""
-#: admin/tab-options.php:135
+#: admin/tab-options.php:139
msgid "Ignore warning messages"
msgstr ""
-#: admin/tab-options.php:135
+#: admin/tab-options.php:139
msgid "Ignores WP-Members warning messages in the admin panel"
msgstr ""
-#: admin/tab-options.php:147
+#: admin/tab-options.php:151
msgid "Attribution"
msgstr ""
-#: admin/tab-options.php:149
+#: admin/tab-options.php:153
msgid ""
"Attribution is appreciated! Display \"powered by\" link on register form?"
msgstr ""
-#: admin/tab-options.php:153
+#: admin/tab-options.php:157
msgid "Auto Excerpt:"
msgstr ""
-#: admin/tab-options.php:154
+#: admin/tab-options.php:158
msgid "Number of words in excerpt:"
msgstr ""
-#: admin/tab-options.php:154
+#: admin/tab-options.php:158
msgid "Optional"
msgstr ""
-#: admin/tab-options.php:154
+#: admin/tab-options.php:158
msgid "Automatically creates an excerpt"
msgstr ""
-#: admin/tab-options.php:157
+#: admin/tab-options.php:161
msgid "Enable CAPTCHA"
msgstr ""
-#: admin/tab-options.php:159
+#: admin/tab-options.php:163
msgid "None"
msgstr ""
-#: admin/tab-options.php:164
+#: admin/tab-options.php:169
msgid "Pages"
msgstr ""
-#: admin/tab-options.php:168
+#: admin/tab-options.php:173
msgid "Login Page:"
msgstr ""
-#: admin/tab-options.php:171
+#: admin/tab-options.php:176
msgid "Specify a login page (optional)"
msgstr ""
-#: admin/tab-options.php:180
+#: admin/tab-options.php:185
msgid "Register Page:"
msgstr ""
-#: admin/tab-options.php:183
+#: admin/tab-options.php:188
msgid "For creating a register link in the login form"
msgstr ""
-#: admin/tab-options.php:192
+#: admin/tab-options.php:197
msgid "User Profile Page:"
msgstr ""
-#: admin/tab-options.php:195
+#: admin/tab-options.php:200
msgid "For creating a forgot password link in the login form"
msgstr ""
-#: admin/tab-options.php:201 admin/tab-options.php:203
+#: admin/tab-options.php:206 admin/tab-options.php:208
msgid "Stylesheet"
msgstr ""
-#: admin/tab-options.php:212
+#: admin/tab-options.php:217
msgid "Custom Stylesheet:"
msgstr ""
-#: admin/tab-options.php:218
+#: admin/tab-options.php:223
msgid "Update Settings"
msgstr ""
-#: admin/tab-options.php:336
+#: admin/tab-options.php:341
msgid "WP-Members settings were updated"
msgstr ""
-#: admin/tab-options.php:378 admin/tab-options.php:407
+#: admin/tab-options.php:383 admin/tab-options.php:412
msgid "USE CUSTOM URL BELOW"
msgstr ""
-#: admin/tab-options.php:396
+#: admin/tab-options.php:401
msgid "Select a page"
msgstr ""
@@ -782,7 +824,7 @@ msgstr ""
msgid "IP"
msgstr ""
-#: admin/user-export.php:112 admin/users.php:335
+#: admin/user-export.php:112 admin/users.php:337
msgid "No"
msgstr ""
@@ -790,8 +832,8 @@ msgstr ""
msgid "WP-Members Additional Fields"
msgstr ""
-#: admin/user-profile.php:78 inc/users.php:62 inc/wp-registration.php:37
-#: inc/wp-registration.php:159
+#: admin/user-profile.php:78 inc/users.php:62 inc/wp-registration.php:38
+#: inc/wp-registration.php:163
msgid "(required)"
msgstr ""
@@ -823,23 +865,23 @@ msgstr ""
msgid "Export All Users"
msgstr ""
-#: inc/class-wp-members-widget.php:15
+#: inc/class-wp-members-widget.php:18
msgid "Displays the WP-Members sidebar login."
msgstr ""
-#: inc/class-wp-members-widget.php:30 inc/class-wp-members-widget.php:73
+#: inc/class-wp-members-widget.php:33 inc/class-wp-members-widget.php:76
msgid "Login Status"
msgstr ""
-#: inc/class-wp-members-widget.php:37
+#: inc/class-wp-members-widget.php:40
msgid "Title:"
msgstr ""
-#: inc/class-wp-members-widget.php:41
+#: inc/class-wp-members-widget.php:44
msgid "Redirect to (optional):"
msgstr ""
-#: inc/class-wp-members.php:320 inc/shortcodes.php:86 inc/shortcodes.php:383
+#: inc/class-wp-members.php:329 inc/shortcodes.php:95 inc/shortcodes.php:392
msgid "There was an error with the CAPTCHA form."
msgstr ""
@@ -847,62 +889,62 @@ msgstr ""
msgid "ERROR: User has not been activated."
msgstr ""
-#: inc/core.php:466 inc/register.php:88
+#: inc/core.php:472 inc/register.php:88
#, php-format
msgid "Sorry, %s is a required field."
msgstr ""
-#: inc/core.php:484 inc/forms.php:526 inc/sidebar.php:188
+#: inc/core.php:490 inc/forms.php:526 inc/sidebar.php:188
msgid "Register"
msgstr ""
-#: inc/dialogs.php:40
+#: inc/dialogs.php:47
msgid "Login Failed!"
msgstr ""
-#: inc/dialogs.php:43
+#: inc/dialogs.php:50
msgid "You entered an invalid username or password."
msgstr ""
-#: inc/dialogs.php:45
+#: inc/dialogs.php:52
msgid "Click here to continue."
msgstr ""
-#: inc/dialogs.php:189
+#: inc/dialogs.php:196
msgid "Edit My Information"
msgstr ""
-#: inc/dialogs.php:190 inc/forms.php:163
+#: inc/dialogs.php:197 inc/forms.php:163
msgid "Change Password"
msgstr ""
-#: inc/dialogs.php:204 inc/dialogs.php:225 inc/dialogs.php:261
+#: inc/dialogs.php:211 inc/dialogs.php:232 inc/dialogs.php:268
#: inc/sidebar.php:46 inc/sidebar.php:242
#, php-format
msgid "You are logged in as %s"
msgstr ""
-#: inc/dialogs.php:206
+#: inc/dialogs.php:213
msgid "Click to log out."
msgstr ""
-#: inc/dialogs.php:207
+#: inc/dialogs.php:214
msgid "Begin using the site."
msgstr ""
-#: inc/dialogs.php:226
+#: inc/dialogs.php:233
msgid "Click to log out"
msgstr ""
-#: inc/dialogs.php:262 inc/sidebar.php:47
+#: inc/dialogs.php:269 inc/sidebar.php:47
msgid "click to log out"
msgstr ""
-#: inc/dialogs.php:310
+#: inc/dialogs.php:317
msgid "Password fields cannot be empty"
msgstr ""
-#: inc/dialogs.php:377 inc/shortcodes.php:425
+#: inc/dialogs.php:384 inc/shortcodes.php:434
msgid "Edit Your Information"
msgstr ""
@@ -910,7 +952,7 @@ msgstr ""
msgid "Username"
msgstr ""
-#: inc/forms.php:78 inc/sidebar.php:143
+#: inc/forms.php:78 inc/sidebar.php:143 string stored in database
msgid "Password"
msgstr ""
@@ -934,7 +976,7 @@ msgstr ""
msgid "Update Password"
msgstr ""
-#: inc/forms.php:211
+#: inc/forms.php:211 string stored in database
msgid "Email"
msgstr ""
@@ -982,16 +1024,16 @@ msgstr ""
msgid "Choose a Username"
msgstr ""
-#: inc/forms.php:687 inc/wp-registration.php:66
+#: inc/forms.php:687 inc/wp-registration.php:67
#, php-format
msgid "Please indicate that you agree to the %s TOS %s"
msgstr ""
-#: inc/forms.php:854
+#: inc/forms.php:857
msgid "New User Registration"
msgstr ""
-#: inc/forms.php:1036
+#: inc/forms.php:1049
msgid "Input the code:"
msgstr ""
@@ -999,7 +1041,7 @@ msgstr ""
msgid "There was an error processing the form."
msgstr ""
-#: inc/register.php:109 inc/register.php:342
+#: inc/register.php:109 inc/register.php:368
msgid "You must enter a valid email address."
msgstr ""
@@ -1015,48 +1057,52 @@ msgstr ""
msgid "Passwords did not match."
msgstr ""
-#: inc/register.php:125 inc/register.php:350
+#: inc/register.php:125 inc/register.php:376
msgid "Emails did not match."
msgstr ""
-#: inc/register.php:137
+#: inc/register.php:137 inc/register.php:203
msgid "You must complete the CAPTCHA form."
msgstr ""
-#: inc/register.php:462
+#: inc/register.php:218
+msgid "CAPTCHA was not valid."
+msgstr ""
+
+#: inc/register.php:488
msgid "We were unable to validate the public key."
msgstr ""
-#: inc/register.php:466
+#: inc/register.php:492
msgid "We were unable to validate the private key."
msgstr ""
-#: inc/register.php:470
+#: inc/register.php:496
msgid "The challenge parameter of the verify script was incorrect."
msgstr ""
-#: inc/register.php:474
+#: inc/register.php:500
msgid "The CAPTCHA solution was incorrect."
msgstr ""
-#: inc/register.php:478
+#: inc/register.php:504
msgid "The parameters to verify were incorrect"
msgstr ""
-#: inc/register.php:482
+#: inc/register.php:508
msgid ""
"reCAPTCHA API keys are tied to a specific domain name for security reasons."
msgstr ""
-#: inc/register.php:486
+#: inc/register.php:512
msgid "The reCAPTCHA server was not reached. Please try to resubmit."
msgstr ""
-#: inc/register.php:490
+#: inc/register.php:516
msgid "You have entered an incorrect code value. Please try again."
msgstr ""
-#: inc/shortcodes.php:344
+#: inc/shortcodes.php:353
msgid "Click here to log out."
msgstr ""
@@ -1084,7 +1130,7 @@ msgstr ""
msgid "Additional Information"
msgstr ""
-#: inc/utilities.php:250
+#: inc/utilities.php:252
msgid "(more…)"
msgstr ""
@@ -1138,10 +1184,6 @@ msgstr ""
msgid "Day Phone"
msgstr ""
-#: string stored in database
-msgid "Email"
-msgstr ""
-
#: string stored in database
msgid "Confirm Email"
msgstr ""
@@ -1154,10 +1196,6 @@ msgstr ""
msgid "Biographical Info"
msgstr ""
-#: string stored in database
-msgid "Password"
-msgstr ""
-
#: string stored in database
msgid "Confirm Password"
msgstr ""
@@ -1265,4 +1303,13 @@ msgstr ""
#: wp-members-install.php: may be deprecated
msgid "Yahoo IM"
+msgstr ""
+
+#. Description of the plugin/theme
+msgid ""
+"WP access restriction and user registration. For more information on plugin "
+"features, refer to the online Users Guide. A Quick Start Guide is also "
+"available. WP-Members(tm) is a trademark of butlerblog.com."
msgstr ""
\ No newline at end of file
From 04a46206e08ca9f77671f7c1dfd78fc14a6d4d9c Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 29 Sep 2015 09:47:55 -0500
Subject: [PATCH 0160/1694] fixes localization logic bug from 3.0.5
---
readme.txt | 7 ++++---
wp-members.php | 8 ++++----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/readme.txt b/readme.txt
index 9876bcdb..ec397a36 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,7 +3,7 @@ Contributors: cbutlerjr
Tags: access, authentication, content, login, member, membership, password, protect, register, registration, restriction, subscriber
Requires at least: 3.1
Tested up to: 4.3.1
-Stable tag: 3.0.5
+Stable tag: 3.0.5.1
License: GPLv2
WP-Members™ is a free membership management framework for WordPress® that restricts content to registered users.
@@ -111,8 +111,9 @@ Premium priority support is available at the plugin's site [RocketGeek.com](http
== Upgrade Notice ==
-WP-Members 3.0.5 is primarily a functional improvement release with minimal core changes. See the change log for details.
-WP-Members 3.0.0 is a major version release. Please be sure you have reviewed the changelog before upgrading. http://rkt.bz/v30
+WP-Members 3.0.5.1 fixes a bug in the localization logic. If you run WP-Members in another language, please update.
+WP-Members 3.0.5 is a functional improvement release with minimal core changes.
+WP-Members 3.0.0 is a major version release. Please review the changelog: http://rkt.bz/v30
== Screenshots ==
diff --git a/wp-members.php b/wp-members.php
index eceddd72..b0fcb967 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -3,7 +3,7 @@
Plugin Name: WP-Members
Plugin URI: http://rocketgeek.com
Description: WP access restriction and user registration. For more information on plugin features, refer to the online Users Guide. A Quick Start Guide is also available. WP-Members(tm) is a trademark of butlerblog.com.
-Version: 3.0.5
+Version: 3.0.5.1
Author: Chad Butler
Author URI: http://butlerblog.com/
Text Domain: wp-members
@@ -61,7 +61,7 @@
// Initialize constants.
-define( 'WPMEM_VERSION', '3.0.5' );
+define( 'WPMEM_VERSION', '3.0.5.1' );
define( 'WPMEM_DEBUG', false );
define( 'WPMEM_DIR', plugin_dir_url ( __FILE__ ) );
define( 'WPMEM_PATH', plugin_dir_path( __FILE__ ) );
@@ -294,9 +294,9 @@ function wpmem_load_textdomain() {
*
* @param string $file The translation file to load.
*/
- $file = apply_filters( 'wpmem_localization_file', trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );
+ $file = apply_filters( 'wpmem_localization_file', trailingslashit( WP_LANG_DIR ) . 'plugins/' . $domain . '-' . $locale . '.mo' );
- $loaded = false;
+ $loaded = true;
if ( $loaded == load_textdomain( $domain, $file ) ) {
return $loaded;
} else {
From 3c26a3dcf6b1103ac02eb512227648ba44710cf2 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Wed, 30 Sep 2015 20:10:34 -0500
Subject: [PATCH 0161/1694] additional improvements to the load_textdomain()
process
---
wp-members.php | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/wp-members.php b/wp-members.php
index b0fcb967..883507bb 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -284,20 +284,29 @@ function wpmem_load_textdomain() {
// @todo See: https://ulrich.pogson.ch/load-theme-plugin-translations for notes on changes.
+ // Plugin textdomain.
$domain = 'wp-members';
- $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
+ // Wordpress locale.
+ /** This filter is documented in wp-includes/l10n.php */
+ $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
+
/**
* Filter translation file.
*
+ * If the translate.wordpress.org language pack is available, it will
+ * be /wp-content/languages/plugins/wp-members-{locale}.mo by default.
+ * You can filter this if you want to load a language pack from a
+ * different location (or different file name).
+ *
* @since 3.0.0
*
* @param string $file The translation file to load.
*/
$file = apply_filters( 'wpmem_localization_file', trailingslashit( WP_LANG_DIR ) . 'plugins/' . $domain . '-' . $locale . '.mo' );
-
- $loaded = true;
- if ( $loaded == load_textdomain( $domain, $file ) ) {
+
+ $loaded = load_textdomain( $domain, $file );
+ if ( $loaded ) {
return $loaded;
} else {
From b60a3d7a8c44697007cd7714660c732de139721e Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Wed, 30 Sep 2015 20:10:59 -0500
Subject: [PATCH 0162/1694] fixed bug in user export when moderated
registration is turned on.
---
admin/user-export.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/admin/user-export.php b/admin/user-export.php
index 83fa301c..c3a0b20e 100644
--- a/admin/user-export.php
+++ b/admin/user-export.php
@@ -109,7 +109,7 @@ function wpmem_export_users( $args, $users = null ) {
}
}
- $data .= ( $wpmem->mod_reg == 1 ) ? '"' . ( get_user_meta( $user, 'active', 1 ) ) ? __( 'Yes' ) : __( 'No' ) . '",' : '';
+ $data .= ( $wpmem->mod_reg == 1 ) ? '"' . ( get_user_meta( $user, 'active', 1 ) ? __( 'Yes' ) : __( 'No' ) ) . '",' : '';
$data .= ( $wpmem->use_exp == 1 ) ? '"' . get_user_meta( $user, "exp_type", true ) . '",' : '';
$data .= ( $wpmem->use_exp == 1 ) ? '"' . get_user_meta( $user, "expires", true ) . '",' : '';
From 57b7133366e34d5ded8bff2c59266c7a622cb7fa Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Fri, 9 Oct 2015 10:32:43 -0500
Subject: [PATCH 0163/1694] added https to codex link
---
admin/tab-fields.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/admin/tab-fields.php b/admin/tab-fields.php
index 75833dc3..1727cd45 100644
--- a/admin/tab-fields.php
+++ b/admin/tab-fields.php
@@ -195,7 +195,7 @@ function wpmem_update_fields( $action ) {
$reserved_terms = wpmem_wp_reserved_terms();
$submitted_term = $_POST['add_option'];
if ( in_array( strtolower( $submitted_term ), $reserved_terms ) ) {
- $add_field_err_msg = sprintf( __( 'Sorry, "%s" is a reserved term. Field was not added.', 'wp-members' ), $submitted_term );
+ $add_field_err_msg = sprintf( __( 'Sorry, "%s" is a reserved term. Field was not added.', 'wp-members' ), $submitted_term );
}
// Error check option name for spaces and replace with underscores.
From 066fd468705b668752639d5d823d9886d56478bc Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Fri, 9 Oct 2015 10:33:08 -0500
Subject: [PATCH 0164/1694] added /lang domain path
---
wp-members.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/wp-members.php b/wp-members.php
index 883507bb..8ccce786 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -7,6 +7,7 @@
Author: Chad Butler
Author URI: http://butlerblog.com/
Text Domain: wp-members
+Domain Path: /lang
License: GPLv2
*/
From 475ff0c6dc6fe824522d156f5407a002474dbac2 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Fri, 9 Oct 2015 10:33:40 -0500
Subject: [PATCH 0165/1694] improved current page retrieval in
wpmem_redirect_to_login()
---
inc/core.php | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/inc/core.php b/inc/core.php
index 8f6de588..668287de 100644
--- a/inc/core.php
+++ b/inc/core.php
@@ -567,14 +567,15 @@ function wpmem_securify_comments_array( $comments , $post_id ) {
*/
function wpmem_redirect_to_login() {
- global $wpmem;
+ global $wp, $post, $wpmem;
if( ! is_user_logged_in() && $wpmem->is_blocked() ) {
- global $post;
- // Get the page location.
- $page = urlencode( "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] );
- $url = wpmem_chk_qstr( $wpmem->user_pages['login'] ) . 'redirect_to=' . $page;
+ // Get current page location.
+ $current_page = home_url( add_query_arg( array(), $wp->request ) );
+ $redirect_to = urlencode( $current_page );
+
+ $url = wpmem_chk_qstr( $wpmem->user_pages['login'] ) . 'redirect_to=' . $redirect_to;
wp_redirect( $url );
exit();
From 3c4a8a716635e3432a224c07ecb42a4e442dab8d Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Sat, 10 Oct 2015 22:33:26 -0500
Subject: [PATCH 0166/1694] fixes to admin enqueued scripts
---
admin/admin.php | 23 +++++++++++++++++++++++
admin/post.php | 1 -
wp-members.php | 1 -
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/admin/admin.php b/admin/admin.php
index bc0f0b7d..d8f028ae 100644
--- a/admin/admin.php
+++ b/admin/admin.php
@@ -25,6 +25,7 @@
* - wpmem_admin_tabs
* - wpmem_admin_action
* - wpmem_admin_add_new_user
+ * - wpmem_admin_enqueue_scripts
*/
@@ -33,6 +34,7 @@
/** Actions and Filters */
+add_action( 'admin_enqueue_scripts', 'wpmem_admin_enqueue_scripts' );
add_action( 'wpmem_admin_do_tab', 'wpmem_admin_do_tab' );
add_action( 'wp_ajax_wpmem_a_field_reorder', 'wpmem_a_do_field_reorder' );
add_action( 'user_new_form', 'wpmem_admin_add_new_user' );
@@ -79,6 +81,7 @@ function wpmem_admin_plugin_links( $links, $file ) {
* Loads the admin javascript and css files.
*
* @since 2.5.1
+ * @deprecated 3.0.6
*
* @uses wp_enqueue_script
* @uses wp_enqueue_style
@@ -287,4 +290,24 @@ function wpmem_admin_add_new_user() {
return;
}
+
+/**
+ * Enqueues the admin javascript and css files.
+ *
+ * @since 3.0.6
+ *
+ * @uses wp_enqueue_script
+ * @uses wp_enqueue_style
+ *
+ * @param str $hook The admin screen hook being loaded.
+ */
+function wpmem_admin_enqueue_scripts( $hook ) {
+ if ( $hook == 'edit.php' || $hook == 'settings_page_wpmem-settings' ) {
+ wp_enqueue_style( 'wpmem-admin', WPMEM_DIR . 'admin/css/admin.css', '', WPMEM_VERSION );
+ }
+ if ( $hook == 'settings_page_wpmem-settings' ) {
+ wp_enqueue_script( 'wpmem-admin', WPMEM_DIR . 'admin/js/admin.js', '', WPMEM_VERSION );
+ }
+}
+
// End of File.
\ No newline at end of file
diff --git a/admin/post.php b/admin/post.php
index 5d3854de..29ea25fa 100644
--- a/admin/post.php
+++ b/admin/post.php
@@ -304,7 +304,6 @@ function wpmem_post_columns( $columns ) {
$post_type = ( isset( $_REQUEST['post_type'] ) ) ? $_REQUEST['post_type'] : 'post';
if ( $post_type == 'page' || $post_type == 'post' ) { // @todo - holding off on CPT support.
- wp_enqueue_style ( 'wpmem-admin-css', WPMEM_DIR . '/css/admin.css', '', WPMEM_VERSION );
$columns['wpmem_block'] = ( $wpmem->block[ $post_type ] == 1 ) ? __( 'Unblocked?', 'wp-members' ) : __( 'Blocked?', 'wp-members' );
}
return $columns;
diff --git a/wp-members.php b/wp-members.php
index 8ccce786..fb659c02 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -219,7 +219,6 @@ function wpmem_chk_admin() {
function wpmem_admin_options() {
if ( ! is_multisite() || ( is_multisite() && current_user_can( 'edit_theme_options' ) ) ) {
$plugin_page = add_options_page ( 'WP-Members', 'WP-Members', 'manage_options', 'wpmem-settings', 'wpmem_admin' );
- add_action( 'load-'.$plugin_page, 'wpmem_load_admin_js' ); // enqueues javascript for admin
}
}
From 97f2608d781fb4a14eb9e7a9083ae0005b29e877 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 12 Oct 2015 15:30:38 -0500
Subject: [PATCH 0167/1694] fixes to admin enqueued scripts
---
admin/admin.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/admin/admin.php b/admin/admin.php
index d8f028ae..f4dc3512 100644
--- a/admin/admin.php
+++ b/admin/admin.php
@@ -306,7 +306,7 @@ function wpmem_admin_enqueue_scripts( $hook ) {
wp_enqueue_style( 'wpmem-admin', WPMEM_DIR . 'admin/css/admin.css', '', WPMEM_VERSION );
}
if ( $hook == 'settings_page_wpmem-settings' ) {
- wp_enqueue_script( 'wpmem-admin', WPMEM_DIR . 'admin/js/admin.js', '', WPMEM_VERSION );
+ wp_enqueue_script( 'wpmem-admin', WPMEM_DIR . 'admin/js/admin.js', '', WPMEM_VERSION );
}
}
From 3e36059fd393d9ffcc6521c354eea05f4fa9628f Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 12 Oct 2015 15:31:34 -0500
Subject: [PATCH 0168/1694] 3.0.6 release
---
readme.txt | 13 ++++++++++---
wp-members.php | 4 ++--
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/readme.txt b/readme.txt
index ec397a36..a531aac5 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,7 +3,7 @@ Contributors: cbutlerjr
Tags: access, authentication, content, login, member, membership, password, protect, register, registration, restriction, subscriber
Requires at least: 3.1
Tested up to: 4.3.1
-Stable tag: 3.0.5.1
+Stable tag: 3.0.6
License: GPLv2
WP-Members™ is a free membership management framework for WordPress® that restricts content to registered users.
@@ -111,8 +111,7 @@ Premium priority support is available at the plugin's site [RocketGeek.com](http
== Upgrade Notice ==
-WP-Members 3.0.5.1 fixes a bug in the localization logic. If you run WP-Members in another language, please update.
-WP-Members 3.0.5 is a functional improvement release with minimal core changes.
+WP-Members 3.0.6 is a functional improvement release with minimal core changes.
WP-Members 3.0.0 is a major version release. Please review the changelog: http://rkt.bz/v30
== Screenshots ==
@@ -136,6 +135,14 @@ WP-Members 3.0.0 is a major version release. Please review the changelog: http:/
== Changelog ==
+= 3.0.6 =
+
+* Updates to localization function - documented plugin_locale filter, wpmem_localization_file filter, and improved load_textdomain logic.
+* Added /lang domain path to plugin header.
+* Fixed a bug in the user export function that broke CSV columns when moderated registration was turned on.
+* Improved current page retrieval in wpmem_redirect_to_login() function.
+* Fixed admin enqueued scripts (post/page screen hook did not load from new location).
+
= 3.0.5 =
* Updated wpmem_pwd_change and wpmem_pwd_reset action hooks to include password as a parameter.
diff --git a/wp-members.php b/wp-members.php
index fb659c02..516aae9d 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -3,7 +3,7 @@
Plugin Name: WP-Members
Plugin URI: http://rocketgeek.com
Description: WP access restriction and user registration. For more information on plugin features, refer to the online Users Guide. A Quick Start Guide is also available. WP-Members(tm) is a trademark of butlerblog.com.
-Version: 3.0.5.1
+Version: 3.0.6
Author: Chad Butler
Author URI: http://butlerblog.com/
Text Domain: wp-members
@@ -62,7 +62,7 @@
// Initialize constants.
-define( 'WPMEM_VERSION', '3.0.5.1' );
+define( 'WPMEM_VERSION', '3.0.6' );
define( 'WPMEM_DEBUG', false );
define( 'WPMEM_DIR', plugin_dir_url ( __FILE__ ) );
define( 'WPMEM_PATH', plugin_dir_path( __FILE__ ) );
From 5355b7b7d82fab1a3be672927aa2ce035ef07958 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 19 Oct 2015 14:02:38 -0500
Subject: [PATCH 0169/1694] code standards, improved inline documentation
---
admin/admin.php | 96 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 68 insertions(+), 28 deletions(-)
diff --git a/admin/admin.php b/admin/admin.php
index f4dc3512..7db8ae27 100644
--- a/admin/admin.php
+++ b/admin/admin.php
@@ -9,8 +9,7 @@
* Copyright (c) 2006-2015 Chad Butler
* WP-Members(tm) is a trademark of butlerblog.com
*
- * @package WordPress
- * @subpackage WP-Members
+ * @package WP-Members
* @author Chad Butler
* @copyright 2006-2015
*
@@ -29,11 +28,15 @@
*/
-/** File Includes */
+/**
+ * Load dialog functions.
+ */
include_once( WPMEM_PATH . 'admin/dialogs.php' );
-/** Actions and Filters */
+/**
+ * Actions and Filters
+ */
add_action( 'admin_enqueue_scripts', 'wpmem_admin_enqueue_scripts' );
add_action( 'wpmem_admin_do_tab', 'wpmem_admin_do_tab' );
add_action( 'wp_ajax_wpmem_a_field_reorder', 'wpmem_a_do_field_reorder' );
@@ -45,11 +48,14 @@
* Calls the function to reorder fields.
*
* @since 2.8.0
- *
- * @uses wpmem_a_field_reorder
*/
-function wpmem_a_do_field_reorder(){
+function wpmem_a_do_field_reorder() {
+ /**
+ * Load the fields tab functions.
+ */
include_once( WPMEM_PATH . 'admin/tab-fields.php' );
+
+ // Reorder registration fields.
wpmem_a_field_reorder();
}
@@ -57,11 +63,10 @@ function wpmem_a_do_field_reorder(){
/**
* Filter to add link to settings from plugin panel.
*
- * @since 2.4
+ * @since 2.4.0
*
* @param array $links
* @param string $file
- * @static string $wpmem_plugin
* @return array $links
*/
function wpmem_admin_plugin_links( $links, $file ) {
@@ -82,9 +87,6 @@ function wpmem_admin_plugin_links( $links, $file ) {
*
* @since 2.5.1
* @deprecated 3.0.6
- *
- * @uses wp_enqueue_script
- * @uses wp_enqueue_style
*/
function wpmem_load_admin_js() {
// Queue up admin ajax and styles.
@@ -96,21 +98,29 @@ function wpmem_load_admin_js() {
/**
* Creates the captcha tab.
*
- * @since 2.8
+ * @since 2.8.0
*
- * @param string $tab
- * @return
+ * @param string $tab The admin tab being displayed.
+ * @return string|bool The captcha options tab, otherwise false.
*/
function wpmem_a_captcha_tab( $tab ) {
- include_once( WPMEM_PATH . 'admin/tab-captcha.php' );
- return ( $tab == 'captcha' ) ? wpmem_a_build_captcha_options() : false ;
+ if ( $tab == 'captcha' ) {
+ /**
+ * Load the captcha tab functions.
+ */
+ include_once( WPMEM_PATH . 'admin/tab-captcha.php' );
+ // Render the captcha tab.
+ return wpmem_a_build_captcha_options();
+ } else {
+ return false;
+ }
}
/**
* Adds the captcha tab.
*
- * @since 2.8
+ * @since 2.8.0
*
* @param array $tabs The array of tabs for the admin panel.
* @return array The updated array of tabs for the admin panel.
@@ -123,7 +133,9 @@ function wpmem_add_captcha_tab( $tabs ) {
/**
* Primary admin function.
*
- * @since 2.1
+ * @since 2.1.0
+ *
+ * @global object $wpmem The WP_Members object.
*/
function wpmem_admin() {
@@ -142,8 +154,10 @@ function wpmem_admin() {
Date: Mon, 19 Oct 2015 14:03:45 -0500
Subject: [PATCH 0170/1694] code standards, inline documentation, added
excluded_fields to object class, changed utility function to wrapper for new
class method.
---
inc/class-wp-members.php | 68 ++++++++++++++++++++++++++++++++++------
inc/utilities.php | 47 +++++++++++++--------------
2 files changed, 80 insertions(+), 35 deletions(-)
diff --git a/inc/class-wp-members.php b/inc/class-wp-members.php
index 211f20a6..8a56dd39 100644
--- a/inc/class-wp-members.php
+++ b/inc/class-wp-members.php
@@ -1,9 +1,16 @@
block['post'] ) : '';
@@ -156,6 +172,8 @@ function load_constants() {
* Gets the requested action.
*
* @since 3.0.0
+ *
+ * @global string $wpmem_a The WP-Members action variable.
*/
function get_action() {
@@ -175,6 +193,8 @@ function get_action() {
*
* @since 3.0.0
*
+ * @global string $wpmem_a The WP-Members action variable.
+ *
* @param string $action The action being done.
* @return string The regchk value.
*
@@ -237,7 +257,9 @@ function get_regchk( $action ) {
* This function was originally stand alone in the core file and
* was moved to the WP_Members class in 3.0.
*
- * @since 3.0
+ * @since 3.0.0
+ *
+ * @global object $post The WordPress Post object.
*
* @return bool $block true|false
*/
@@ -308,11 +330,11 @@ function is_blocked() {
* This is the primary function that picks up where get_action() leaves off.
* Determines whether content is shown or hidden for both post and pages.
*
- * @since 3.0
+ * @since 3.0.0
*
* @global string $wpmem_themsg Contains messages to be output.
- * @global string $wpmem_captcha_err Contains error message for reCAPTCHA.
- * @global object $post The post object.
+ * @global object $post The WordPress Post object.
+ *
* @param string $content
* @return string $content
*/
@@ -416,14 +438,40 @@ function do_securify( $content = null ) {
}
/**
- * Returns the registration fields.
+ * Sets the registration fields.
*
* @since 3.0.0
- *
- * @return array The registration fields.
*/
function load_fields() {
$this->fields = get_option( 'wpmembers_fields' );
}
+
+ /**
+ * Get excluded meta fields.
+ *
+ * @since Unknown
+ *
+ * @param string $tag A tag so we know where the function is being used.
+ * @return array The excluded fields.
+ */
+ function excluded_fields( $tag ) {
+
+ // Default excluded fields.
+ $excluded_fields = array( 'password', 'confirm_password', 'confirm_email', 'password_confirm', 'email_confirm' );
+
+ /**
+ * Filter the fields to be excluded when user is created/updated.
+ *
+ * @since 2.9.3
+ * @since Unknown Moved to new method in WP_Members Class.
+ *
+ * @param array An array of the field meta names to exclude.
+ * @param string $tag A tag so we know where the function is being used.
+ */
+ $excluded_fields = apply_filters( 'wpmem_exclude_fields', $excluded_fields, $tag );
+
+ // Return excluded fields.
+ return $excluded_fields;
+ }
}
\ No newline at end of file
diff --git a/inc/utilities.php b/inc/utilities.php
index 6ad6a463..a777a5c6 100644
--- a/inc/utilities.php
+++ b/inc/utilities.php
@@ -10,8 +10,8 @@
* Copyright (c) 2006-2015 Chad Butler
* WP-Members(tm) is a trademark of butlerblog.com
*
- * @package WordPress
- * @subpackage WP-Members
+ * @package WP-Members
+ * @subpackage WP-Members Utility Functions
* @author Chad Butler
* @copyright 2006-2015
*
@@ -19,7 +19,7 @@
* - wpmem_create_formfield
* - wpmem_selected
* - wpmem_chk_qstr
- * - wpmem_generatePassword
+ * - wpmem_generatePassword (deprecated)
* - wpmem_texturize
* - wpmem_enqueue_style
* - wpmem_do_excerpt
@@ -35,7 +35,7 @@
*
* Creates various form fields and returns them as a string.
*
- * @since 1.8
+ * @since 1.8.0
*
* @param string $name The name of the field.
* @param string $type The field type.
@@ -102,7 +102,7 @@ function wpmem_create_formfield( $name, $type, $value, $valtochk=null, $class='t
/**
* Determines if a form field is selected (i.e. lists & checkboxes).
*
- * @since 0.1
+ * @since 0.1.0
*
* @param string $value
* @param string $valtochk
@@ -120,9 +120,8 @@ function wpmem_selected( $value, $valtochk, $type=null ) {
/**
* Checks querystrings.
*
- * @since 2.0
+ * @since 2.0.0
*
- * @uses get_permalink
* @param string $url
* @return string $return_url
*/
@@ -145,7 +144,8 @@ function wpmem_chk_qstr( $url = null ) {
/**
* Generates a random password.
*
- * @since 2.0
+ * @since 2.0.0
+ * @deprecated Unknown
*
* @return string The random password.
*/
@@ -192,9 +192,7 @@ function wpmem_texturize( $content ) {
*
* @since 2.6
*
- * @global $wpmem
- * @uses wp_register_style
- * @uses wp_enqueue_style
+ * @global object $wpmem The WP_Members object.
*/
function wpmem_enqueue_style() {
global $wpmem;
@@ -210,6 +208,8 @@ function wpmem_enqueue_style() {
*
* @since 2.6
*
+ * @global object $wpmem The WP_Members object.
+ *
* @param string $content
* @return string $content
*/
@@ -277,10 +277,10 @@ function wpmem_do_excerpt( $content ) {
/**
* Tests $content for the presence of the [wp-members] shortcode.
*
- * @since 2.6
+ * @since 2.6.0
+ *
+ * @global $shortcode_tags
*
- * @global string $post
- * @uses get_shortcode_regex
* @return bool
*
* @example http://codex.wordpress.org/Function_Reference/get_shortcode_regex
@@ -309,27 +309,24 @@ function wpmem_test_shortcode( $content, $tag ) {
* Sets an array of user meta fields to be excluded from update/insert.
*
* @since 2.9.3
+ * @since Unknown Now a wrapper for get_excluded_fields().
*
- * @param string $tag A tag so we know where the function is being used.
+ * @param string $tag A tag so we know where the function is being used.
+ * @return array Array of fields to be excluded from the registration form.
*/
function wpmem_get_excluded_meta( $tag ) {
- /**
- * Filter the fields to be excluded when user is created/updated.
- *
- * @since 2.9.3
- *
- * @param array An array of the field meta names to exclude.
- * @param string $tag A tag so we know where the function is being used.
- */
- return apply_filters( 'wpmem_exclude_fields', array( 'password', 'confirm_password', 'confirm_email', 'password_confirm', 'email_confirm' ), $tag );
+ global $wpmem;
+ return $wpmem->excluded_fields( $tag );
}
/**
* Returns http:// or https:// depending on ssl.
*
- * @ since 2.9.8
+ * @since 2.9.8
+ *
+ * @return string https://|http:// depending on whether ssl is being used.
*/
function wpmem_use_ssl() {
return ( is_ssl() ) ? 'https://' : 'http://';
From 20a99ad74f7018bee8dfe6890cc2fce85626d8db Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 19 Oct 2015 14:04:43 -0500
Subject: [PATCH 0171/1694] code standards, improved inline documentation,
changes to use fields from object class.
---
inc/core.php | 195 ++++++++++++++++++++++++++++++---------------------
1 file changed, 117 insertions(+), 78 deletions(-)
diff --git a/inc/core.php b/inc/core.php
index 668287de..859123a6 100644
--- a/inc/core.php
+++ b/inc/core.php
@@ -10,14 +10,15 @@
* Copyright (c) 2006-2015 Chad Butler
* WP-Members(tm) is a trademark of butlerblog.com
*
- * @package WordPress
- * @subpackage WP-Members
- * @author Chad Butler
+ * @package WP-Members
+ * @author Chad Butler
* @copyright 2006-2015
*/
-// Include utility functions.
+/**
+ * Load utility functions.
+ */
require_once( WPMEM_PATH . 'inc/utilities.php' );
@@ -25,9 +26,12 @@
* The Main Action Function.
*
* Does actions required at initialization prior to headers being sent.
- * Since 3.0, this function is a wrapper for get_action().
+ * Since 3.0, this function is a wrapper for $wpmem->get_action().
+ *
+ * @since 0.1.0
+ * @since 3.0.0 Now a wrapper for $wpmem->get_action().
*
- * @since 0.1
+ * @global object $wpmem The WP-Members object class.
*/
function wpmem() {
global $wpmem;
@@ -41,13 +45,15 @@ function wpmem() {
*
* This is the primary function that picks up where wpmem() leaves off.
* Determines whether content is shown or hidden for both post and pages.
- * Since 3.0, this function is a wrapper for do_securify().
+ * Since 3.0, this function is a wrapper for $wpmem->do_securify().
*
- * @since 2.0
+ * @since 2.0.0
+ * @since 3.0.0 Now a wrapper for $wpmem->do_securify().
*
- * @global object $wpmem
- * @param string $content
- * @return string $content
+ * @global object $wpmem The WP-Members object class.
+ *
+ * @param string $content Content of the current post.
+ * @return string $content Content of the current post or replaced content if post is blocked and user is not logged in.
*/
function wpmem_securify( $content = null ) {
global $wpmem;
@@ -58,13 +64,14 @@ function wpmem_securify( $content = null ) {
if ( ! function_exists( 'wpmem_block' ) ):
/**
- * Determines if content should be blocked.
+ * Determines if content is blocked.
*
- * Since 3.0, this function is a wrapper for is_blocked().
+ * @since 2.6.0
+ * @since 3.0.0 Now a wrapper for $wpmem->is_blocked().
*
- * @since 2.6
+ * @global object $wpmem The WP-Members object class.
*
- * @return bool $block true|false
+ * @return bool $block true if content is blocked, false otherwise.
*/
function wpmem_block() {
global $wpmem;
@@ -79,11 +86,10 @@ function wpmem_block() {
*
* @since 2.7.1
*
- * @uses wp_check_password
- * @param int $user
- * @param string $username
- * @param string $password
- * @return int $user
+ * @param object $user The WordPress User object.
+ * @param string $username The user's username (user_login).
+ * @param string $password The user's password.
+ * @return object $user The WordPress User object.
*/
function wpmem_check_activated( $user, $username, $password ) {
@@ -114,12 +120,12 @@ function wpmem_check_activated( $user, $username, $password ) {
* successful, it will set a cookie using wp_set_auth_cookie (since 2.7.7),
* then it redirects and exits; otherwise "loginfailed" is returned.
*
- * @since 0.1
+ * @since 0.1.0
+ * @since 2.5.2 Now uses wp_signon().
+ * @since 2.7.7 Sets cookie using wp_set_auth_cookie().
+ * @since 3.0.0 Removed wp_set_auth_cookie(), this already happens in wp_signon().
*
- * @uses wp_signon
- * @uses wp_set_auth_cookie
- * @uses wp_redirect Redirects to $redirect_to if login is successful.
- * @return string Returns "loginfailed" if the login fails.
+ * @return string Returns "loginfailed" if the login fails.
*/
function wpmem_login() {
@@ -183,12 +189,8 @@ function wpmem_login() {
/**
* Logs the user out then redirects.
*
- * @since 2.0
+ * @since 2.0.0
*
- * @uses wp_clearcookie
- * @uses wp_logout
- * @uses nocache_headers
- * @uses wp_redirect
* @param string $redirect_to The URL to redirect to at logout.
*/
function wpmem_logout( $redirect_to = null ) {
@@ -207,7 +209,7 @@ function wpmem_logout( $redirect_to = null ) {
wp_clear_auth_cookie();
- // This action is defined in /wp-includes/pluggable.php.
+ /** This action is defined in /wp-includes/pluggable.php. */
do_action( 'wp_logout' );
nocache_headers();
@@ -220,17 +222,20 @@ function wpmem_logout( $redirect_to = null ) {
if ( ! function_exists( 'wpmem_login_status' ) ):
/**
- * Displays the user's login status.
+ * Returns or displays the user's login status.
*
- * @since 2.0
+ * @since 2.0.0
*
- * @uses wpmem_inc_memberlinks()
- * @param boolean $echo Determines whether function should print result or not (default: true).
- * @return string $status The user status string produced by wpmem_inc_memberlinks().
+ * @param boolean $echo Determines whether function should print result or not (default: true).
+ * @return string $status The user status string produced by wpmem_inc_memberlinks().
*/
function wpmem_login_status( $echo = true ) {
- include_once( WPMEM_PATH . 'inc/dialogs.php' );
+ /**
+ * Load the dialogs functions.
+ */
+ require_once( WPMEM_PATH . 'inc/dialogs.php' );
+
if ( is_user_logged_in() ) {
$status = wpmem_inc_memberlinks( 'status' );
if ( $echo ) {
@@ -248,12 +253,16 @@ function wpmem_login_status( $echo = true ) {
*
* This function is a wrapper for wpmem_do_sidebar().
*
- * @since 2.0
+ * @since 2.0.0
*
- * @uses wpmem_do_sidebar()
+ * @todo This function may be deprecated.
*/
function wpmem_inc_sidebar() {
+ /**
+ * Load the sidebar functions.
+ */
include_once( WPMEM_PATH . 'inc/sidebar.php' );
+ // Render the sidebar.
wpmem_do_sidebar();
}
endif;
@@ -261,15 +270,23 @@ function wpmem_inc_sidebar() {
if ( ! function_exists( 'widget_wpmemwidget_init' ) ):
/**
- * Initializes the widget.
+ * Initializes the WP-Members widget.
*
- * @since 2.0
- *
- * @uses register_widget
+ * @since 2.0.0
*/
function widget_wpmemwidget_init() {
- include_once( WPMEM_PATH . 'inc/class-wp-members-widget.php' );
- include_once( WPMEM_PATH . 'inc/sidebar.php' );
+
+ /**
+ * Load the WP-Members widget class.
+ */
+ require_once( WPMEM_PATH . 'inc/class-wp-members-widget.php' );
+
+ /**
+ * Load the sidebar functions.
+ */
+ require_once( WPMEM_PATH . 'inc/sidebar.php' );
+
+ // Register the WP-Members widget.
register_widget( 'widget_wpmemwidget' );
}
endif;
@@ -279,10 +296,11 @@ function widget_wpmemwidget_init() {
/**
* Handles user password change (not reset).
*
- * @since 2.1
+ * @since 2.1.0
*
- * @global $user_ID
- * @return string the value for $wpmem->regchk
+ * @global int $user_ID The WordPress user ID.
+ *
+ * @return string The value for $wpmem->regchk
*/
function wpmem_change_password() {
@@ -308,6 +326,7 @@ function wpmem_change_password() {
* Fires after password change.
*
* @since 2.9.0
+ * @since 3.0.5 Added $pass1 to arguments passed.
*
* @param int $user_ID The user's numeric ID.
* @param string $pass1 The user's new plain text password.
@@ -327,11 +346,11 @@ function wpmem_change_password() {
/**
* Resets a forgotten password.
*
- * @since 2.1
+ * @since 2.1.0
+ *
+ * @global object $wpmem The WP-Members object class.
*
- * @uses wp_generate_password
- * @uses wp_update_user
- * @return string value for $wpmem->regchk
+ * @return string The value for $wpmem->regchk
*/
function wpmem_reset_password() {
@@ -374,14 +393,19 @@ function wpmem_reset_password() {
// Update the users password.
wp_update_user( array ( 'ID' => $user->ID, 'user_pass' => $new_pass ) );
- // Send it in an email.
+ /**
+ * Load the email functions.
+ */
require_once( WPMEM_PATH . 'inc/email.php' );
+
+ // Send it in an email.
wpmem_inc_regemail( $user->ID, $new_pass, 3 );
/**
* Fires after password reset.
*
* @since 2.9.0
+ * @since 3.0.5 Added $pass1 to arguments passed.
*
* @param int $user_ID The user's numeric ID.
* @param string $new_pass The new plain text password.
@@ -404,12 +428,11 @@ function wpmem_reset_password() {
if ( ! function_exists( 'wpmem_no_reset' ) ):
/**
- * Keeps users not activated from resetting their password
- * via wp-login when using registration moderation.
+ * Prevents users not activated from resetting their password.
*
* @since 2.5.1
*
- * @return bool
+ * @return bool Returns false if the user is not activated, otherwise true.
*/
function wpmem_no_reset() {
@@ -439,7 +462,10 @@ function wpmem_no_reset() {
* @since 2.8.3
*/
function wpmem_wp_register_form() {
- include_once( WPMEM_PATH . 'inc/wp-registration.php' );
+ /**
+ * Load native WP registration functions.
+ */
+ require_once( WPMEM_PATH . 'inc/wp-registration.php' );
wpmem_do_wp_register_form();
}
@@ -449,24 +475,28 @@ function wpmem_wp_register_form() {
*
* @since 2.8.3
*
- * @param $errors
- * @param $sanatized_user_login
- * @param $user_email
- * @return $errors
+ * @global object $wpmem The WP-Members object class.
+ *
+ * @param array $errors A WP_Error object containing any errors encountered during registration.
+ * @param string $sanitized_user_login User's username after it has been sanitized.
+ * @param string $user_email User's email.
+ * @return array $errors A WP_Error object containing any errors encountered during registration.
*/
function wpmem_wp_reg_validate( $errors, $sanitized_user_login, $user_email ) {
global $wpmem;
- $wpmem_fields = $wpmem->fields; //get_option( 'wpmembers_fields' );
+
+ // Get any meta fields that should be excluded.
+ // @todo This needs to change to $wpmem->excluded_fields($tag).
$exclude = wpmem_get_excluded_meta( 'register' );
- foreach ( $wpmem_fields as $field ) {
+ foreach ( $wpmem->fields as $field ) {
$is_error = false;
if ( $field[5] == 'y' && $field[2] != 'user_email' && ! in_array( $field[2], $exclude ) ) {
- if ( ( $field[3] == 'checkbox' ) && ( ! isset( $_POST[$field[2]] ) ) ) {
+ if ( ( $field[3] == 'checkbox' ) && ( ! isset( $_POST[ $field[2] ] ) ) ) {
$is_error = true;
}
- if ( ( $field[3] != 'checkbox' ) && ( ! $_POST[$field[2]] ) ) {
+ if ( ( $field[3] != 'checkbox' ) && ( ! $_POST[ $field[2] ] ) ) {
$is_error = true;
}
if ( $is_error ) { $errors->add( 'wpmem_error', sprintf( __('Sorry, %s is a required field.', 'wp-members'), $field[1] ) ); }
@@ -482,7 +512,9 @@ function wpmem_wp_reg_validate( $errors, $sanitized_user_login, $user_email ) {
*
* @since 2.8.3
*
- * @param $user_id
+ * @global object $wpmem The WP-Members object class.
+ *
+ * @param int $user_id The WP user ID.
*/
function wpmem_wp_reg_finalize( $user_id ) {
@@ -490,13 +522,12 @@ function wpmem_wp_reg_finalize( $user_id ) {
$native_reg = ( isset( $_POST['wp-submit'] ) && $_POST['wp-submit'] == esc_attr( __( 'Register' ) ) ) ? true : false;
$add_new = ( isset( $_POST['action'] ) && $_POST['action'] == 'createuser' ) ? true : false;
if ( $native_reg || $add_new ) {
- // Get the fields.
- $wpmem_fields = $wpmem->fields; //get_option( 'wpmembers_fields' );
// Get any excluded meta fields.
+ // @todo This needs to change to $wpmem->excluded_fields($tag).
$exclude = wpmem_get_excluded_meta( 'register' );
- foreach ( $wpmem_fields as $meta ) {
- if ( isset( $_POST[$meta[2]] ) && ! in_array( $meta[2], $exclude ) ) {
- update_user_meta( $user_id, $meta[2], sanitize_text_field( $_POST[$meta[2]] ) );
+ foreach ( $wpmem->fields as $meta ) {
+ if ( isset( $_POST[ $meta[2] ] ) && ! in_array( $meta[2], $exclude ) ) {
+ update_user_meta( $user_id, $meta[2], sanitize_text_field( $_POST[ $meta[2] ] ) );
}
}
}
@@ -510,6 +541,7 @@ function wpmem_wp_reg_finalize( $user_id ) {
* @since 2.8.7
*/
function wpmem_wplogin_stylesheet() {
+ // @todo Should this enqueue styles?
echo '';
}
@@ -518,27 +550,28 @@ function wpmem_wplogin_stylesheet() {
* Securifies the comments.
*
* If the user is not logged in and the content is blocked
- * (i.e. wpmem_block() returns true), function loads a
+ * (i.e. wpmem->is_blocked() returns true), function loads a
* dummy/empty comments template.
*
* @since 2.9.9
*
- * @return bool $open Whether the current post is open for comments.
+ * @return bool $open true if current post is open for comments, otherwise false.
*/
function wpmem_securify_comments( $open ) {
$open = ( ! is_user_logged_in() && wpmem_block() ) ? false : $open;
-
+
/**
* Filters whether comments are open or not.
*
* @since 3.0.0
*
- * @param bool $open Whether the current post is open for comments.
+ * @param bool $open true if current post is open for comments, otherwise false.
*/
$open = apply_filters( 'wpmem_securify_comments', $open );
-
+
if ( ! $open ) {
+ /** This filter is documented in wp-includes/comment-template.php */
add_filter( 'comments_array' , 'wpmem_securify_comments_array' , 10, 2 );
}
@@ -551,6 +584,8 @@ function wpmem_securify_comments( $open ) {
*
* @since 3.0.1
*
+ * @global object $wpmem The WP-Members object class.
+ *
* @return array $comments The comments array.
*/
function wpmem_securify_comments_array( $comments , $post_id ) {
@@ -564,12 +599,16 @@ function wpmem_securify_comments_array( $comments , $post_id ) {
* Redirects a user to defined login page with return redirect.
*
* @since 3.0.2
+ *
+ * @global object $wp The WordPress object.
+ * @global object $post The WordPress post object.
+ * @global object $wpmem The WP-Members object.
*/
function wpmem_redirect_to_login() {
global $wp, $post, $wpmem;
- if( ! is_user_logged_in() && $wpmem->is_blocked() ) {
+ if ( ! is_user_logged_in() && $wpmem->is_blocked() ) {
// Get current page location.
$current_page = home_url( add_query_arg( array(), $wp->request ) );
@@ -584,4 +623,4 @@ function wpmem_redirect_to_login() {
}
-// End of File.
\ No newline at end of file
+// End of file.
\ No newline at end of file
From 175ba85f26fa8f605e25dea5c0aedd07dcfa36b3 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 19 Oct 2015 14:05:43 -0500
Subject: [PATCH 0172/1694] code standards, improved inline documentation, new
check for wpmem_form shortcode to skip if no additional tag exists.
---
inc/shortcodes.php | 184 ++++++++++++++++++++++++++-------------------
1 file changed, 105 insertions(+), 79 deletions(-)
diff --git a/inc/shortcodes.php b/inc/shortcodes.php
index bd536bf9..31c9d9e1 100644
--- a/inc/shortcodes.php
+++ b/inc/shortcodes.php
@@ -9,8 +9,8 @@
* Copyright (c) 2006-2015 Chad Butler
* WP-Members(tm) is a trademark of butlerblog.com
*
- * @package WordPress
- * @subpackage WP-Members
+ * @package WP-Members
+ * @subpackage WP-Members Shortcodes
* @author Chad Butler
* @copyright 2006-2015
*
@@ -20,7 +20,6 @@
* - wpmem_sc_logged_out
* - wpmem_shortcode
* - wpmem_do_sc_pages
- * - wpmem_do_sc_pages
* - wpmem_sc_user_count
*/
@@ -46,87 +45,104 @@
/**
* Function for forms called by shortcode.
*
- * @since 3.0
+ * @since 3.0.0
*
- * @param $attr
- * @param $content
- * @param $tag
- * @return $content
+ * @global object $wpmem The WP_Members object.
+ * @global string $wpmem_themsg The WP-Members message container.
+ *
+ * @param array $attr
+ * @param string $content
+ * @param string $tag
+ * @return string $content
*/
function wpmem_sc_forms( $atts, $content = null, $tag = 'wpmem_form' ) {
- // Dependencies.
global $wpmem, $wpmem_themsg;
+
+ /**
+ * Load core functions if they are not already loaded.
+ */
include_once( WPMEM_PATH . 'inc/core.php' );
+
+ /**
+ * Load dialog functions if they are not already loaded.
+ */
include_once( WPMEM_PATH . 'inc/dialogs.php' );
+
// Defaults.
$redirect_to = ( isset( $atts['redirect_to'] ) ) ? $atts['redirect_to'] : null;
$texturize = ( isset( $atts['texturize'] ) ) ? $atts['texturize'] : false;
- switch ( $atts ) {
-
- case in_array( 'login', $atts ):
- if ( is_user_logged_in() ) {
- /*
- * If the user is logged in, return any nested content (if any)
- * or the default bullet links if no nested content.
- */
- $content = ( $content ) ? $content : wpmem_inc_memberlinks( 'login' );
- } else {
- /*
- * If the user is not logged in, return an error message if a login
- * error state exists, or return the login form.
- */
- $content = ( $wpmem->regchk == 'loginfailed' ) ? wpmem_inc_loginfailed() : wpmem_inc_login( 'login', $redirect_to );
- }
- break;
-
- case in_array( 'register', $atts ):
- if ( is_user_logged_in() ) {
- /*
- * If the user is logged in, return any nested content (if any)
- * or the default bullet links if no nested content.
- */
- $content = ( $content ) ? $content : wpmem_inc_memberlinks( 'register' );
- } else {
- // @todo Can this be moved into another function? Should $wpmem get an error message handler?
- if ( $wpmem->regchk == 'captcha' ) {
- global $wpmem_captcha_err;
- $wpmem_themsg = __( 'There was an error with the CAPTCHA form.' ) . '
' . $wpmem_captcha_err;
- }
- $content = ( $wpmem_themsg || $wpmem->regchk == 'success' ) ? wpmem_inc_regmessage( $wpmem->regchk, $wpmem_themsg ) : '';
- $content .= ( $wpmem->regchk == 'success' ) ? wpmem_inc_login() : wpmem_inc_registration( 'new', '', $redirect_to );
- }
- break;
-
- case in_array( 'password', $atts ):
- $content = wpmem_page_pwd_reset( $wpmem->regchk, $content );
- break;
-
- case in_array( 'user_edit', $atts ):
- $content = wpmem_page_user_edit( $wpmem->regchk, $content );
- break;
-
- }
-
/*
- * @todo - This is temporary for texturizing. Need to work it into an argument in the function call as
- * to whether the [wpmem_txt] shortcode is even included. For now, this will allow this function to be
- * tested as an include during the 3.0 alpha/beta testing period and a permanent solution can be worked
- * out for 3.x.x.
+ * The [wpmem_form] shortcode requires additional tags (login, register, etc) that
+ * will be in the $atts array. If $atts is not an array, no additional tags were
+ * given, so there is nothing to render.
*/
- if ( array_key_exists( 'texturize', $atts ) && $atts['texturize'] == 'false' ) {
- $content = str_replace( array( '[wpmem_txt]', '[/wpmem_txt]' ), array( '', '' ), $content );
- }
- if ( strstr( $content, '[wpmem_txt]' ) ) {
- // Fixes the wptexturize.
- remove_filter( 'the_content', 'wpautop' );
- remove_filter( 'the_content', 'wptexturize' );
- add_filter( 'the_content', 'wpmem_texturize', 999 );
- }
- // @todo - Look into shortcode_unautop().
- /** End temporary texturize functions */
+ if ( is_array( $atts ) ) {
+
+ // If $atts is an array, get the tag from the array so we know what form to render.
+ switch ( $atts ) {
+
+ case in_array( 'login', $atts ):
+ if ( is_user_logged_in() ) {
+ /*
+ * If the user is logged in, return any nested content (if any)
+ * or the default bullet links if no nested content.
+ */
+ $content = ( $content ) ? $content : wpmem_inc_memberlinks( 'login' );
+ } else {
+ /*
+ * If the user is not logged in, return an error message if a login
+ * error state exists, or return the login form.
+ */
+ $content = ( $wpmem->regchk == 'loginfailed' ) ? wpmem_inc_loginfailed() : wpmem_inc_login( 'login', $redirect_to );
+ }
+ break;
+
+ case in_array( 'register', $atts ):
+ if ( is_user_logged_in() ) {
+ /*
+ * If the user is logged in, return any nested content (if any)
+ * or the default bullet links if no nested content.
+ */
+ $content = ( $content ) ? $content : wpmem_inc_memberlinks( 'register' );
+ } else {
+ // @todo Can this be moved into another function? Should $wpmem get an error message handler?
+ if ( $wpmem->regchk == 'captcha' ) {
+ global $wpmem_captcha_err;
+ $wpmem_themsg = __( 'There was an error with the CAPTCHA form.' ) . '
' . $wpmem_captcha_err;
+ }
+ $content = ( $wpmem_themsg || $wpmem->regchk == 'success' ) ? wpmem_inc_regmessage( $wpmem->regchk, $wpmem_themsg ) : '';
+ $content .= ( $wpmem->regchk == 'success' ) ? wpmem_inc_login() : wpmem_inc_registration( 'new', '', $redirect_to );
+ }
+ break;
+ case in_array( 'password', $atts ):
+ $content = wpmem_page_pwd_reset( $wpmem->regchk, $content );
+ break;
+
+ case in_array( 'user_edit', $atts ):
+ $content = wpmem_page_user_edit( $wpmem->regchk, $content );
+ break;
+
+ }
+
+ /*
+ * This is for texturizing. Need to work it into an argument in the function call as to whether the
+ * [wpmem_txt] shortcode is even included. @todo - Is this a temporary solution or is there something
+ * cleaner that can be worked out?
+ */
+ if ( array_key_exists( 'texturize', $atts ) && $atts['texturize'] == 'false' ) {
+ $content = str_replace( array( '[wpmem_txt]', '[/wpmem_txt]' ), array( '', '' ), $content );
+ }
+ if ( strstr( $content, '[wpmem_txt]' ) ) {
+ // Fixes the wptexturize.
+ remove_filter( 'the_content', 'wpautop' );
+ remove_filter( 'the_content', 'wptexturize' );
+ add_filter( 'the_content', 'wpmem_texturize', 999 );
+ }
+ // End texturize functions */
+ }
return do_shortcode( $content );
}
@@ -144,6 +160,8 @@ function wpmem_sc_forms( $atts, $content = null, $tag = 'wpmem_form' ) {
*
* @since 3.0.0
*
+ * @global object $wpmem The WP_Members object.
+ *
* @param array $atts
* @param string $content
* @param string $tag
@@ -230,7 +248,9 @@ function wpmem_sc_logged_out( $atts, $content = null, $tag ) {
/**
* Displays login form when called by shortcode.
*
- * @since 3.0
+ * @since 3.0.0
+ *
+ * @global object $wpmem The WP_Members object.
*
* @param $atts
* @param $content
@@ -264,7 +284,9 @@ function wpmem_sc_login_form( $atts, $content, $tag ) {
* is used. Also executes shortcodes for login status with the wpmem_logged_in tags
* and fields when the wpmem_field tags are used.
*
- * @since 2.4
+ * @since 2.4.0
+ *
+ * @global object $wpmem The WP_Members object.
*
* @param array $attr page|url|status|msg|field|id
* @param string $content
@@ -366,13 +388,14 @@ function wpmem_shortcode( $attr, $content = null, $tag = 'wp-members' ) {
* But where that function handles general content, this function
* handles building specific pages generated by shortcodes.
*
- * @since 2.6
+ * @since 2.6.0
+ *
+ * @global object $wpmem The WP_Members object.
+ * @global string $wpmem_themsg The WP-Members message container.
+ * @global object $post The WordPress post object.
*
* @param string $page
* @param string $redirect_to
- * @global object $wpmem
- * @global string $wpmem_themsg
- * @global object $post
* @return string $content
*/
function wpmem_do_sc_pages( $page, $redirect_to = null ) {
@@ -500,11 +523,14 @@ function wpmem_do_sc_pages( $page, $redirect_to = null ) {
/**
* User count shortcode.
*
- * @since 3.0
+ * @since 3.0.0
+ *
+ * @global object $wpdb The WordPress database object.
*
- * @todo Evaluate this shortcode for full inclusion.
+ * @param array $atts Shortcode attributes.
+ * @param string $content The shortcode content.
+ * @return string $content
*/
-add_shortcode( 'wpmem_show_count', 'wpmem_sc_user_count' );
function wpmem_sc_user_count( $atts, $content = null ) {
global $wpdb;
$do_query = ( $atts['key'] && $atts['value'] ) ? true : false;
From c34de6e472036485a05b552facc6aa68ee8a57dc Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 20 Oct 2015 13:45:22 -0500
Subject: [PATCH 0173/1694] better path for plugin_basename
---
admin/admin.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/admin/admin.php b/admin/admin.php
index 7db8ae27..bfbf5754 100644
--- a/admin/admin.php
+++ b/admin/admin.php
@@ -72,7 +72,7 @@ function wpmem_a_do_field_reorder() {
function wpmem_admin_plugin_links( $links, $file ) {
static $wpmem_plugin;
if ( ! $wpmem_plugin ) {
- $wpmem_plugin = plugin_basename( 'wp-members/wp-members.php' );
+ $wpmem_plugin = plugin_basename( WPMEM_PATH . '/wp-members.php' );
}
if ( $file == $wpmem_plugin ) {
$settings_link = '' . __( 'Settings', 'wp-members' ) . '';
From ab5d791035c47fca5bc66e778227bc6dd7b4af67 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 2 Nov 2015 11:24:54 -0600
Subject: [PATCH 0174/1694] added comment on filter moved to WP_Members class
---
inc/class-wp-members.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/inc/class-wp-members.php b/inc/class-wp-members.php
index 8a56dd39..776c2a56 100644
--- a/inc/class-wp-members.php
+++ b/inc/class-wp-members.php
@@ -24,6 +24,7 @@ function __construct() {
* Filter the options before they are loaded into constants.
*
* @since 2.9.0
+ * @since 3.0.0 Moved to the WP_Members class.
*
* @param array $this->settings An array of the WP-Members settings.
*/
From cfe0d4d0bd2858df9d403fe0c9a228368bba6f43 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 2 Nov 2015 11:26:25 -0600
Subject: [PATCH 0175/1694] fix for post WP 4.0 installs (no WPLANG constant
definition) when reCAPTCHA is used and notices are enabled; fix for
display_name update on user profile update; code standards
---
inc/forms.php | 42 +++++++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/inc/forms.php b/inc/forms.php
index b5a9302b..70d91915 100644
--- a/inc/forms.php
+++ b/inc/forms.php
@@ -33,24 +33,27 @@
*
* @since 1.8
*
- * @uses wpmem_login_form()
+ * @global object $wpmem The WP_Members object.
+ * @global string $wpmem_regchk The WP-Members message container.
+ * @global object $post The WordPress Post object.
*
* @param string $page
* @param string $redirect_to
* @return string $str The generated html for the login form.
*/
-function wpmem_inc_login( $page="page", $redirect_to = null, $show = 'show' ) {
+function wpmem_inc_login( $page = "page", $redirect_to = null, $show = 'show' ) {
global $wpmem, $wpmem_regchk, $post;
$str = '';
- if ( $page == "page" ){
- if ( $wpmem_regchk != "success" ){
+ if ( $page == "page" ) {
+
+ if ( $wpmem_regchk != "success" ) {
$arr = get_option( 'wpmembers_dialogs' );
- // this shown above blocked content
+ // This shown above blocked content.
$str = '
';
// Add the captcha row to the form.
/**
@@ -1174,7 +1174,7 @@ function register_form( $tag = 'new', $heading = '', $redirect_to = null ) {
$form = '
' . $args['n'] . $form . $args['n'] . '
';
// Apply anchor.
- $form = '' . $args['n'] . $form;
+ $form = '' . $args['n'] . $form;
// Apply main div wrapper.
$form = $args['main_div_before'] . $args['n'] . $form . $args['n'] . $args['main_div_after'] . $args['n'];
From 905689f2b6aa9598460d49ab29232a9c1bd2370d Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 21 Nov 2017 11:39:41 -0600
Subject: [PATCH 0726/1694] set user access loaded from _wpmem_products meta
key
---
inc/class-wp-members-user.php | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/inc/class-wp-members-user.php b/inc/class-wp-members-user.php
index 557d4300..41147b83 100644
--- a/inc/class-wp-members-user.php
+++ b/inc/class-wp-members-user.php
@@ -494,9 +494,7 @@ function has_access( $product, $user_id = false ) {
*/
function get_user_products( $user_id = false ) {
$user_id = ( ! $user_id ) ? get_current_user_id() : $user_id;
- $this->access = array(
-
- );
+ $this->access = get_user_meta( $user_id, '_wpmem_products', true );
}
/**
From e013b77509ba6427f73b3bed38fac9e33c50ffd8 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 21 Nov 2017 11:40:20 -0600
Subject: [PATCH 0727/1694] esc_sql user screen query variable
---
admin/users.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/admin/users.php b/admin/users.php
index 43f8706b..ccff361e 100644
--- a/admin/users.php
+++ b/admin/users.php
@@ -538,14 +538,14 @@ function wpmem_a_pre_user_query( $user_search ) {
$replace_query = "WHERE 1=1 AND {$wpdb->users}.ID IN (
SELECT {$wpdb->usermeta}.user_id FROM $wpdb->usermeta
WHERE {$wpdb->usermeta}.meta_key = 'exp_type'
- AND {$wpdb->usermeta}.meta_value = \"$show\" )";
+ AND {$wpdb->usermeta}.meta_value = \"" . esc_sql( $show ) . "\" )";
break;
case 'pending':
$replace_query = "WHERE 1=1 AND {$wpdb->users}.ID IN (
SELECT {$wpdb->usermeta}.user_id FROM $wpdb->usermeta
WHERE {$wpdb->usermeta}.meta_key = 'exp_type'
- AND {$wpdb->usermeta}.meta_value = \"$show\" )";
+ AND {$wpdb->usermeta}.meta_value = \"" . esc_sql( $show ) . "\" )";
break;
case 'expired':
@@ -557,7 +557,7 @@ function wpmem_a_pre_user_query( $user_search ) {
break;
}
- $user_search->query_where = str_replace( 'WHERE 1=1', $replace_query, $user_search->query_where );
+ $user_search->query_where = str_replace( 'WHERE 1=1', $replace_query, $user_search->query_where );
}
From b09f32a5b9a550fc8bd95a31413ddadd1990f894 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 21 Nov 2017 11:41:13 -0600
Subject: [PATCH 0728/1694] move user admin actions to appropriate condition
(edit_users)
---
admin/includes/class-wp-members-admin-api.php | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/admin/includes/class-wp-members-admin-api.php b/admin/includes/class-wp-members-admin-api.php
index 17462499..1c60a503 100644
--- a/admin/includes/class-wp-members-admin-api.php
+++ b/admin/includes/class-wp-members-admin-api.php
@@ -93,7 +93,7 @@ function load_dependencies() {
include_once( WPMEM_PATH . 'admin/tab-about.php' );
include_once( WPMEM_PATH . 'admin/tab-dialogs.php' );
include_once( WPMEM_PATH . 'admin/tab-dropins.php' );
- include_once( WPMEM_PATH . 'admin/tab-memberships.php' );
+ //include_once( WPMEM_PATH . 'admin/tab-memberships.php' );
}
}
@@ -131,6 +131,9 @@ function load_hooks() {
add_action( 'wpmem_user_activated', 'wpmem_set_activated_user' );
add_action( 'wpmem_user_deactivated', 'wpmem_set_deactivated_user' );
add_filter( 'user_row_actions', 'wpmem_insert_activate_link', 10, 2 );
+ add_action( 'wpmem_admin_after_profile', 'wpmem_profile_show_activate', 7 );
+ add_action( 'wpmem_admin_after_profile', 'wpmem_profile_show_expiration', 8 );
+ add_action( 'wpmem_admin_after_profile', 'wpmem_profile_show_ip', 9 );
}
// If user has a role that can edit posts, add the block/unblock meta boxes and custom post/page columns.
@@ -142,11 +145,6 @@ function load_hooks() {
add_action( 'manage_posts_custom_column', 'wpmem_post_columns_content', 10, 2 );
add_filter( 'manage_pages_columns', 'wpmem_post_columns' );
add_action( 'manage_pages_custom_column', 'wpmem_post_columns_content', 10, 2 );
-
- add_action( 'wpmem_admin_after_profile', 'wpmem_profile_show_activate', 7 );
- add_action( 'wpmem_admin_after_profile', 'wpmem_profile_show_expiration', 8 );
- add_action( 'wpmem_admin_after_profile', 'wpmem_profile_show_ip', 9 );
-
add_action( 'admin_footer-edit.php', 'wpmem_bulk_posts_action' );
add_action( 'load-edit.php', 'wpmem_posts_page_load' );
add_action( 'admin_notices', 'wpmem_posts_admin_notices' );
From f13b35c4b847052bed025c380e258e423fb3f677 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 21 Nov 2017 11:41:38 -0600
Subject: [PATCH 0729/1694] cleanup, readme update, new generated pot
---
admin/tab-options.php | 2 +-
lang/wp-members.pot | 1149 ++++++++++++++++++++++++++---------------
readme.txt | 15 +-
3 files changed, 753 insertions(+), 413 deletions(-)
diff --git a/admin/tab-options.php b/admin/tab-options.php
index 8912739c..33a6d2b6 100644
--- a/admin/tab-options.php
+++ b/admin/tab-options.php
@@ -93,7 +93,7 @@ function wpmem_a_build_options() {
$values = array(
__( 'Do not block', 'wp-members' ) . '|0',
__( 'Block', 'wp-members' ) . '|1',
- __( 'Hide', 'wp-members' ) . '|2',
+ // @todo Future development. __( 'Hide', 'wp-members' ) . '|2',
);
echo wpmem_create_formfield( 'wpmem_block_' . $key, 'select', $values, $block ); ?>
diff --git a/lang/wp-members.pot b/lang/wp-members.pot
index 77edd927..954908f2 100644
--- a/lang/wp-members.pot
+++ b/lang/wp-members.pot
@@ -3,15 +3,16 @@ msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: WP-Members\n"
-"POT-Creation-Date: 2016-05-03 17:34-0500\n"
-"PO-Revision-Date: 2016-05-03 17:26-0500\n"
+"POT-Creation-Date: 2017-11-16 15:04-0600\n"
+"PO-Revision-Date: 2017-11-16 15:03-0600\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.8.7\n"
+"X-Generator: Poedit 2.0.4\n"
"X-Poedit-Basepath: ..\n"
+"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: wp-members.php\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
@@ -20,24 +21,24 @@ msgstr ""
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
-#: admin/admin.php:72 admin/admin.php:143
+#: admin/admin.php:59 admin/includes/class-wp-members-admin-api.php:531
msgid "Settings"
msgstr ""
-#: admin/dialogs.php:104
+#: admin/dialogs.php:116
msgid ""
"Your WP settings allow anyone to register - this is not the recommended "
"setting."
msgstr ""
-#: admin/dialogs.php:105
+#: admin/dialogs.php:117
#, php-format
msgid ""
"You can %s change this here %s making sure the box next to \"Anyone can "
"register\" is unchecked."
msgstr ""
-#: admin/dialogs.php:106
+#: admin/dialogs.php:118
msgid ""
"This setting allows a link on the /wp-login.php page to register using the "
"WP native registration process thus circumventing any registration you are "
@@ -47,20 +48,20 @@ msgid ""
"Settings."
msgstr ""
-#: admin/dialogs.php:110
+#: admin/dialogs.php:122
msgid ""
"Your WP settings allow anyone to comment - this is not the recommended "
"setting."
msgstr ""
-#: admin/dialogs.php:111
+#: admin/dialogs.php:123
#, php-format
msgid ""
"You can %s change this here %s by checking the box next to \"Users must be "
"registered and logged in to comment.\""
msgstr ""
-#: admin/dialogs.php:112
+#: admin/dialogs.php:124
msgid ""
"This setting allows any users to comment, whether or not they are "
"registered. Depending on how you are using WP-Members will determine whether "
@@ -68,198 +69,330 @@ msgid ""
"you can choose to ignore these warning messages under WP-Members Settings."
msgstr ""
-#: admin/dialogs.php:116
+#: admin/dialogs.php:128
msgid ""
"Your WP settings allow full text rss feeds - this is not the recommended "
"setting."
msgstr ""
-#: admin/dialogs.php:117
+#: admin/dialogs.php:129
#, php-format
msgid ""
"You can %s change this here %s by changing \"For each article in a feed, show"
"\" to \"Summary.\""
msgstr ""
-#: admin/dialogs.php:118
+#: admin/dialogs.php:130
msgid ""
"Leaving this set to full text allows anyone to read your protected content "
"in an RSS reader. Changing this to Summary prevents this as your feeds will "
"only show summary text."
msgstr ""
-#: admin/dialogs.php:122
+#: admin/dialogs.php:134
msgid "You have set WP-Members to hold registrations for approval"
msgstr ""
-#: admin/dialogs.php:123
+#: admin/dialogs.php:135
msgid ""
"but you have not changed the default message for \"Registration Completed\" "
"under \"WP-Members Dialogs and Error Messages.\" You should change this "
"message to let users know they are pending approval."
msgstr ""
-#: admin/dialogs.php:127
-msgid "You have set WP-Members to turn off the registration process"
+#: admin/dialogs.php:139
+msgid "You have turned on reCAPTCHA"
msgstr ""
-#: admin/dialogs.php:128
+#: admin/dialogs.php:140
msgid ""
-"but you also set to moderate and/or email admin new registrations. You will "
-"need to set up a registration page for users to register."
+"but you have not entered API keys. You will need both a public and private "
+"key. The CAPTCHA will not display unless a valid API key is included."
msgstr ""
-#: admin/dialogs.php:132
-msgid "You have turned on reCAPTCHA"
+#: admin/dialogs.php:144
+msgid "You have active settings that are not recommended."
msgstr ""
-#: admin/dialogs.php:133
+#: admin/dialogs.php:145
msgid ""
-"but you have not entered API keys. You will need both a public and private "
-"key. The CAPTCHA will not display unless a valid API key is included."
+"If you will not be changing these settings, you can turn off these warning "
+"messages by checking the \"Ignore warning messages\" in the settings below."
msgstr ""
-#: admin/dialogs.php:157
+#: admin/dialogs.php:169
msgid "Version:"
msgstr ""
-#: admin/dialogs.php:158
+#: admin/dialogs.php:170
msgid "Quick Start Guide"
msgstr ""
-#: admin/dialogs.php:159
+#: admin/dialogs.php:171
msgid "Online User Guide"
msgstr ""
-#: admin/dialogs.php:160
+#: admin/dialogs.php:172
msgid "FAQs"
msgstr ""
-#: admin/dialogs.php:167
+#: admin/dialogs.php:179
msgid "Thank you for using WP-Members"
msgstr ""
-#: admin/dialogs.php:168
+#: admin/dialogs.php:180
msgid "A plugin developed by"
msgstr ""
-#: admin/dialogs.php:169
+#: admin/dialogs.php:181
msgid "Follow"
msgstr ""
-#: admin/dialogs.php:186 admin/dialogs.php:190
+#: admin/dialogs.php:198 admin/dialogs.php:202
msgid "Latest from RocketGeek"
msgstr ""
-#: admin/dialogs.php:207 admin/dialogs.php:220
+#: admin/dialogs.php:219 admin/dialogs.php:232
msgid "Latest from ButlerBlog"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:220
+#: admin/includes/class-wp-members-admin-api.php:249
+msgid "Custom email"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:250
+#: admin/includes/class-wp-members-admin-api.php:252
+msgid "Subject"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:253
+msgid "Body"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:255
+msgid "Your custom email message content."
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:333
msgid "Options"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:221
+#: admin/includes/class-wp-members-admin-api.php:334
msgid "Fields"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:222
+#: admin/includes/class-wp-members-admin-api.php:335
msgid "Dialogs"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:223
+#: admin/includes/class-wp-members-admin-api.php:336
msgid "Emails"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:239
+#: admin/includes/class-wp-members-admin-api.php:352
msgid "New Registration"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:248
+#: admin/includes/class-wp-members-admin-api.php:361
msgid "Registration is Moderated"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:254
+#: admin/includes/class-wp-members-admin-api.php:367
msgid "Registration is Moderated, User is Approved"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:262
+#: admin/includes/class-wp-members-admin-api.php:375
msgid "Password Reset"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:269
+#: admin/includes/class-wp-members-admin-api.php:382
msgid "Retrieve Username"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:277
+#: admin/includes/class-wp-members-admin-api.php:390
msgid "Admin Notification"
msgstr ""
-#: admin/post.php:51 admin/post.php:53 admin/tab-options.php:87
+#: admin/includes/class-wp-members-admin-api.php:416
+msgid "Restricted post (or page), displays above the login/registration form"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:417
+msgid "Username is taken"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:418
+msgid "Email is registered"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:419
+msgid "Registration completed"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:420
+msgid "User update"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:421
+msgid "Passwords did not match"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:422
+msgid "Password changes"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:423
+msgid "Username or email do not exist when trying to reset forgotten password"
+msgstr ""
+
+#: admin/includes/class-wp-members-admin-api.php:424
+msgid "Password reset"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:41
+msgid "Slug"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:42
+msgid "Role"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:43
+#: admin/includes/class-wp-members-products-admin.php:140
+#: admin/tab-fields.php:430 admin/user-export.php:86
+msgid "Expires"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:44
+msgid "Last updated"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:64
+msgid "No role required"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:69
+msgid "Does not expire"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:104
+msgid "Membership Product Details"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:120
+#: admin/includes/class-wp-members-products-admin.php:144
+msgid "Period"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:120
+msgid "Day"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:120
+msgid "Week"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:120
+msgid "Month"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:120
+msgid "Year"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:126
+msgid "Name (slug)"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:131
+msgid "Role Required?"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:134
+msgid "No Role"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:142
+#: admin/includes/class-wp-members-products-admin.php:143
+msgid "Number"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:216
+#: admin/tab-options.php:188 inc/class-wp-members-forms.php:934
+#: inc/class-wp-members-user-profile.php:92 inc/deprecated.php:360
+#: inc/deprecated.php:622
+msgid "None"
+msgstr ""
+
+#: admin/includes/class-wp-members-products-admin.php:222
+msgid "Limit access to:"
+msgstr ""
+
+#: admin/post.php:45 admin/post.php:47 admin/tab-options.php:95
msgid "Block"
msgstr ""
-#: admin/post.php:52 admin/post.php:54
+#: admin/post.php:46 admin/post.php:48
msgid "Unblock"
msgstr ""
-#: admin/post.php:188
+#: admin/post.php:143
#, php-format
-msgid "%s Restriction"
+msgid "%s blocked"
msgstr ""
-#: admin/post.php:215
+#: admin/post.php:143
#, php-format
-msgid "%s are blocked by default."
+msgid "%s unblocked"
msgstr ""
-#: admin/post.php:216
+#: admin/post.php:182
#, php-format
-msgid "Unblock this %s"
+msgid "%s Restriction"
msgstr ""
-#: admin/post.php:219
+#: admin/post.php:210
#, php-format
-msgid "%s are not blocked by default."
+msgid "%s are blocked by default."
msgstr ""
-#: admin/post.php:220
+#: admin/post.php:214
#, php-format
-msgid "Block this %s"
+msgid "%s are not blocked by default."
msgstr ""
-#: admin/post.php:226 admin/tab-fields.php:282 admin/tab-fields.php:473
+#: admin/post.php:220 admin/tab-fields.php:88 admin/tab-fields.php:523
msgid "Edit"
msgstr ""
-#: admin/post.php:313
+#: admin/post.php:311
msgid "Unblocked?"
msgstr ""
-#: admin/post.php:313
+#: admin/post.php:311
msgid "Blocked?"
msgstr ""
-#: admin/post.php:345 admin/post.php:346 admin/user-export.php:108
-msgid "Yes"
+#: admin/tab-about.php:34 admin/tab-about.php:56
+msgid "About WP-Members"
msgstr ""
-#: admin/tab-captcha.php:42 admin/tab-dialogs.php:47 admin/tab-emails.php:80
-#: admin/tab-fields.php:44 admin/tab-options.php:58
+#: admin/tab-captcha.php:74 admin/tab-dialogs.php:40 admin/tab-emails.php:84
+#: admin/tab-fields.php:149 admin/tab-options.php:64
msgid "Need help?"
msgstr ""
-#: admin/tab-captcha.php:53
+#: admin/tab-captcha.php:85
msgid "Manage reCAPTCHA Options"
msgstr ""
-#: admin/tab-captcha.php:67
+#: admin/tab-captcha.php:99
msgid ""
"reCAPTCHA is a free, accessible CAPTCHA service that helps to digitize books "
"while blocking spam on your blog."
msgstr ""
-#: admin/tab-captcha.php:68
+#: admin/tab-captcha.php:100
#, php-format
msgid ""
"reCAPTCHA asks commenters to retype two words scanned from a book to prove "
@@ -269,1045 +402,1241 @@ msgid ""
"the %s reCAPTCHA website%s"
msgstr ""
-#: admin/tab-captcha.php:73 admin/tab-captcha.php:99
+#: admin/tab-captcha.php:105 admin/tab-captcha.php:131
msgid "reCAPTCHA Keys"
msgstr ""
-#: admin/tab-captcha.php:75
+#: admin/tab-captcha.php:107
#, php-format
msgid ""
"reCAPTCHA requires an API key, consisting of a \"public\" and a \"private\" "
"key. You can sign up for a %s free reCAPTCHA key%s"
msgstr ""
-#: admin/tab-captcha.php:76
+#: admin/tab-captcha.php:108
msgid "Public Key"
msgstr ""
-#: admin/tab-captcha.php:77
+#: admin/tab-captcha.php:109
msgid "Private Key"
msgstr ""
-#: admin/tab-captcha.php:81
+#: admin/tab-captcha.php:113
msgid "Choose Theme"
msgstr ""
-#: admin/tab-captcha.php:84
+#: admin/tab-captcha.php:116
msgid "Red"
msgstr ""
-#: admin/tab-captcha.php:85
+#: admin/tab-captcha.php:117
msgid "White"
msgstr ""
-#: admin/tab-captcha.php:86
+#: admin/tab-captcha.php:118
msgid "Black Glass"
msgstr ""
-#: admin/tab-captcha.php:87
+#: admin/tab-captcha.php:119
msgid "Clean"
msgstr ""
-#: admin/tab-captcha.php:101
+#: admin/tab-captcha.php:133
#, php-format
msgid ""
"reCAPTCHA requires an API key, consisting of a \"site\" and a \"secret\" "
"key. You can sign up for a %s free reCAPTCHA key%s"
msgstr ""
-#: admin/tab-captcha.php:102
+#: admin/tab-captcha.php:134
msgid "Site Key"
msgstr ""
-#: admin/tab-captcha.php:103
+#: admin/tab-captcha.php:135
msgid "Secret Key"
msgstr ""
-#: admin/tab-captcha.php:134
+#: admin/tab-captcha.php:166
msgid "Characters for image"
msgstr ""
-#: admin/tab-captcha.php:138
+#: admin/tab-captcha.php:170
msgid "Number of characters"
msgstr ""
-#: admin/tab-captcha.php:142
+#: admin/tab-captcha.php:174
msgid "Image dimensions"
msgstr ""
-#: admin/tab-captcha.php:143
+#: admin/tab-captcha.php:175
msgid "Width"
msgstr ""
-#: admin/tab-captcha.php:143
+#: admin/tab-captcha.php:175
msgid "Height"
msgstr ""
-#: admin/tab-captcha.php:146
+#: admin/tab-captcha.php:178
msgid "Font color of characters"
msgstr ""
-#: admin/tab-captcha.php:150
+#: admin/tab-captcha.php:182
msgid "Background color of image"
msgstr ""
-#: admin/tab-captcha.php:154
+#: admin/tab-captcha.php:186
msgid "Font size"
msgstr ""
-#: admin/tab-captcha.php:158
+#: admin/tab-captcha.php:190
msgid "Width between characters"
msgstr ""
-#: admin/tab-captcha.php:162
+#: admin/tab-captcha.php:194
msgid "Image type"
msgstr ""
-#: admin/tab-captcha.php:176
+#: admin/tab-captcha.php:208
msgid ""
"To use Really Simple CAPTCHA, you must have the Really Simple CAPTCHA plugin "
"installed and activated."
msgstr ""
-#: admin/tab-captcha.php:200
+#: admin/tab-captcha.php:232
msgid "Update CAPTCHA Settings"
msgstr ""
-#: admin/tab-captcha.php:271
+#: admin/tab-captcha.php:302
msgid "CAPTCHA was updated for WP-Members"
msgstr ""
-#: admin/tab-dialogs.php:32
-msgid "Restricted post (or page), displays above the login/registration form"
+#: admin/tab-dialogs.php:50
+msgid "Dialogs and Error Messages"
msgstr ""
-#: admin/tab-dialogs.php:33
-msgid "Username is taken"
+#: admin/tab-dialogs.php:52
+#, php-format
+msgid ""
+"You can customize the text for dialogs and error messages. Simple HTML is "
+"allowed %s etc."
msgstr ""
-#: admin/tab-dialogs.php:34
-msgid "Email is registered"
+#: admin/tab-dialogs.php:63
+msgid "Terms of Service (TOS)"
msgstr ""
-#: admin/tab-dialogs.php:35
-msgid "Registration completed"
+#: admin/tab-dialogs.php:70
+msgid "Update Dialogs"
msgstr ""
-#: admin/tab-dialogs.php:36
-msgid "User update"
+#: admin/tab-dialogs.php:106
+msgid "WP-Members dialogs were updated"
msgstr ""
-#: admin/tab-dialogs.php:37
-msgid "Passwords did not match"
+#: admin/tab-dropins.php:79 admin/tab-dropins.php:378
+msgid "WP-Members Dropin settings were updated"
msgstr ""
-#: admin/tab-dialogs.php:38
-msgid "Password changes"
+#: admin/tab-dropins.php:204
+msgid "Manage Dropins"
msgstr ""
-#: admin/tab-dialogs.php:39
-msgid "Username or email do not exist when trying to reset forgotten password"
+#: admin/tab-dropins.php:205
+msgid "Current dropin folder: "
msgstr ""
-#: admin/tab-dialogs.php:40
-msgid "Password reset"
+#: admin/tab-dropins.php:206
+msgid ""
+"You can change location of the dropin folder using the "
+"wpmem_dropin_folder filter."
msgstr ""
-#: admin/tab-dialogs.php:57
-msgid "Dialogs and Error Messages"
+#: admin/tab-dropins.php:269
+msgid "Name"
msgstr ""
-#: admin/tab-dialogs.php:59
-#, php-format
-msgid ""
-"You can customize the text for dialogs and error messages. Simple HTML is "
-"allowed %s etc."
+#: admin/tab-dropins.php:270
+msgid "File"
msgstr ""
-#: admin/tab-dialogs.php:72
-msgid "Terms of Service (TOS)"
+#: admin/tab-dropins.php:271
+msgid "Version"
msgstr ""
-#: admin/tab-dialogs.php:79
-msgid "Update Dialogs"
+#: admin/tab-dropins.php:272
+msgid "Description"
msgstr ""
-#: admin/tab-dialogs.php:118
-msgid "WP-Members dialogs were updated"
+#: admin/tab-dropins.php:315 admin/tab-fields.php:568
+msgid "Save Settings"
msgstr ""
-#: admin/tab-emails.php:37
+#: admin/tab-emails.php:41
msgid "Email Messages"
msgstr ""
-#: admin/tab-emails.php:40
+#: admin/tab-emails.php:44
msgid "You can customize the content of the emails sent by the plugin."
msgstr ""
-#: admin/tab-emails.php:42
+#: admin/tab-emails.php:46
msgid "A list of shortcodes is available here."
msgstr ""
-#: admin/tab-emails.php:49
+#: admin/tab-emails.php:53
msgid "Set a custom email address"
msgstr ""
-#: admin/tab-emails.php:50 admin/tab-emails.php:54 admin/tab-emails.php:64
+#: admin/tab-emails.php:54 admin/tab-emails.php:58 admin/tab-emails.php:68
+#: admin/tab-fields.php:175
msgid "(optional)"
msgstr ""
-#: admin/tab-emails.php:53
+#: admin/tab-emails.php:57
msgid "Set a custom email name"
msgstr ""
-#: admin/tab-emails.php:64
+#: admin/tab-emails.php:68
msgid "Email Signature"
msgstr ""
-#: admin/tab-emails.php:72
+#: admin/tab-emails.php:76
msgid "Update Emails"
msgstr ""
-#: admin/tab-emails.php:140
+#: admin/tab-emails.php:146
msgid "WP-Members emails were updated"
msgstr ""
-#: admin/tab-fields.php:169
-msgid "WP-Members fields were updated"
+#: admin/tab-fields.php:110
+msgid "Are you sure you want to delete the following fields?"
msgstr ""
-#: admin/tab-fields.php:181
-msgid "Field Label is required for adding a new field. Nothing was updated."
+#: admin/tab-fields.php:137
+msgid "Fields deleted"
msgstr ""
-#: admin/tab-fields.php:182
-msgid "Option Name is required for adding a new field. Nothing was updated."
+#: admin/tab-fields.php:151
+msgid "Field Manager Documentation"
msgstr ""
-#: admin/tab-fields.php:184
-msgid "Option Name must contain only letters, numbers, and underscores"
-msgstr ""
-
-#: admin/tab-fields.php:191
-msgid "A field with that option name already exists"
-msgstr ""
-
-#: admin/tab-fields.php:197
-#, php-format
-msgid ""
-"Sorry, \"%s\" is a reserved term. "
-"Field was not added."
-msgstr ""
-
-#: admin/tab-fields.php:215
-msgid "Checked value is required for checkboxes. Nothing was updated."
-msgstr ""
-
-#: admin/tab-fields.php:245
-msgid "field was added"
-msgstr ""
-
-#: admin/tab-fields.php:263
-msgid "field was updated"
+#: admin/tab-fields.php:176 admin/tab-fields.php:293
+#: inc/class-wp-members-user-profile.php:124 inc/deprecated.php:385
+#: inc/deprecated.php:646 inc/wp-registration.php:54
+#: inc/wp-registration.php:213
+msgid "(required)"
msgstr ""
-#: admin/tab-fields.php:309 admin/tab-fields.php:437
+#: admin/tab-fields.php:181 admin/tab-fields.php:378
msgid "Edit Field"
msgstr ""
-#: admin/tab-fields.php:309
+#: admin/tab-fields.php:181
msgid "Add a Field"
msgstr ""
-#: admin/tab-fields.php:315 admin/tab-fields.php:467
+#: admin/tab-fields.php:186
msgid "Field Label"
msgstr ""
-#: admin/tab-fields.php:317
+#: admin/tab-fields.php:188
msgid "The name of the field as it will be displayed to the user."
msgstr ""
-#: admin/tab-fields.php:320 admin/tab-fields.php:468
-msgid "Option Name"
+#: admin/tab-fields.php:191 admin/tab-fields.php:518
+msgid "Meta Key"
msgstr ""
-#: admin/tab-fields.php:326
+#: admin/tab-fields.php:197
msgid ""
"The database meta value for the field. It must be unique and contain no "
"spaces (underscores are ok)."
msgstr ""
-#: admin/tab-fields.php:330 admin/tab-fields.php:469
+#: admin/tab-fields.php:201 admin/tab-fields.php:519
msgid "Field Type"
msgstr ""
-#: admin/tab-fields.php:336
+#: admin/tab-fields.php:207
msgid "text"
msgstr ""
-#: admin/tab-fields.php:337
+#: admin/tab-fields.php:208
msgid "email"
msgstr ""
-#: admin/tab-fields.php:338
+#: admin/tab-fields.php:209
msgid "textarea"
msgstr ""
-#: admin/tab-fields.php:339
+#: admin/tab-fields.php:210
msgid "checkbox"
msgstr ""
-#: admin/tab-fields.php:340
+#: admin/tab-fields.php:211
msgid "multiple checkbox"
msgstr ""
-#: admin/tab-fields.php:341
+#: admin/tab-fields.php:212
msgid "select (dropdown)"
msgstr ""
-#: admin/tab-fields.php:342
+#: admin/tab-fields.php:213
msgid "multiple select"
msgstr ""
-#: admin/tab-fields.php:343
+#: admin/tab-fields.php:214
msgid "radio group"
msgstr ""
-#: admin/tab-fields.php:344
+#: admin/tab-fields.php:215
msgid "password"
msgstr ""
-#: admin/tab-fields.php:345
+#: admin/tab-fields.php:216
msgid "image"
msgstr ""
-#: admin/tab-fields.php:346
+#: admin/tab-fields.php:217
msgid "file"
msgstr ""
-#: admin/tab-fields.php:347
+#: admin/tab-fields.php:218
msgid "url"
msgstr ""
-#: admin/tab-fields.php:348
+#: admin/tab-fields.php:219
+msgid "number"
+msgstr ""
+
+#: admin/tab-fields.php:220
+msgid "date"
+msgstr ""
+
+#: admin/tab-fields.php:221
msgid "hidden"
msgstr ""
-#: admin/tab-fields.php:353 admin/tab-fields.php:470
+#: admin/tab-fields.php:226 admin/tab-fields.php:520
msgid "Display?"
msgstr ""
-#: admin/tab-fields.php:357 admin/tab-fields.php:471
+#: admin/tab-fields.php:230 admin/tab-fields.php:521
msgid "Required?"
msgstr ""
-#: admin/tab-fields.php:363
-msgid "Additional information for field upload fields"
+#: admin/tab-fields.php:235
+msgid "Allow HTML?"
msgstr ""
-#: admin/tab-fields.php:366
-msgid "Accepted file types:"
+#: admin/tab-fields.php:242
+msgid "Placeholder"
msgstr ""
-#: admin/tab-fields.php:371
-msgid "Accepted file types should be set like this: jpg|jpeg|png|gif"
+#: admin/tab-fields.php:250
+msgid "Pattern"
+msgstr ""
+
+#: admin/tab-fields.php:256
+msgid "Title"
+msgstr ""
+
+#: admin/tab-fields.php:265
+msgid "Minimum Value"
msgstr ""
-#: admin/tab-fields.php:378
-msgid "Additional information for checkbox fields"
+#: admin/tab-fields.php:269
+msgid "Maximum Value"
msgstr ""
-#: admin/tab-fields.php:381
+#: admin/tab-fields.php:277
+msgid "Accepted file types:"
+msgstr ""
+
+#: admin/tab-fields.php:282
+msgid "Accepted file types should be set like this: jpg|jpeg|png|gif"
+msgstr ""
+
+#: admin/tab-fields.php:289
msgid "Checked by default?"
msgstr ""
-#: admin/tab-fields.php:385
+#: admin/tab-fields.php:293
msgid "Stored value if checked:"
msgstr ""
-#: admin/tab-fields.php:397
-msgid "Additional information for dropdown fields"
+#: admin/tab-fields.php:314
+msgid "Stored values delimiter:"
msgstr ""
-#: admin/tab-fields.php:400
-msgid "For dropdown, array of values:"
+#: admin/tab-fields.php:323
+msgid "Values (Displayed|Stored):"
msgstr ""
-#: admin/tab-fields.php:425
+#: admin/tab-fields.php:348
msgid "Options should be Option Name|option_value,"
msgstr ""
-#: admin/tab-fields.php:429
+#: admin/tab-fields.php:352
msgid "Visit plugin site for more information"
msgstr ""
-#: admin/tab-fields.php:437
+#: admin/tab-fields.php:359
+msgid "Value"
+msgstr ""
+
+#: admin/tab-fields.php:378 admin/tab-fields.php:645 admin/tab-fields.php:646
msgid "Add Field"
msgstr ""
-#: admin/tab-fields.php:458
-msgid "Manage Fields"
+#: admin/tab-fields.php:380 admin/tab-fields.php:831
+msgid "Return to Fields Table"
msgstr ""
-#: admin/tab-fields.php:460
-msgid ""
-"Determine which fields will display and which are required. This includes "
-"all fields, both native WP fields and WP-Members custom fields."
+#: admin/tab-fields.php:420
+msgid "Drag and drop to reorder fields"
+msgstr ""
+
+#: admin/tab-fields.php:426
+msgid "Registration Date"
+msgstr ""
+
+#: admin/tab-fields.php:427
+msgid "Active"
+msgstr ""
+
+#: admin/tab-fields.php:428
+msgid "Registration IP"
msgstr ""
-#: admin/tab-fields.php:461
-msgid "(Note: Email is always mandatory and cannot be changed.)"
+#: admin/tab-fields.php:429
+msgid "Subscription Type"
msgstr ""
-#: admin/tab-fields.php:466
-msgid "Add/Delete"
+#: admin/tab-fields.php:431
+msgid "User ID"
msgstr ""
-#: admin/tab-fields.php:472
-msgid "Checked?"
+#: admin/tab-fields.php:464
+msgid "Manage Fields"
msgstr ""
-#: admin/tab-fields.php:474
+#: admin/tab-fields.php:503
+msgid "delete"
+msgstr ""
+
+#: admin/tab-fields.php:517
+msgid "Display Label"
+msgstr ""
+
+#: admin/tab-fields.php:524
msgid "Users Screen"
msgstr ""
-#: admin/tab-fields.php:486
-msgid "Delete"
+#: admin/tab-fields.php:525
+msgid "Users Search"
msgstr ""
-#: admin/tab-fields.php:498
-msgid "(Email cannot be removed)"
+#: admin/tab-fields.php:567
+msgid "Delete Selected"
msgstr ""
-#: admin/tab-fields.php:518
-msgid "Registration Date"
+#: admin/tab-fields.php:709
+msgid "WP-Members fields were updated"
msgstr ""
-#: admin/tab-fields.php:521
-msgid "native"
+#: admin/tab-fields.php:731
+msgid "Field Label is required. Nothing was updated."
msgstr ""
-#: admin/tab-fields.php:531
-msgid "Active"
+#: admin/tab-fields.php:732
+msgid "Meta Key is required. Nothing was updated."
msgstr ""
-#: admin/tab-fields.php:543
-msgid "Registration IP"
+#: admin/tab-fields.php:734
+msgid "Meta Key must contain only letters, numbers, and underscores"
msgstr ""
-#: admin/tab-fields.php:578
-msgid "Update Fields"
+#: admin/tab-fields.php:741
+msgid "A field with that meta key already exists"
msgstr ""
-#: admin/tab-options.php:69
+#: admin/tab-fields.php:746
+#, php-format
+msgid ""
+"Sorry, \"%s\" is a reserved term. "
+"Field was not added."
+msgstr ""
+
+#: admin/tab-fields.php:779
+msgid "Checked value is required for checkboxes. Nothing was updated."
+msgstr ""
+
+#: admin/tab-fields.php:810
+msgid "A value is required for hidden fields. Nothing was updated."
+msgstr ""
+
+#: admin/tab-fields.php:817
+#, php-format
+msgid "%s was added"
+msgstr ""
+
+#: admin/tab-fields.php:830
+#, php-format
+msgid "%s was updated"
+msgstr ""
+
+#: admin/tab-fields.php:872
+msgid "Form field order updated."
+msgstr ""
+
+#: admin/tab-options.php:75
msgid "Manage Options"
msgstr ""
-#: admin/tab-options.php:86
+#: admin/tab-options.php:79
+msgid "Content"
+msgstr ""
+
+#: admin/tab-options.php:90
+msgid "Content Blocking"
+msgstr ""
+
+#: admin/tab-options.php:94
msgid "Do not block"
msgstr ""
-#: admin/tab-options.php:88
+#: admin/tab-options.php:96
msgid "Hide"
msgstr ""
-#: admin/tab-options.php:99
+#: admin/tab-options.php:108
msgid "Show Excerpts"
msgstr ""
-#: admin/tab-options.php:100
+#: admin/tab-options.php:109
msgid "Show Login Form"
msgstr ""
-#: admin/tab-options.php:101
+#: admin/tab-options.php:110
msgid "Show Registration Form"
msgstr ""
-#: admin/tab-options.php:102
+#: admin/tab-options.php:111
msgid "Auto Excerpt:"
msgstr ""
-#: admin/tab-options.php:122
+#: admin/tab-options.php:133
msgid "Number of words in excerpt:"
msgstr ""
-#: admin/tab-options.php:136
+#: admin/tab-options.php:134
+msgid "Custom read more link (optional):"
+msgstr ""
+
+#: admin/tab-options.php:148
msgid "Time-based expiration"
msgstr ""
-#: admin/tab-options.php:136
+#: admin/tab-options.php:148
msgid "Allows for access to expire"
msgstr ""
-#: admin/tab-options.php:137
+#: admin/tab-options.php:149
msgid "Trial period"
msgstr ""
-#: admin/tab-options.php:137
+#: admin/tab-options.php:149
msgid "Allows for a trial period"
msgstr ""
-#: admin/tab-options.php:153
+#: admin/tab-options.php:151
+msgid "Subscription Settings"
+msgstr ""
+
+#: admin/tab-options.php:161
+msgid "Other Settings"
+msgstr ""
+
+#: admin/tab-options.php:167
+msgid "Enable Products"
+msgstr ""
+
+#: admin/tab-options.php:167
+msgid "Enables creation of different membership products"
+msgstr ""
+
+#: admin/tab-options.php:168
+msgid "Clone menus"
+msgstr ""
+
+#: admin/tab-options.php:168
+msgid "Enables logged in menus"
+msgstr ""
+
+#: admin/tab-options.php:169
msgid "Notify admin"
msgstr ""
-#: admin/tab-options.php:153
+#: admin/tab-options.php:169
#, php-format
msgid "Notify %s for each new registration? %s"
msgstr ""
-#: admin/tab-options.php:154
+#: admin/tab-options.php:170
msgid "Moderate registration"
msgstr ""
-#: admin/tab-options.php:154
+#: admin/tab-options.php:170
msgid "Holds new registrations for admin approval"
msgstr ""
-#: admin/tab-options.php:155
+#: admin/tab-options.php:171
msgid "Ignore warning messages"
msgstr ""
-#: admin/tab-options.php:155
+#: admin/tab-options.php:171
msgid "Ignores WP-Members warning messages in the admin panel"
msgstr ""
-#: admin/tab-options.php:167
+#: admin/tab-options.php:182
msgid "Attribution"
msgstr ""
-#: admin/tab-options.php:169
+#: admin/tab-options.php:184
msgid ""
"Attribution is appreciated! Display \"powered by\" link on register form?"
msgstr ""
-#: admin/tab-options.php:172
+#: admin/tab-options.php:187
msgid "Enable CAPTCHA"
msgstr ""
-#: admin/tab-options.php:174 admin/user-profile.php:97 inc/forms.php:806
-#: inc/users.php:70
-msgid "None"
+#: admin/tab-options.php:192
+msgid "reCAPTCHA"
msgstr ""
-#: admin/tab-options.php:180
+#: admin/tab-options.php:193
+msgid "Really Simple CAPTCHA"
+msgstr ""
+
+#: admin/tab-options.php:196
msgid "Pages"
msgstr ""
-#: admin/tab-options.php:184
+#: admin/tab-options.php:200
msgid "Login Page:"
msgstr ""
-#: admin/tab-options.php:187
+#: admin/tab-options.php:203
msgid "Specify a login page (optional)"
msgstr ""
-#: admin/tab-options.php:196
+#: admin/tab-options.php:212
msgid "Register Page:"
msgstr ""
-#: admin/tab-options.php:199
+#: admin/tab-options.php:215
msgid "For creating a register link in the login form"
msgstr ""
-#: admin/tab-options.php:208
+#: admin/tab-options.php:224
msgid "User Profile Page:"
msgstr ""
-#: admin/tab-options.php:211
+#: admin/tab-options.php:227
msgid "For creating a forgot password link in the login form"
msgstr ""
-#: admin/tab-options.php:217 admin/tab-options.php:219
+#: admin/tab-options.php:233 admin/tab-options.php:235
msgid "Stylesheet"
msgstr ""
-#: admin/tab-options.php:228
+#: admin/tab-options.php:244
msgid "Custom Stylesheet:"
msgstr ""
-#: admin/tab-options.php:234 admin/tab-options.php:260
+#: admin/tab-options.php:249 admin/tab-options.php:276
msgid "Update Settings"
msgstr ""
-#: admin/tab-options.php:241
+#: admin/tab-options.php:257
msgid "Custom Post Types"
msgstr ""
-#: admin/tab-options.php:342
+#: admin/tab-options.php:263
+msgid "Add to WP-Members Settings"
+msgstr ""
+
+#: admin/tab-options.php:360
msgid "Custom Post Type settings were updated"
msgstr ""
-#: admin/tab-options.php:460
+#: admin/tab-options.php:481
msgid "WP-Members settings were updated"
msgstr ""
-#: admin/tab-options.php:530 admin/tab-options.php:559
+#: admin/tab-options.php:551 admin/tab-options.php:581
msgid "USE CUSTOM URL BELOW"
msgstr ""
-#: admin/tab-options.php:548
+#: admin/tab-options.php:570
msgid "Select a page"
msgstr ""
-#: admin/user-export.php:72
+#: admin/user-export.php:81
msgid "Activated?"
msgstr ""
-#: admin/user-export.php:73
+#: admin/user-export.php:85
msgid "Subscription"
msgstr ""
-#: admin/user-export.php:73
-msgid "Expires"
-msgstr ""
-
-#: admin/user-export.php:75
+#: admin/user-export.php:89
msgid "Registered"
msgstr ""
-#: admin/user-export.php:76
+#: admin/user-export.php:90
msgid "IP"
msgstr ""
-#: admin/user-export.php:108 admin/users.php:336
-msgid "No"
-msgstr ""
-
-#: admin/user-profile.php:52
-msgid "WP-Members Additional Fields"
+#: admin/user-export.php:120
+msgid "Yes"
msgstr ""
-#: admin/user-profile.php:115 inc/users.php:90 inc/wp-registration.php:37
-#: inc/wp-registration.php:154
-msgid "(required)"
+#: admin/user-export.php:120 admin/users.php:404
+msgid "No"
msgstr ""
-#: admin/user-profile.php:283
+#: admin/user-profile.php:43 inc/wp-registration.php:278
msgid "Activate this user?"
msgstr ""
-#: admin/user-profile.php:288
+#: admin/user-profile.php:48
msgid "Reactivate this user?"
msgstr ""
-#: admin/user-profile.php:293
+#: admin/user-profile.php:53
msgid "Deactivate this user?"
msgstr ""
-#: admin/user-profile.php:339
+#: admin/user-profile.php:101
msgid "IP @ registration"
msgstr ""
-#: admin/users.php:59 admin/users.php:63
+#: admin/users.php:48 admin/users.php:52 admin/users.php:79
msgid "Activate"
msgstr ""
-#: admin/users.php:61 admin/users.php:65
+#: admin/users.php:50 admin/users.php:54
msgid "Export"
msgstr ""
-#: admin/users.php:66 admin/users.php:107
+#: admin/users.php:55 admin/users.php:103
msgid "Export All Users"
msgstr ""
-#: inc/class-wp-members-widget.php:18
+#: admin/users.php:148
+#, php-format
+msgid "%s users activated"
+msgstr ""
+
+#: admin/users.php:151
+msgid "No users selected"
+msgstr ""
+
+#: admin/users.php:175
+#, php-format
+msgid "%s activated"
+msgstr ""
+
+#: admin/users.php:180
+msgid "That user is already active"
+msgstr ""
+
+#: inc/api.php:495 inc/class-wp-members.php:1272
+msgid "log in"
+msgstr ""
+
+#: inc/api.php:496
+msgid "log out"
+msgstr ""
+
+#: inc/class-wp-members-products.php:89
+msgid "Product"
+msgstr ""
+
+#: inc/class-wp-members-products.php:90
+msgid "Products"
+msgstr ""
+
+#: inc/class-wp-members-products.php:95
+msgid "Memberships"
+msgstr ""
+
+#: inc/class-wp-members-products.php:96
+#, php-format
+msgid "All %s"
+msgstr ""
+
+#: inc/class-wp-members-products.php:97
+#, php-format
+msgid "Add New %s"
+msgstr ""
+
+#: inc/class-wp-members-products.php:98
+msgid "Add New"
+msgstr ""
+
+#: inc/class-wp-members-products.php:99
+#, php-format
+msgid "New %s"
+msgstr ""
+
+#: inc/class-wp-members-products.php:100
+#, php-format
+msgid "Edit %s"
+msgstr ""
+
+#: inc/class-wp-members-products.php:101
+#, php-format
+msgid "Update %s"
+msgstr ""
+
+#: inc/class-wp-members-products.php:102 inc/class-wp-members-products.php:103
+#, php-format
+msgid "View %s"
+msgstr ""
+
+#: inc/class-wp-members-products.php:104
+#, php-format
+msgid "Search %s"
+msgstr ""
+
+#: inc/class-wp-members-products.php:105
+msgid "Not found"
+msgstr ""
+
+#: inc/class-wp-members-products.php:106
+msgid "Not found in Trash"
+msgstr ""
+
+#: inc/class-wp-members-products.php:107
+msgid "Insert into item"
+msgstr ""
+
+#: inc/class-wp-members-products.php:108
+#, php-format
+msgid "Save %s Details"
+msgstr ""
+
+#: inc/class-wp-members-products.php:111
+msgid "Membership Product"
+msgstr ""
+
+#: inc/class-wp-members-products.php:112
+msgid "WP-Members Membership Products"
+msgstr ""
+
+#: inc/class-wp-members-user-profile.php:37 inc/deprecated.php:315
+msgid "WP-Members Additional Fields"
+msgstr ""
+
+#: inc/class-wp-members-user-profile.php:37 inc/deprecated.php:589
+msgid "Additional Information"
+msgstr ""
+
+#: inc/class-wp-members-user.php:532
+msgid "ERROR: User has not been activated."
+msgstr ""
+
+#: inc/class-wp-members-widget.php:24
msgid "Displays the WP-Members sidebar login."
msgstr ""
-#: inc/class-wp-members-widget.php:33 inc/class-wp-members-widget.php:76
+#: inc/class-wp-members-widget.php:39 inc/class-wp-members-widget.php:82
msgid "Login Status"
msgstr ""
-#: inc/class-wp-members-widget.php:40
+#: inc/class-wp-members-widget.php:46
msgid "Title:"
msgstr ""
-#: inc/class-wp-members-widget.php:44
+#: inc/class-wp-members-widget.php:50
msgid "Redirect to (optional):"
msgstr ""
-#: inc/class-wp-members.php:388 inc/shortcodes.php:117 inc/shortcodes.php:386
+#: inc/class-wp-members.php:757 inc/deprecated.php:180 inc/shortcodes.php:97
+#: inc/shortcodes.php:325
msgid "There was an error with the CAPTCHA form."
msgstr ""
-#: inc/class-wp-members.php:546
+#: inc/class-wp-members.php:1171
msgid "First Name"
msgstr ""
-#: inc/class-wp-members.php:547
+#: inc/class-wp-members.php:1172
msgid "Last Name"
msgstr ""
-#: inc/class-wp-members.php:548
+#: inc/class-wp-members.php:1173
msgid "Address 1"
msgstr ""
-#: inc/class-wp-members.php:549
+#: inc/class-wp-members.php:1174
msgid "Address 2"
msgstr ""
-#: inc/class-wp-members.php:550
+#: inc/class-wp-members.php:1175
msgid "City"
msgstr ""
-#: inc/class-wp-members.php:551
+#: inc/class-wp-members.php:1176
msgid "State"
msgstr ""
-#: inc/class-wp-members.php:552
+#: inc/class-wp-members.php:1177
msgid "Zip"
msgstr ""
-#: inc/class-wp-members.php:553
+#: inc/class-wp-members.php:1178
msgid "Country"
msgstr ""
-#: inc/class-wp-members.php:554
+#: inc/class-wp-members.php:1179
msgid "Day Phone"
msgstr ""
-#: inc/class-wp-members.php:555 inc/class-wp-members.php:588
+#: inc/class-wp-members.php:1180 inc/class-wp-members.php:1211
msgid "Email"
msgstr ""
-#: inc/class-wp-members.php:556
+#: inc/class-wp-members.php:1181
msgid "Confirm Email"
msgstr ""
-#: inc/class-wp-members.php:557
+#: inc/class-wp-members.php:1182
msgid "Website"
msgstr ""
-#: inc/class-wp-members.php:558
+#: inc/class-wp-members.php:1183
msgid "Biographical Info"
msgstr ""
-#: inc/class-wp-members.php:559 inc/class-wp-members.php:569
-#: inc/class-wp-members.php:645
+#: inc/class-wp-members.php:1184 inc/class-wp-members.php:1194
+#: inc/class-wp-members.php:1271
msgid "Password"
msgstr ""
-#: inc/class-wp-members.php:560
+#: inc/class-wp-members.php:1185
msgid "Confirm Password"
msgstr ""
-#: inc/class-wp-members.php:561
+#: inc/class-wp-members.php:1186
msgid "TOS"
msgstr ""
-#: inc/class-wp-members.php:567
+#: inc/class-wp-members.php:1192
msgid "Existing Users Log In"
msgstr ""
-#: inc/class-wp-members.php:568 inc/class-wp-members.php:587
-#: inc/class-wp-members.php:608 inc/class-wp-members.php:644
+#: inc/class-wp-members.php:1193 inc/class-wp-members.php:1210
+#: inc/class-wp-members.php:1233 inc/class-wp-members.php:1270
msgid "Username"
msgstr ""
-#: inc/class-wp-members.php:570
+#: inc/class-wp-members.php:1195 inc/shortcodes.php:645
msgid "Log In"
msgstr ""
-#: inc/class-wp-members.php:571
+#: inc/class-wp-members.php:1196
msgid "Remember Me"
msgstr ""
-#: inc/class-wp-members.php:572
+#: inc/class-wp-members.php:1197
msgid "Forgot password?"
msgstr ""
-#: inc/class-wp-members.php:573
+#: inc/class-wp-members.php:1198
msgid "Click here to reset"
msgstr ""
-#: inc/class-wp-members.php:574
+#: inc/class-wp-members.php:1199
msgid "New User?"
msgstr ""
-#: inc/class-wp-members.php:575
+#: inc/class-wp-members.php:1200
msgid "Click here to register"
msgstr ""
-#: inc/class-wp-members.php:576
-msgid "Forgot username?"
-msgstr ""
-
-#: inc/class-wp-members.php:577
-msgid "Click here"
-msgstr ""
-
-#: inc/class-wp-members.php:580 inc/class-wp-members.php:630
+#: inc/class-wp-members.php:1203 inc/class-wp-members.php:1256
msgid "Change Password"
msgstr ""
-#: inc/class-wp-members.php:581
+#: inc/class-wp-members.php:1204
msgid "New password"
msgstr ""
-#: inc/class-wp-members.php:582
+#: inc/class-wp-members.php:1205
msgid "Confirm new password"
msgstr ""
-#: inc/class-wp-members.php:583
+#: inc/class-wp-members.php:1206
msgid "Update Password"
msgstr ""
-#: inc/class-wp-members.php:586
+#: inc/class-wp-members.php:1209
msgid "Reset Forgotten Password"
msgstr ""
-#: inc/class-wp-members.php:589
+#: inc/class-wp-members.php:1212
msgid "Reset Password"
msgstr ""
-#: inc/class-wp-members.php:592 inc/class-wp-members.php:594
+#: inc/class-wp-members.php:1213
+msgid "Forgot username?"
+msgstr ""
+
+#: inc/class-wp-members.php:1214
+msgid "Click here"
+msgstr ""
+
+#: inc/class-wp-members.php:1217 inc/class-wp-members.php:1219
msgid "Retrieve username"
msgstr ""
-#: inc/class-wp-members.php:593
+#: inc/class-wp-members.php:1218
msgid "Email Address"
msgstr ""
-#: inc/class-wp-members.php:597
+#: inc/class-wp-members.php:1222
msgid "New User Registration"
msgstr ""
-#: inc/class-wp-members.php:598
+#: inc/class-wp-members.php:1223
msgid "Choose a Username"
msgstr ""
-#: inc/class-wp-members.php:599
+#: inc/class-wp-members.php:1224
msgid "Input the code:"
msgstr ""
-#: inc/class-wp-members.php:600
+#: inc/class-wp-members.php:1225
#, php-format
msgid "Please indicate that you agree to the %s TOS %s"
msgstr ""
-#: inc/class-wp-members.php:601
+#: inc/class-wp-members.php:1226
msgid "Reset Form"
msgstr ""
-#: inc/class-wp-members.php:602 inc/class-wp-members.php:648 inc/core.php:522
+#: inc/class-wp-members.php:1227 inc/class-wp-members.php:1274
+#: inc/shortcodes.php:642 inc/wp-registration.php:352
msgid "Register"
msgstr ""
-#: inc/class-wp-members.php:604
+#: inc/class-wp-members.php:1229
msgid "Required field"
msgstr ""
-#: inc/class-wp-members.php:607 inc/shortcodes.php:432
+#: inc/class-wp-members.php:1232 inc/deprecated.php:226
msgid "Edit Your Information"
msgstr ""
-#: inc/class-wp-members.php:609
+#: inc/class-wp-members.php:1234
msgid "Update Profile"
msgstr ""
-#: inc/class-wp-members.php:610
+#: inc/class-wp-members.php:1235
msgid "Update this file"
msgstr ""
-#: inc/class-wp-members.php:613
+#: inc/class-wp-members.php:1238
msgid "Login Failed!"
msgstr ""
-#: inc/class-wp-members.php:614
+#: inc/class-wp-members.php:1239
msgid "You entered an invalid username or password."
msgstr ""
-#: inc/class-wp-members.php:615
+#: inc/class-wp-members.php:1240
msgid "Click here to continue."
msgstr ""
-#: inc/class-wp-members.php:616
+#: inc/class-wp-members.php:1241
msgid "Password fields cannot be empty"
msgstr ""
-#: inc/class-wp-members.php:617
+#: inc/class-wp-members.php:1242
msgid "Sorry, that email address was not found."
msgstr ""
-#: inc/class-wp-members.php:618
+#: inc/class-wp-members.php:1243
#, php-format
msgid "An email was sent to %s with your username."
msgstr ""
-#: inc/class-wp-members.php:619
+#: inc/class-wp-members.php:1244
#, php-format
msgid "Sorry, %s is a required field."
msgstr ""
-#: inc/class-wp-members.php:620
+#: inc/class-wp-members.php:1245
msgid "You must enter a valid email address."
msgstr ""
-#: inc/class-wp-members.php:621
+#: inc/class-wp-members.php:1246
msgid "The username cannot include non-alphanumeric characters."
msgstr ""
-#: inc/class-wp-members.php:622
+#: inc/class-wp-members.php:1247
msgid "Sorry, username is a required field"
msgstr ""
-#: inc/class-wp-members.php:623
+#: inc/class-wp-members.php:1248
msgid "Passwords did not match."
msgstr ""
-#: inc/class-wp-members.php:624
+#: inc/class-wp-members.php:1249
msgid "Emails did not match."
msgstr ""
-#: inc/class-wp-members.php:625
+#: inc/class-wp-members.php:1250
msgid "You must complete the CAPTCHA form."
msgstr ""
-#: inc/class-wp-members.php:626
+#: inc/class-wp-members.php:1251
msgid "CAPTCHA was not valid."
msgstr ""
-#: inc/class-wp-members.php:629
+#: inc/class-wp-members.php:1252 inc/register.php:53
+msgid "There was an error processing the form."
+msgstr ""
+
+#: inc/class-wp-members.php:1255
msgid "Edit My Information"
msgstr ""
-#: inc/class-wp-members.php:631 inc/class-wp-members.php:634
-#: inc/class-wp-members.php:636 inc/class-wp-members.php:640
+#: inc/class-wp-members.php:1257 inc/class-wp-members.php:1260
+#: inc/class-wp-members.php:1262 inc/class-wp-members.php:1266
#, php-format
msgid "You are logged in as %s"
msgstr ""
-#: inc/class-wp-members.php:632
+#: inc/class-wp-members.php:1258
msgid "Click to log out."
msgstr ""
-#: inc/class-wp-members.php:633
+#: inc/class-wp-members.php:1259
msgid "Begin using the site."
msgstr ""
-#: inc/class-wp-members.php:635
+#: inc/class-wp-members.php:1261
msgid "Click to log out"
msgstr ""
-#: inc/class-wp-members.php:637
+#: inc/class-wp-members.php:1263
msgid "click to log out"
msgstr ""
-#: inc/class-wp-members.php:641
+#: inc/class-wp-members.php:1267
msgid "click here to log out"
msgstr ""
-#: inc/class-wp-members.php:642
+#: inc/class-wp-members.php:1268
msgid "Login Failed! You entered an invalid username or password."
msgstr ""
-#: inc/class-wp-members.php:643
+#: inc/class-wp-members.php:1269
msgid "You are not logged in."
msgstr ""
-#: inc/class-wp-members.php:646
-msgid "log in"
-msgstr ""
-
-#: inc/class-wp-members.php:647
+#: inc/class-wp-members.php:1273
msgid "Forgot?"
msgstr ""
-#: inc/class-wp-members.php:651
+#: inc/class-wp-members.php:1277
msgid ""
"This content is restricted to site members. If you are an existing user, "
"please log in. New users may register below."
msgstr ""
-#: inc/class-wp-members.php:652
+#: inc/class-wp-members.php:1278
msgid "Sorry, that username is taken, please try another."
msgstr ""
-#: inc/class-wp-members.php:653
+#: inc/class-wp-members.php:1279
msgid ""
"Sorry, that email address already has an account. Please try another."
msgstr ""
-#: inc/class-wp-members.php:654
+#: inc/class-wp-members.php:1280
msgid ""
"Congratulations! Your registration was successful.
You may now "
"log in using the password that was emailed to you."
msgstr ""
-#: inc/class-wp-members.php:655
+#: inc/class-wp-members.php:1281
msgid "Your information was updated!"
msgstr ""
-#: inc/class-wp-members.php:656
+#: inc/class-wp-members.php:1282
msgid "Passwords did not match.
Please try again."
msgstr ""
-#: inc/class-wp-members.php:657
+#: inc/class-wp-members.php:1283
msgid "Password successfully changed!"
msgstr ""
-#: inc/class-wp-members.php:658
+#: inc/class-wp-members.php:1284
msgid "Either the username or email address do not exist in our records."
msgstr ""
-#: inc/class-wp-members.php:659
+#: inc/class-wp-members.php:1285
msgid ""
"Password successfully reset!
An email containing a new password "
"has been sent to the email address on file for your account."
msgstr ""
-#: inc/core.php:106
-msgid "ERROR: User has not been activated."
-msgstr ""
-
-#: inc/register.php:45
-msgid "There was an error processing the form."
-msgstr ""
-
-#: inc/register.php:557
+#: inc/register.php:407
msgid "We were unable to validate the public key."
msgstr ""
-#: inc/register.php:561
+#: inc/register.php:411
msgid "We were unable to validate the private key."
msgstr ""
-#: inc/register.php:565
+#: inc/register.php:415
msgid "The challenge parameter of the verify script was incorrect."
msgstr ""
-#: inc/register.php:569
+#: inc/register.php:419
msgid "The CAPTCHA solution was incorrect."
msgstr ""
-#: inc/register.php:573
+#: inc/register.php:423
msgid "The parameters to verify were incorrect"
msgstr ""
-#: inc/register.php:577
+#: inc/register.php:427
msgid ""
"reCAPTCHA API keys are tied to a specific domain name for security reasons."
msgstr ""
-#: inc/register.php:581
+#: inc/register.php:431
msgid "The reCAPTCHA server was not reached. Please try to resubmit."
msgstr ""
-#: inc/register.php:585
+#: inc/register.php:435
msgid "You have entered an incorrect code value. Please try again."
msgstr ""
-#: inc/shortcodes.php:346
+#: inc/shortcodes.php:576
msgid "Click here to log out."
msgstr ""
-#: inc/users.php:37
-msgid "Additional Information"
-msgstr ""
-
-#: inc/utilities.php:202
+#: inc/utilities.php:121
msgid "(more…)"
msgstr ""
diff --git a/readme.txt b/readme.txt
index ced9030e..99dea70c 100644
--- a/readme.txt
+++ b/readme.txt
@@ -6,11 +6,13 @@ Tested up to: 4.9
Stable tag: 3.2.0
License: GPLv2
-WP-Members membership plugin turns your WordPress site into a membership site. Restrict premium content, require registration with custom fields, and more.
+WP-Members membership plugin turns your WordPress site into a membership site. Restrict premium content, create custom registration fields, and more.
== Description ==
-WP-Members™ is the original membership plugin for WordPress®. Perfect for newsletters, premium content sites, clubs/associations, and more!
+=== Membership Sites. Simplified. ===
+
+You need a membership site. You want to focus on your business, not mastering a plugin. WP-Members is simple to use, yet flexible in every way imaginable.
The plugin restricts selected WordPress® content to registered site members. WP-Members™ puts the registration process on the site front end so it is inline with your content rather than the native WP login page. WP-Members™ requires __no__ modifications to your theme while remainging scalable for users who want to customize the look and feel, or want to restrict only some content. It is a great tool for sites offering premium content to subscribers, and is adaptable to a variety of applications.
@@ -153,6 +155,15 @@ WP-Members 3.2.0 is a major update. See changelog for important details. Minimum
* Fixes issue with login status if logout url is encoded (sprintf() has too few arguments).
* Added Membership Products Custom Post Type.
* Added "Hide Post" option for blocking content (currently only by post meta _wpmem_block).
+* Removed several outdated stylesheets from selecion ( still download for users who may use them).
+* Fixed issue with login page logged in state if encoded url exists (decode logout link url).
+* Added wpmem_update_user_role() API function.
+* Added wpmem_display_message() API function.
+* Added wpmem_user_has_access() API function.
+* HTML5 update - form anchor tags changed from "name" to "id".
+* HTML5 update - form id tags set default value (can still be filtered).
+* HTML5 update - removed "align" attribute (captcha, link-text).
+* Moved remaining core functions to appropriate object classes, left wrappers for most.
= 3.1.9 =
From 0104b418a6321bcc05a034d695e7d4afa1c537fc Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Wed, 22 Nov 2017 09:47:21 -0600
Subject: [PATCH 0730/1694] password change fix (action was not passing 2nd
argument which is the password)
---
inc/class-wp-members.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/class-wp-members.php b/inc/class-wp-members.php
index 5e12a5bc..7c58c83f 100644
--- a/inc/class-wp-members.php
+++ b/inc/class-wp-members.php
@@ -373,7 +373,7 @@ function load_hooks() {
add_action( 'login_enqueue_scripts', 'wpmem_wplogin_stylesheet' ); // styles the native registration
add_action( 'wp_enqueue_scripts', 'wpmem_enqueue_style' ); // Enqueues the stylesheet.
add_action( 'init', array( $this->membership, 'add_cpt' ), 0 ); // Adds membership plans custom post type.
- add_action( 'wpmem_pwd_change', array( $this->user, 'set_as_logged_in' ) );
+ add_action( 'wpmem_pwd_change', array( $this->user, 'set_as_logged_in' ), 10, 2 );
add_action( 'pre_get_posts', array( $this, 'do_hide_posts' ) );
// Add filters.
From 91e8bb6ef72a37ef8bd6d51cdc3332c6986657e3 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Wed, 22 Nov 2017 09:48:04 -0600
Subject: [PATCH 0731/1694] screen_icon() is obsolete
---
admin/admin.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/admin/admin.php b/admin/admin.php
index b7736eb1..3c78fcc1 100644
--- a/admin/admin.php
+++ b/admin/admin.php
@@ -55,7 +55,7 @@ function wpmem_admin() {
} ?>
-
+
Date: Fri, 15 Dec 2017 10:47:56 -0500
Subject: [PATCH 0732/1694] Update README.md
---
README.md | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 77021d59..c147b283 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,17 @@ This is the development repository for the WP-Members plugin for WordPress.
## Usage Information ##
-Keep in mind that the branch here is a development branch, so it should be tested prior to loading to a production site.
+Keep in mind that the branch here is a development branch, so it should be tested prior to loading to a production site. Although every effort is made to only load stable updates to this repo, this may not necessarily be production ready and some features may be subject to change prior to release.
-If you are looking for a production ready version of the plugin, use the version hosted here:
+If you need a production ready version of the plugin, use the version hosted here:
http://wordpress.org/extend/plugins/wp-members/
+
+## Bug Reporting and Pull Requests ##
+
+I do accept pull requests. However, I have a pretty strict standard on what goes into the production version of the plugin. So please make sure that your pull request actually makes sense and is a proper pull request. Also make sure that your code follows WP's code standards for both PHP and inline documentation.
+
+Make sure any bug reports are actually bugs. A bug is something broken. A bug is not a feature that you wish to operate differently than it currently does in the plugin. Unfortunately, I get a lot of bug reports that are essentially feature requests or a user's inability to follow setup instructions. I wish I didn't have to say that, but I do.
+
+## Feature Requests ##
+
+I am open to feature requests. However, I have a roadmap in place for the plugin so it ultimately needs to make sense for that. Also, I follow Matt Mullenweg's vision for options in WordPress, which essentially boils down to the fact that too many options make the interface more confusing. So something that is better handled as a customization (through actions and filters) will likely be addressed that way (as it should be) rather than being incorporated into the plugin. But if your idea is a good one, don't hold it back because you're not sure. All I'm saying is don't have hurt feelings if I see it differently.
From 44234d698028fd6f406e225555b6643041f0a7a8 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Sat, 30 Dec 2017 22:01:27 -0600
Subject: [PATCH 0733/1694] add username to fields array
---
inc/class-wp-members-forms.php | 43 +++-------------------------------
wp-members-install.php | 18 +++++++++++++-
2 files changed, 20 insertions(+), 41 deletions(-)
diff --git a/inc/class-wp-members-forms.php b/inc/class-wp-members-forms.php
index be14be64..a58c626e 100644
--- a/inc/class-wp-members-forms.php
+++ b/inc/class-wp-members-forms.php
@@ -731,42 +731,6 @@ function register_form( $tag = 'new', $heading = '', $redirect_to = null ) {
// Merge $args with defaults.
$args = wp_parse_args( $args, $defaults );
- // Username is editable if new reg, otherwise user profile is not.
- if ( 'edit' == $tag ) {
- // This is the User Profile edit - username is not editable.
- $val = $userdata->user_login;
- $label = '' . $wpmem->get_text( 'profile_username' ) . '';
- $input = '
';
-
- /**
- * Filter the post restricted message.
- *
- * @since 2.7.3
- *
- * @param string $str The post restricted message.
- */
- $str = apply_filters( 'wpmem_restricted_msg', $str );
-
- }
- }
-
- // Create the default inputs.
- $default_inputs = array(
- array(
- 'name' => $wpmem->get_text( 'login_username' ),
- 'type' => 'text',
- 'tag' => 'log',
- 'class' => 'username',
- 'div' => 'div_text',
- ),
- array(
- 'name' => $wpmem->get_text( 'login_password' ),
- 'type' => 'password',
- 'tag' => 'pwd',
- 'class' => 'password',
- 'div' => 'div_text',
- ),
- );
-
- /**
- * Filter the array of login form fields.
- *
- * @since 2.9.0
- *
- * @param array $default_inputs An array matching the elements used by default.
- */
- $default_inputs = apply_filters( 'wpmem_inc_login_inputs', $default_inputs );
-
- $defaults = array(
- 'heading' => $wpmem->get_text( 'login_heading' ),
- 'action' => 'login',
- 'button_text' => $wpmem->get_text( 'login_button' ),
- 'inputs' => $default_inputs,
- 'redirect_to' => $redirect_to,
- );
-
- /**
- * Filter the arguments to override login form defaults.
- *
- * @since 2.9.0
- *
- * @param array $args An array of arguments to use. Default null.
- */
- $args = apply_filters( 'wpmem_inc_login_args', '' );
-
- $arr = wp_parse_args( $args, $defaults );
-
- $str = ( $show == 'show' ) ? $str . wpmem_login_form( $page, $arr ) : $str;
-
- return $str;
+ global $wpmem;
+ return $wpmem->forms->do_login_form( $page = "page", $redirect_to = null, $show = 'show' );
}
endif;
@@ -135,62 +61,14 @@ function wpmem_inc_login( $page = "page", $redirect_to = null, $show = 'show' )
* Loads the form for changing password.
*
* @since 2.0.0
+ * @since 3.2.0 Now a wrapper for $wpmem->forms->do_changepassword_form()
*
* @global object $wpmem The WP_Members object.
* @return string $str The generated html for the change password form.
*/
function wpmem_inc_changepassword() {
-
global $wpmem;
-
- // create the default inputs
- $default_inputs = array(
- array(
- 'name' => $wpmem->get_text( 'pwdchg_password1' ),
- 'type' => 'password',
- 'tag' => 'pass1',
- 'class' => 'password',
- 'div' => 'div_text',
- ),
- array(
- 'name' => $wpmem->get_text( 'pwdchg_password2' ),
- 'type' => 'password',
- 'tag' => 'pass2',
- 'class' => 'password',
- 'div' => 'div_text',
- ),
- );
-
- /**
- * Filter the array of change password form fields.
- *
- * @since 2.9.0
- *
- * @param array $default_inputs An array matching the elements used by default.
- */
- $default_inputs = apply_filters( 'wpmem_inc_changepassword_inputs', $default_inputs );
-
- $defaults = array(
- 'heading' => $wpmem->get_text( 'pwdchg_heading' ),
- 'action' => 'pwdchange',
- 'button_text' => $wpmem->get_text( 'pwdchg_button' ),
- 'inputs' => $default_inputs,
- );
-
- /**
- * Filter the arguments to override change password form defaults.
- *
- * @since 2.9.0
- *
- * @param array $args An array of arguments to use. Default null.
- */
- $args = apply_filters( 'wpmem_inc_changepassword_args', '' );
-
- $arr = wp_parse_args( $args, $defaults );
-
- $str = wpmem_login_form( 'page', $arr );
-
- return $str;
+ return $wpmem->forms->do_changepassword_form();
}
endif;
@@ -202,62 +80,14 @@ function wpmem_inc_changepassword() {
* Loads the form for resetting password.
*
* @since 2.1.0
+ * @since 3.2.0 Now a wrapper for $wpmem->forms->do_resetpassword_form()
*
* @global object $wpmem The WP_Members object.
* @return string $str The generated html fo the reset password form.
*/
function wpmem_inc_resetpassword() {
-
global $wpmem;
-
- // Create the default inputs.
- $default_inputs = array(
- array(
- 'name' => $wpmem->get_text( 'pwdreset_username' ),
- 'type' => 'text',
- 'tag' => 'user',
- 'class' => 'username',
- 'div' => 'div_text',
- ),
- array(
- 'name' => $wpmem->get_text( 'pwdreset_email' ),
- 'type' => 'text',
- 'tag' => 'email',
- 'class' => 'password',
- 'div' => 'div_text',
- ),
- );
-
- /**
- * Filter the array of reset password form fields.
- *
- * @since 2.9.0
- *
- * @param array $default_inputs An array matching the elements used by default.
- */
- $default_inputs = apply_filters( 'wpmem_inc_resetpassword_inputs', $default_inputs );
-
- $defaults = array(
- 'heading' => $wpmem->get_text( 'pwdreset_heading' ),
- 'action' => 'pwdreset',
- 'button_text' => $wpmem->get_text( 'pwdreset_button' ),
- 'inputs' => $default_inputs,
- );
-
- /**
- * Filter the arguments to override reset password form defaults.
- *
- * @since 2.9.0
- *
- * @param array $args An array of arguments to use. Default null.
- */
- $args = apply_filters( 'wpmem_inc_resetpassword_args', '' );
-
- $arr = wp_parse_args( $args, $defaults );
-
- $str = wpmem_login_form( 'page', $arr );
-
- return $str;
+ return $wpmem->forms->do_resetpassword_form();
}
endif;
From 82c3d8211e2755e44c6e1bca4058715c7bea87e8 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Sat, 30 Dec 2017 22:05:45 -0600
Subject: [PATCH 0735/1694] revised pot file
---
lang/wp-members.pot | 1149 +++++++++++++++----------------------------
1 file changed, 410 insertions(+), 739 deletions(-)
diff --git a/lang/wp-members.pot b/lang/wp-members.pot
index 954908f2..77edd927 100644
--- a/lang/wp-members.pot
+++ b/lang/wp-members.pot
@@ -3,16 +3,15 @@ msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: WP-Members\n"
-"POT-Creation-Date: 2017-11-16 15:04-0600\n"
-"PO-Revision-Date: 2017-11-16 15:03-0600\n"
+"POT-Creation-Date: 2016-05-03 17:34-0500\n"
+"PO-Revision-Date: 2016-05-03 17:26-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.0.4\n"
+"X-Generator: Poedit 1.8.7\n"
"X-Poedit-Basepath: ..\n"
-"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: wp-members.php\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
@@ -21,24 +20,24 @@ msgstr ""
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
-#: admin/admin.php:59 admin/includes/class-wp-members-admin-api.php:531
+#: admin/admin.php:72 admin/admin.php:143
msgid "Settings"
msgstr ""
-#: admin/dialogs.php:116
+#: admin/dialogs.php:104
msgid ""
"Your WP settings allow anyone to register - this is not the recommended "
"setting."
msgstr ""
-#: admin/dialogs.php:117
+#: admin/dialogs.php:105
#, php-format
msgid ""
"You can %s change this here %s making sure the box next to \"Anyone can "
"register\" is unchecked."
msgstr ""
-#: admin/dialogs.php:118
+#: admin/dialogs.php:106
msgid ""
"This setting allows a link on the /wp-login.php page to register using the "
"WP native registration process thus circumventing any registration you are "
@@ -48,20 +47,20 @@ msgid ""
"Settings."
msgstr ""
-#: admin/dialogs.php:122
+#: admin/dialogs.php:110
msgid ""
"Your WP settings allow anyone to comment - this is not the recommended "
"setting."
msgstr ""
-#: admin/dialogs.php:123
+#: admin/dialogs.php:111
#, php-format
msgid ""
"You can %s change this here %s by checking the box next to \"Users must be "
"registered and logged in to comment.\""
msgstr ""
-#: admin/dialogs.php:124
+#: admin/dialogs.php:112
msgid ""
"This setting allows any users to comment, whether or not they are "
"registered. Depending on how you are using WP-Members will determine whether "
@@ -69,330 +68,198 @@ msgid ""
"you can choose to ignore these warning messages under WP-Members Settings."
msgstr ""
-#: admin/dialogs.php:128
+#: admin/dialogs.php:116
msgid ""
"Your WP settings allow full text rss feeds - this is not the recommended "
"setting."
msgstr ""
-#: admin/dialogs.php:129
+#: admin/dialogs.php:117
#, php-format
msgid ""
"You can %s change this here %s by changing \"For each article in a feed, show"
"\" to \"Summary.\""
msgstr ""
-#: admin/dialogs.php:130
+#: admin/dialogs.php:118
msgid ""
"Leaving this set to full text allows anyone to read your protected content "
"in an RSS reader. Changing this to Summary prevents this as your feeds will "
"only show summary text."
msgstr ""
-#: admin/dialogs.php:134
+#: admin/dialogs.php:122
msgid "You have set WP-Members to hold registrations for approval"
msgstr ""
-#: admin/dialogs.php:135
+#: admin/dialogs.php:123
msgid ""
"but you have not changed the default message for \"Registration Completed\" "
"under \"WP-Members Dialogs and Error Messages.\" You should change this "
"message to let users know they are pending approval."
msgstr ""
-#: admin/dialogs.php:139
-msgid "You have turned on reCAPTCHA"
+#: admin/dialogs.php:127
+msgid "You have set WP-Members to turn off the registration process"
msgstr ""
-#: admin/dialogs.php:140
+#: admin/dialogs.php:128
msgid ""
-"but you have not entered API keys. You will need both a public and private "
-"key. The CAPTCHA will not display unless a valid API key is included."
+"but you also set to moderate and/or email admin new registrations. You will "
+"need to set up a registration page for users to register."
msgstr ""
-#: admin/dialogs.php:144
-msgid "You have active settings that are not recommended."
+#: admin/dialogs.php:132
+msgid "You have turned on reCAPTCHA"
msgstr ""
-#: admin/dialogs.php:145
+#: admin/dialogs.php:133
msgid ""
-"If you will not be changing these settings, you can turn off these warning "
-"messages by checking the \"Ignore warning messages\" in the settings below."
+"but you have not entered API keys. You will need both a public and private "
+"key. The CAPTCHA will not display unless a valid API key is included."
msgstr ""
-#: admin/dialogs.php:169
+#: admin/dialogs.php:157
msgid "Version:"
msgstr ""
-#: admin/dialogs.php:170
+#: admin/dialogs.php:158
msgid "Quick Start Guide"
msgstr ""
-#: admin/dialogs.php:171
+#: admin/dialogs.php:159
msgid "Online User Guide"
msgstr ""
-#: admin/dialogs.php:172
+#: admin/dialogs.php:160
msgid "FAQs"
msgstr ""
-#: admin/dialogs.php:179
+#: admin/dialogs.php:167
msgid "Thank you for using WP-Members"
msgstr ""
-#: admin/dialogs.php:180
+#: admin/dialogs.php:168
msgid "A plugin developed by"
msgstr ""
-#: admin/dialogs.php:181
+#: admin/dialogs.php:169
msgid "Follow"
msgstr ""
-#: admin/dialogs.php:198 admin/dialogs.php:202
+#: admin/dialogs.php:186 admin/dialogs.php:190
msgid "Latest from RocketGeek"
msgstr ""
-#: admin/dialogs.php:219 admin/dialogs.php:232
+#: admin/dialogs.php:207 admin/dialogs.php:220
msgid "Latest from ButlerBlog"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:249
-msgid "Custom email"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:250
-#: admin/includes/class-wp-members-admin-api.php:252
-msgid "Subject"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:253
-msgid "Body"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:255
-msgid "Your custom email message content."
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:333
+#: admin/includes/class-wp-members-admin-api.php:220
msgid "Options"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:334
+#: admin/includes/class-wp-members-admin-api.php:221
msgid "Fields"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:335
+#: admin/includes/class-wp-members-admin-api.php:222
msgid "Dialogs"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:336
+#: admin/includes/class-wp-members-admin-api.php:223
msgid "Emails"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:352
+#: admin/includes/class-wp-members-admin-api.php:239
msgid "New Registration"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:361
+#: admin/includes/class-wp-members-admin-api.php:248
msgid "Registration is Moderated"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:367
+#: admin/includes/class-wp-members-admin-api.php:254
msgid "Registration is Moderated, User is Approved"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:375
+#: admin/includes/class-wp-members-admin-api.php:262
msgid "Password Reset"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:382
+#: admin/includes/class-wp-members-admin-api.php:269
msgid "Retrieve Username"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:390
+#: admin/includes/class-wp-members-admin-api.php:277
msgid "Admin Notification"
msgstr ""
-#: admin/includes/class-wp-members-admin-api.php:416
-msgid "Restricted post (or page), displays above the login/registration form"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:417
-msgid "Username is taken"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:418
-msgid "Email is registered"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:419
-msgid "Registration completed"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:420
-msgid "User update"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:421
-msgid "Passwords did not match"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:422
-msgid "Password changes"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:423
-msgid "Username or email do not exist when trying to reset forgotten password"
-msgstr ""
-
-#: admin/includes/class-wp-members-admin-api.php:424
-msgid "Password reset"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:41
-msgid "Slug"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:42
-msgid "Role"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:43
-#: admin/includes/class-wp-members-products-admin.php:140
-#: admin/tab-fields.php:430 admin/user-export.php:86
-msgid "Expires"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:44
-msgid "Last updated"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:64
-msgid "No role required"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:69
-msgid "Does not expire"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:104
-msgid "Membership Product Details"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:120
-#: admin/includes/class-wp-members-products-admin.php:144
-msgid "Period"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:120
-msgid "Day"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:120
-msgid "Week"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:120
-msgid "Month"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:120
-msgid "Year"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:126
-msgid "Name (slug)"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:131
-msgid "Role Required?"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:134
-msgid "No Role"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:142
-#: admin/includes/class-wp-members-products-admin.php:143
-msgid "Number"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:216
-#: admin/tab-options.php:188 inc/class-wp-members-forms.php:934
-#: inc/class-wp-members-user-profile.php:92 inc/deprecated.php:360
-#: inc/deprecated.php:622
-msgid "None"
-msgstr ""
-
-#: admin/includes/class-wp-members-products-admin.php:222
-msgid "Limit access to:"
-msgstr ""
-
-#: admin/post.php:45 admin/post.php:47 admin/tab-options.php:95
+#: admin/post.php:51 admin/post.php:53 admin/tab-options.php:87
msgid "Block"
msgstr ""
-#: admin/post.php:46 admin/post.php:48
+#: admin/post.php:52 admin/post.php:54
msgid "Unblock"
msgstr ""
-#: admin/post.php:143
+#: admin/post.php:188
#, php-format
-msgid "%s blocked"
+msgid "%s Restriction"
msgstr ""
-#: admin/post.php:143
+#: admin/post.php:215
#, php-format
-msgid "%s unblocked"
+msgid "%s are blocked by default."
msgstr ""
-#: admin/post.php:182
+#: admin/post.php:216
#, php-format
-msgid "%s Restriction"
+msgid "Unblock this %s"
msgstr ""
-#: admin/post.php:210
+#: admin/post.php:219
#, php-format
-msgid "%s are blocked by default."
+msgid "%s are not blocked by default."
msgstr ""
-#: admin/post.php:214
+#: admin/post.php:220
#, php-format
-msgid "%s are not blocked by default."
+msgid "Block this %s"
msgstr ""
-#: admin/post.php:220 admin/tab-fields.php:88 admin/tab-fields.php:523
+#: admin/post.php:226 admin/tab-fields.php:282 admin/tab-fields.php:473
msgid "Edit"
msgstr ""
-#: admin/post.php:311
+#: admin/post.php:313
msgid "Unblocked?"
msgstr ""
-#: admin/post.php:311
+#: admin/post.php:313
msgid "Blocked?"
msgstr ""
-#: admin/tab-about.php:34 admin/tab-about.php:56
-msgid "About WP-Members"
+#: admin/post.php:345 admin/post.php:346 admin/user-export.php:108
+msgid "Yes"
msgstr ""
-#: admin/tab-captcha.php:74 admin/tab-dialogs.php:40 admin/tab-emails.php:84
-#: admin/tab-fields.php:149 admin/tab-options.php:64
+#: admin/tab-captcha.php:42 admin/tab-dialogs.php:47 admin/tab-emails.php:80
+#: admin/tab-fields.php:44 admin/tab-options.php:58
msgid "Need help?"
msgstr ""
-#: admin/tab-captcha.php:85
+#: admin/tab-captcha.php:53
msgid "Manage reCAPTCHA Options"
msgstr ""
-#: admin/tab-captcha.php:99
+#: admin/tab-captcha.php:67
msgid ""
"reCAPTCHA is a free, accessible CAPTCHA service that helps to digitize books "
"while blocking spam on your blog."
msgstr ""
-#: admin/tab-captcha.php:100
+#: admin/tab-captcha.php:68
#, php-format
msgid ""
"reCAPTCHA asks commenters to retype two words scanned from a book to prove "
@@ -402,1241 +269,1045 @@ msgid ""
"the %s reCAPTCHA website%s"
msgstr ""
-#: admin/tab-captcha.php:105 admin/tab-captcha.php:131
+#: admin/tab-captcha.php:73 admin/tab-captcha.php:99
msgid "reCAPTCHA Keys"
msgstr ""
-#: admin/tab-captcha.php:107
+#: admin/tab-captcha.php:75
#, php-format
msgid ""
"reCAPTCHA requires an API key, consisting of a \"public\" and a \"private\" "
"key. You can sign up for a %s free reCAPTCHA key%s"
msgstr ""
-#: admin/tab-captcha.php:108
+#: admin/tab-captcha.php:76
msgid "Public Key"
msgstr ""
-#: admin/tab-captcha.php:109
+#: admin/tab-captcha.php:77
msgid "Private Key"
msgstr ""
-#: admin/tab-captcha.php:113
+#: admin/tab-captcha.php:81
msgid "Choose Theme"
msgstr ""
-#: admin/tab-captcha.php:116
+#: admin/tab-captcha.php:84
msgid "Red"
msgstr ""
-#: admin/tab-captcha.php:117
+#: admin/tab-captcha.php:85
msgid "White"
msgstr ""
-#: admin/tab-captcha.php:118
+#: admin/tab-captcha.php:86
msgid "Black Glass"
msgstr ""
-#: admin/tab-captcha.php:119
+#: admin/tab-captcha.php:87
msgid "Clean"
msgstr ""
-#: admin/tab-captcha.php:133
+#: admin/tab-captcha.php:101
#, php-format
msgid ""
"reCAPTCHA requires an API key, consisting of a \"site\" and a \"secret\" "
"key. You can sign up for a %s free reCAPTCHA key%s"
msgstr ""
-#: admin/tab-captcha.php:134
+#: admin/tab-captcha.php:102
msgid "Site Key"
msgstr ""
-#: admin/tab-captcha.php:135
+#: admin/tab-captcha.php:103
msgid "Secret Key"
msgstr ""
-#: admin/tab-captcha.php:166
+#: admin/tab-captcha.php:134
msgid "Characters for image"
msgstr ""
-#: admin/tab-captcha.php:170
+#: admin/tab-captcha.php:138
msgid "Number of characters"
msgstr ""
-#: admin/tab-captcha.php:174
+#: admin/tab-captcha.php:142
msgid "Image dimensions"
msgstr ""
-#: admin/tab-captcha.php:175
+#: admin/tab-captcha.php:143
msgid "Width"
msgstr ""
-#: admin/tab-captcha.php:175
+#: admin/tab-captcha.php:143
msgid "Height"
msgstr ""
-#: admin/tab-captcha.php:178
+#: admin/tab-captcha.php:146
msgid "Font color of characters"
msgstr ""
-#: admin/tab-captcha.php:182
+#: admin/tab-captcha.php:150
msgid "Background color of image"
msgstr ""
-#: admin/tab-captcha.php:186
+#: admin/tab-captcha.php:154
msgid "Font size"
msgstr ""
-#: admin/tab-captcha.php:190
+#: admin/tab-captcha.php:158
msgid "Width between characters"
msgstr ""
-#: admin/tab-captcha.php:194
+#: admin/tab-captcha.php:162
msgid "Image type"
msgstr ""
-#: admin/tab-captcha.php:208
+#: admin/tab-captcha.php:176
msgid ""
"To use Really Simple CAPTCHA, you must have the Really Simple CAPTCHA plugin "
"installed and activated."
msgstr ""
-#: admin/tab-captcha.php:232
+#: admin/tab-captcha.php:200
msgid "Update CAPTCHA Settings"
msgstr ""
-#: admin/tab-captcha.php:302
+#: admin/tab-captcha.php:271
msgid "CAPTCHA was updated for WP-Members"
msgstr ""
-#: admin/tab-dialogs.php:50
-msgid "Dialogs and Error Messages"
+#: admin/tab-dialogs.php:32
+msgid "Restricted post (or page), displays above the login/registration form"
msgstr ""
-#: admin/tab-dialogs.php:52
-#, php-format
-msgid ""
-"You can customize the text for dialogs and error messages. Simple HTML is "
-"allowed %s etc."
+#: admin/tab-dialogs.php:33
+msgid "Username is taken"
msgstr ""
-#: admin/tab-dialogs.php:63
-msgid "Terms of Service (TOS)"
+#: admin/tab-dialogs.php:34
+msgid "Email is registered"
msgstr ""
-#: admin/tab-dialogs.php:70
-msgid "Update Dialogs"
+#: admin/tab-dialogs.php:35
+msgid "Registration completed"
msgstr ""
-#: admin/tab-dialogs.php:106
-msgid "WP-Members dialogs were updated"
+#: admin/tab-dialogs.php:36
+msgid "User update"
msgstr ""
-#: admin/tab-dropins.php:79 admin/tab-dropins.php:378
-msgid "WP-Members Dropin settings were updated"
+#: admin/tab-dialogs.php:37
+msgid "Passwords did not match"
msgstr ""
-#: admin/tab-dropins.php:204
-msgid "Manage Dropins"
+#: admin/tab-dialogs.php:38
+msgid "Password changes"
msgstr ""
-#: admin/tab-dropins.php:205
-msgid "Current dropin folder: "
+#: admin/tab-dialogs.php:39
+msgid "Username or email do not exist when trying to reset forgotten password"
msgstr ""
-#: admin/tab-dropins.php:206
-msgid ""
-"You can change location of the dropin folder using the "
-"wpmem_dropin_folder filter."
+#: admin/tab-dialogs.php:40
+msgid "Password reset"
msgstr ""
-#: admin/tab-dropins.php:269
-msgid "Name"
+#: admin/tab-dialogs.php:57
+msgid "Dialogs and Error Messages"
msgstr ""
-#: admin/tab-dropins.php:270
-msgid "File"
+#: admin/tab-dialogs.php:59
+#, php-format
+msgid ""
+"You can customize the text for dialogs and error messages. Simple HTML is "
+"allowed %s etc."
msgstr ""
-#: admin/tab-dropins.php:271
-msgid "Version"
+#: admin/tab-dialogs.php:72
+msgid "Terms of Service (TOS)"
msgstr ""
-#: admin/tab-dropins.php:272
-msgid "Description"
+#: admin/tab-dialogs.php:79
+msgid "Update Dialogs"
msgstr ""
-#: admin/tab-dropins.php:315 admin/tab-fields.php:568
-msgid "Save Settings"
+#: admin/tab-dialogs.php:118
+msgid "WP-Members dialogs were updated"
msgstr ""
-#: admin/tab-emails.php:41
+#: admin/tab-emails.php:37
msgid "Email Messages"
msgstr ""
-#: admin/tab-emails.php:44
+#: admin/tab-emails.php:40
msgid "You can customize the content of the emails sent by the plugin."
msgstr ""
-#: admin/tab-emails.php:46
+#: admin/tab-emails.php:42
msgid "A list of shortcodes is available here."
msgstr ""
-#: admin/tab-emails.php:53
+#: admin/tab-emails.php:49
msgid "Set a custom email address"
msgstr ""
-#: admin/tab-emails.php:54 admin/tab-emails.php:58 admin/tab-emails.php:68
-#: admin/tab-fields.php:175
+#: admin/tab-emails.php:50 admin/tab-emails.php:54 admin/tab-emails.php:64
msgid "(optional)"
msgstr ""
-#: admin/tab-emails.php:57
+#: admin/tab-emails.php:53
msgid "Set a custom email name"
msgstr ""
-#: admin/tab-emails.php:68
+#: admin/tab-emails.php:64
msgid "Email Signature"
msgstr ""
-#: admin/tab-emails.php:76
+#: admin/tab-emails.php:72
msgid "Update Emails"
msgstr ""
-#: admin/tab-emails.php:146
+#: admin/tab-emails.php:140
msgid "WP-Members emails were updated"
msgstr ""
-#: admin/tab-fields.php:110
-msgid "Are you sure you want to delete the following fields?"
+#: admin/tab-fields.php:169
+msgid "WP-Members fields were updated"
msgstr ""
-#: admin/tab-fields.php:137
-msgid "Fields deleted"
+#: admin/tab-fields.php:181
+msgid "Field Label is required for adding a new field. Nothing was updated."
msgstr ""
-#: admin/tab-fields.php:151
-msgid "Field Manager Documentation"
+#: admin/tab-fields.php:182
+msgid "Option Name is required for adding a new field. Nothing was updated."
msgstr ""
-#: admin/tab-fields.php:176 admin/tab-fields.php:293
-#: inc/class-wp-members-user-profile.php:124 inc/deprecated.php:385
-#: inc/deprecated.php:646 inc/wp-registration.php:54
-#: inc/wp-registration.php:213
-msgid "(required)"
+#: admin/tab-fields.php:184
+msgid "Option Name must contain only letters, numbers, and underscores"
+msgstr ""
+
+#: admin/tab-fields.php:191
+msgid "A field with that option name already exists"
+msgstr ""
+
+#: admin/tab-fields.php:197
+#, php-format
+msgid ""
+"Sorry, \"%s\" is a reserved term. "
+"Field was not added."
msgstr ""
-#: admin/tab-fields.php:181 admin/tab-fields.php:378
+#: admin/tab-fields.php:215
+msgid "Checked value is required for checkboxes. Nothing was updated."
+msgstr ""
+
+#: admin/tab-fields.php:245
+msgid "field was added"
+msgstr ""
+
+#: admin/tab-fields.php:263
+msgid "field was updated"
+msgstr ""
+
+#: admin/tab-fields.php:309 admin/tab-fields.php:437
msgid "Edit Field"
msgstr ""
-#: admin/tab-fields.php:181
+#: admin/tab-fields.php:309
msgid "Add a Field"
msgstr ""
-#: admin/tab-fields.php:186
+#: admin/tab-fields.php:315 admin/tab-fields.php:467
msgid "Field Label"
msgstr ""
-#: admin/tab-fields.php:188
+#: admin/tab-fields.php:317
msgid "The name of the field as it will be displayed to the user."
msgstr ""
-#: admin/tab-fields.php:191 admin/tab-fields.php:518
-msgid "Meta Key"
+#: admin/tab-fields.php:320 admin/tab-fields.php:468
+msgid "Option Name"
msgstr ""
-#: admin/tab-fields.php:197
+#: admin/tab-fields.php:326
msgid ""
"The database meta value for the field. It must be unique and contain no "
"spaces (underscores are ok)."
msgstr ""
-#: admin/tab-fields.php:201 admin/tab-fields.php:519
+#: admin/tab-fields.php:330 admin/tab-fields.php:469
msgid "Field Type"
msgstr ""
-#: admin/tab-fields.php:207
+#: admin/tab-fields.php:336
msgid "text"
msgstr ""
-#: admin/tab-fields.php:208
+#: admin/tab-fields.php:337
msgid "email"
msgstr ""
-#: admin/tab-fields.php:209
+#: admin/tab-fields.php:338
msgid "textarea"
msgstr ""
-#: admin/tab-fields.php:210
+#: admin/tab-fields.php:339
msgid "checkbox"
msgstr ""
-#: admin/tab-fields.php:211
+#: admin/tab-fields.php:340
msgid "multiple checkbox"
msgstr ""
-#: admin/tab-fields.php:212
+#: admin/tab-fields.php:341
msgid "select (dropdown)"
msgstr ""
-#: admin/tab-fields.php:213
+#: admin/tab-fields.php:342
msgid "multiple select"
msgstr ""
-#: admin/tab-fields.php:214
+#: admin/tab-fields.php:343
msgid "radio group"
msgstr ""
-#: admin/tab-fields.php:215
+#: admin/tab-fields.php:344
msgid "password"
msgstr ""
-#: admin/tab-fields.php:216
+#: admin/tab-fields.php:345
msgid "image"
msgstr ""
-#: admin/tab-fields.php:217
+#: admin/tab-fields.php:346
msgid "file"
msgstr ""
-#: admin/tab-fields.php:218
+#: admin/tab-fields.php:347
msgid "url"
msgstr ""
-#: admin/tab-fields.php:219
-msgid "number"
-msgstr ""
-
-#: admin/tab-fields.php:220
-msgid "date"
-msgstr ""
-
-#: admin/tab-fields.php:221
+#: admin/tab-fields.php:348
msgid "hidden"
msgstr ""
-#: admin/tab-fields.php:226 admin/tab-fields.php:520
+#: admin/tab-fields.php:353 admin/tab-fields.php:470
msgid "Display?"
msgstr ""
-#: admin/tab-fields.php:230 admin/tab-fields.php:521
+#: admin/tab-fields.php:357 admin/tab-fields.php:471
msgid "Required?"
msgstr ""
-#: admin/tab-fields.php:235
-msgid "Allow HTML?"
-msgstr ""
-
-#: admin/tab-fields.php:242
-msgid "Placeholder"
-msgstr ""
-
-#: admin/tab-fields.php:250
-msgid "Pattern"
-msgstr ""
-
-#: admin/tab-fields.php:256
-msgid "Title"
+#: admin/tab-fields.php:363
+msgid "Additional information for field upload fields"
msgstr ""
-#: admin/tab-fields.php:265
-msgid "Minimum Value"
-msgstr ""
-
-#: admin/tab-fields.php:269
-msgid "Maximum Value"
-msgstr ""
-
-#: admin/tab-fields.php:277
+#: admin/tab-fields.php:366
msgid "Accepted file types:"
msgstr ""
-#: admin/tab-fields.php:282
+#: admin/tab-fields.php:371
msgid "Accepted file types should be set like this: jpg|jpeg|png|gif"
msgstr ""
-#: admin/tab-fields.php:289
+#: admin/tab-fields.php:378
+msgid "Additional information for checkbox fields"
+msgstr ""
+
+#: admin/tab-fields.php:381
msgid "Checked by default?"
msgstr ""
-#: admin/tab-fields.php:293
+#: admin/tab-fields.php:385
msgid "Stored value if checked:"
msgstr ""
-#: admin/tab-fields.php:314
-msgid "Stored values delimiter:"
+#: admin/tab-fields.php:397
+msgid "Additional information for dropdown fields"
msgstr ""
-#: admin/tab-fields.php:323
-msgid "Values (Displayed|Stored):"
+#: admin/tab-fields.php:400
+msgid "For dropdown, array of values:"
msgstr ""
-#: admin/tab-fields.php:348
+#: admin/tab-fields.php:425
msgid "Options should be Option Name|option_value,"
msgstr ""
-#: admin/tab-fields.php:352
+#: admin/tab-fields.php:429
msgid "Visit plugin site for more information"
msgstr ""
-#: admin/tab-fields.php:359
-msgid "Value"
-msgstr ""
-
-#: admin/tab-fields.php:378 admin/tab-fields.php:645 admin/tab-fields.php:646
+#: admin/tab-fields.php:437
msgid "Add Field"
msgstr ""
-#: admin/tab-fields.php:380 admin/tab-fields.php:831
-msgid "Return to Fields Table"
-msgstr ""
-
-#: admin/tab-fields.php:420
-msgid "Drag and drop to reorder fields"
-msgstr ""
-
-#: admin/tab-fields.php:426
-msgid "Registration Date"
-msgstr ""
-
-#: admin/tab-fields.php:427
-msgid "Active"
-msgstr ""
-
-#: admin/tab-fields.php:428
-msgid "Registration IP"
-msgstr ""
-
-#: admin/tab-fields.php:429
-msgid "Subscription Type"
-msgstr ""
-
-#: admin/tab-fields.php:431
-msgid "User ID"
-msgstr ""
-
-#: admin/tab-fields.php:464
+#: admin/tab-fields.php:458
msgid "Manage Fields"
msgstr ""
-#: admin/tab-fields.php:503
-msgid "delete"
-msgstr ""
-
-#: admin/tab-fields.php:517
-msgid "Display Label"
-msgstr ""
-
-#: admin/tab-fields.php:524
-msgid "Users Screen"
-msgstr ""
-
-#: admin/tab-fields.php:525
-msgid "Users Search"
-msgstr ""
-
-#: admin/tab-fields.php:567
-msgid "Delete Selected"
+#: admin/tab-fields.php:460
+msgid ""
+"Determine which fields will display and which are required. This includes "
+"all fields, both native WP fields and WP-Members custom fields."
msgstr ""
-#: admin/tab-fields.php:709
-msgid "WP-Members fields were updated"
+#: admin/tab-fields.php:461
+msgid "(Note: Email is always mandatory and cannot be changed.)"
msgstr ""
-#: admin/tab-fields.php:731
-msgid "Field Label is required. Nothing was updated."
+#: admin/tab-fields.php:466
+msgid "Add/Delete"
msgstr ""
-#: admin/tab-fields.php:732
-msgid "Meta Key is required. Nothing was updated."
+#: admin/tab-fields.php:472
+msgid "Checked?"
msgstr ""
-#: admin/tab-fields.php:734
-msgid "Meta Key must contain only letters, numbers, and underscores"
+#: admin/tab-fields.php:474
+msgid "Users Screen"
msgstr ""
-#: admin/tab-fields.php:741
-msgid "A field with that meta key already exists"
+#: admin/tab-fields.php:486
+msgid "Delete"
msgstr ""
-#: admin/tab-fields.php:746
-#, php-format
-msgid ""
-"Sorry, \"%s\" is a reserved term. "
-"Field was not added."
+#: admin/tab-fields.php:498
+msgid "(Email cannot be removed)"
msgstr ""
-#: admin/tab-fields.php:779
-msgid "Checked value is required for checkboxes. Nothing was updated."
+#: admin/tab-fields.php:518
+msgid "Registration Date"
msgstr ""
-#: admin/tab-fields.php:810
-msgid "A value is required for hidden fields. Nothing was updated."
+#: admin/tab-fields.php:521
+msgid "native"
msgstr ""
-#: admin/tab-fields.php:817
-#, php-format
-msgid "%s was added"
+#: admin/tab-fields.php:531
+msgid "Active"
msgstr ""
-#: admin/tab-fields.php:830
-#, php-format
-msgid "%s was updated"
+#: admin/tab-fields.php:543
+msgid "Registration IP"
msgstr ""
-#: admin/tab-fields.php:872
-msgid "Form field order updated."
+#: admin/tab-fields.php:578
+msgid "Update Fields"
msgstr ""
-#: admin/tab-options.php:75
+#: admin/tab-options.php:69
msgid "Manage Options"
msgstr ""
-#: admin/tab-options.php:79
-msgid "Content"
-msgstr ""
-
-#: admin/tab-options.php:90
-msgid "Content Blocking"
-msgstr ""
-
-#: admin/tab-options.php:94
+#: admin/tab-options.php:86
msgid "Do not block"
msgstr ""
-#: admin/tab-options.php:96
+#: admin/tab-options.php:88
msgid "Hide"
msgstr ""
-#: admin/tab-options.php:108
+#: admin/tab-options.php:99
msgid "Show Excerpts"
msgstr ""
-#: admin/tab-options.php:109
+#: admin/tab-options.php:100
msgid "Show Login Form"
msgstr ""
-#: admin/tab-options.php:110
+#: admin/tab-options.php:101
msgid "Show Registration Form"
msgstr ""
-#: admin/tab-options.php:111
+#: admin/tab-options.php:102
msgid "Auto Excerpt:"
msgstr ""
-#: admin/tab-options.php:133
+#: admin/tab-options.php:122
msgid "Number of words in excerpt:"
msgstr ""
-#: admin/tab-options.php:134
-msgid "Custom read more link (optional):"
-msgstr ""
-
-#: admin/tab-options.php:148
+#: admin/tab-options.php:136
msgid "Time-based expiration"
msgstr ""
-#: admin/tab-options.php:148
+#: admin/tab-options.php:136
msgid "Allows for access to expire"
msgstr ""
-#: admin/tab-options.php:149
+#: admin/tab-options.php:137
msgid "Trial period"
msgstr ""
-#: admin/tab-options.php:149
+#: admin/tab-options.php:137
msgid "Allows for a trial period"
msgstr ""
-#: admin/tab-options.php:151
-msgid "Subscription Settings"
-msgstr ""
-
-#: admin/tab-options.php:161
-msgid "Other Settings"
-msgstr ""
-
-#: admin/tab-options.php:167
-msgid "Enable Products"
-msgstr ""
-
-#: admin/tab-options.php:167
-msgid "Enables creation of different membership products"
-msgstr ""
-
-#: admin/tab-options.php:168
-msgid "Clone menus"
-msgstr ""
-
-#: admin/tab-options.php:168
-msgid "Enables logged in menus"
-msgstr ""
-
-#: admin/tab-options.php:169
+#: admin/tab-options.php:153
msgid "Notify admin"
msgstr ""
-#: admin/tab-options.php:169
+#: admin/tab-options.php:153
#, php-format
msgid "Notify %s for each new registration? %s"
msgstr ""
-#: admin/tab-options.php:170
+#: admin/tab-options.php:154
msgid "Moderate registration"
msgstr ""
-#: admin/tab-options.php:170
+#: admin/tab-options.php:154
msgid "Holds new registrations for admin approval"
msgstr ""
-#: admin/tab-options.php:171
+#: admin/tab-options.php:155
msgid "Ignore warning messages"
msgstr ""
-#: admin/tab-options.php:171
+#: admin/tab-options.php:155
msgid "Ignores WP-Members warning messages in the admin panel"
msgstr ""
-#: admin/tab-options.php:182
+#: admin/tab-options.php:167
msgid "Attribution"
msgstr ""
-#: admin/tab-options.php:184
+#: admin/tab-options.php:169
msgid ""
"Attribution is appreciated! Display \"powered by\" link on register form?"
msgstr ""
-#: admin/tab-options.php:187
+#: admin/tab-options.php:172
msgid "Enable CAPTCHA"
msgstr ""
-#: admin/tab-options.php:192
-msgid "reCAPTCHA"
-msgstr ""
-
-#: admin/tab-options.php:193
-msgid "Really Simple CAPTCHA"
+#: admin/tab-options.php:174 admin/user-profile.php:97 inc/forms.php:806
+#: inc/users.php:70
+msgid "None"
msgstr ""
-#: admin/tab-options.php:196
+#: admin/tab-options.php:180
msgid "Pages"
msgstr ""
-#: admin/tab-options.php:200
+#: admin/tab-options.php:184
msgid "Login Page:"
msgstr ""
-#: admin/tab-options.php:203
+#: admin/tab-options.php:187
msgid "Specify a login page (optional)"
msgstr ""
-#: admin/tab-options.php:212
+#: admin/tab-options.php:196
msgid "Register Page:"
msgstr ""
-#: admin/tab-options.php:215
+#: admin/tab-options.php:199
msgid "For creating a register link in the login form"
msgstr ""
-#: admin/tab-options.php:224
+#: admin/tab-options.php:208
msgid "User Profile Page:"
msgstr ""
-#: admin/tab-options.php:227
+#: admin/tab-options.php:211
msgid "For creating a forgot password link in the login form"
msgstr ""
-#: admin/tab-options.php:233 admin/tab-options.php:235
+#: admin/tab-options.php:217 admin/tab-options.php:219
msgid "Stylesheet"
msgstr ""
-#: admin/tab-options.php:244
+#: admin/tab-options.php:228
msgid "Custom Stylesheet:"
msgstr ""
-#: admin/tab-options.php:249 admin/tab-options.php:276
+#: admin/tab-options.php:234 admin/tab-options.php:260
msgid "Update Settings"
msgstr ""
-#: admin/tab-options.php:257
+#: admin/tab-options.php:241
msgid "Custom Post Types"
msgstr ""
-#: admin/tab-options.php:263
-msgid "Add to WP-Members Settings"
-msgstr ""
-
-#: admin/tab-options.php:360
+#: admin/tab-options.php:342
msgid "Custom Post Type settings were updated"
msgstr ""
-#: admin/tab-options.php:481
+#: admin/tab-options.php:460
msgid "WP-Members settings were updated"
msgstr ""
-#: admin/tab-options.php:551 admin/tab-options.php:581
+#: admin/tab-options.php:530 admin/tab-options.php:559
msgid "USE CUSTOM URL BELOW"
msgstr ""
-#: admin/tab-options.php:570
+#: admin/tab-options.php:548
msgid "Select a page"
msgstr ""
-#: admin/user-export.php:81
+#: admin/user-export.php:72
msgid "Activated?"
msgstr ""
-#: admin/user-export.php:85
+#: admin/user-export.php:73
msgid "Subscription"
msgstr ""
-#: admin/user-export.php:89
+#: admin/user-export.php:73
+msgid "Expires"
+msgstr ""
+
+#: admin/user-export.php:75
msgid "Registered"
msgstr ""
-#: admin/user-export.php:90
+#: admin/user-export.php:76
msgid "IP"
msgstr ""
-#: admin/user-export.php:120
-msgid "Yes"
+#: admin/user-export.php:108 admin/users.php:336
+msgid "No"
msgstr ""
-#: admin/user-export.php:120 admin/users.php:404
-msgid "No"
+#: admin/user-profile.php:52
+msgid "WP-Members Additional Fields"
msgstr ""
-#: admin/user-profile.php:43 inc/wp-registration.php:278
+#: admin/user-profile.php:115 inc/users.php:90 inc/wp-registration.php:37
+#: inc/wp-registration.php:154
+msgid "(required)"
+msgstr ""
+
+#: admin/user-profile.php:283
msgid "Activate this user?"
msgstr ""
-#: admin/user-profile.php:48
+#: admin/user-profile.php:288
msgid "Reactivate this user?"
msgstr ""
-#: admin/user-profile.php:53
+#: admin/user-profile.php:293
msgid "Deactivate this user?"
msgstr ""
-#: admin/user-profile.php:101
+#: admin/user-profile.php:339
msgid "IP @ registration"
msgstr ""
-#: admin/users.php:48 admin/users.php:52 admin/users.php:79
+#: admin/users.php:59 admin/users.php:63
msgid "Activate"
msgstr ""
-#: admin/users.php:50 admin/users.php:54
+#: admin/users.php:61 admin/users.php:65
msgid "Export"
msgstr ""
-#: admin/users.php:55 admin/users.php:103
+#: admin/users.php:66 admin/users.php:107
msgid "Export All Users"
msgstr ""
-#: admin/users.php:148
-#, php-format
-msgid "%s users activated"
-msgstr ""
-
-#: admin/users.php:151
-msgid "No users selected"
-msgstr ""
-
-#: admin/users.php:175
-#, php-format
-msgid "%s activated"
-msgstr ""
-
-#: admin/users.php:180
-msgid "That user is already active"
-msgstr ""
-
-#: inc/api.php:495 inc/class-wp-members.php:1272
-msgid "log in"
-msgstr ""
-
-#: inc/api.php:496
-msgid "log out"
-msgstr ""
-
-#: inc/class-wp-members-products.php:89
-msgid "Product"
-msgstr ""
-
-#: inc/class-wp-members-products.php:90
-msgid "Products"
-msgstr ""
-
-#: inc/class-wp-members-products.php:95
-msgid "Memberships"
-msgstr ""
-
-#: inc/class-wp-members-products.php:96
-#, php-format
-msgid "All %s"
-msgstr ""
-
-#: inc/class-wp-members-products.php:97
-#, php-format
-msgid "Add New %s"
-msgstr ""
-
-#: inc/class-wp-members-products.php:98
-msgid "Add New"
-msgstr ""
-
-#: inc/class-wp-members-products.php:99
-#, php-format
-msgid "New %s"
-msgstr ""
-
-#: inc/class-wp-members-products.php:100
-#, php-format
-msgid "Edit %s"
-msgstr ""
-
-#: inc/class-wp-members-products.php:101
-#, php-format
-msgid "Update %s"
-msgstr ""
-
-#: inc/class-wp-members-products.php:102 inc/class-wp-members-products.php:103
-#, php-format
-msgid "View %s"
-msgstr ""
-
-#: inc/class-wp-members-products.php:104
-#, php-format
-msgid "Search %s"
-msgstr ""
-
-#: inc/class-wp-members-products.php:105
-msgid "Not found"
-msgstr ""
-
-#: inc/class-wp-members-products.php:106
-msgid "Not found in Trash"
-msgstr ""
-
-#: inc/class-wp-members-products.php:107
-msgid "Insert into item"
-msgstr ""
-
-#: inc/class-wp-members-products.php:108
-#, php-format
-msgid "Save %s Details"
-msgstr ""
-
-#: inc/class-wp-members-products.php:111
-msgid "Membership Product"
-msgstr ""
-
-#: inc/class-wp-members-products.php:112
-msgid "WP-Members Membership Products"
-msgstr ""
-
-#: inc/class-wp-members-user-profile.php:37 inc/deprecated.php:315
-msgid "WP-Members Additional Fields"
-msgstr ""
-
-#: inc/class-wp-members-user-profile.php:37 inc/deprecated.php:589
-msgid "Additional Information"
-msgstr ""
-
-#: inc/class-wp-members-user.php:532
-msgid "ERROR: User has not been activated."
-msgstr ""
-
-#: inc/class-wp-members-widget.php:24
+#: inc/class-wp-members-widget.php:18
msgid "Displays the WP-Members sidebar login."
msgstr ""
-#: inc/class-wp-members-widget.php:39 inc/class-wp-members-widget.php:82
+#: inc/class-wp-members-widget.php:33 inc/class-wp-members-widget.php:76
msgid "Login Status"
msgstr ""
-#: inc/class-wp-members-widget.php:46
+#: inc/class-wp-members-widget.php:40
msgid "Title:"
msgstr ""
-#: inc/class-wp-members-widget.php:50
+#: inc/class-wp-members-widget.php:44
msgid "Redirect to (optional):"
msgstr ""
-#: inc/class-wp-members.php:757 inc/deprecated.php:180 inc/shortcodes.php:97
-#: inc/shortcodes.php:325
+#: inc/class-wp-members.php:388 inc/shortcodes.php:117 inc/shortcodes.php:386
msgid "There was an error with the CAPTCHA form."
msgstr ""
-#: inc/class-wp-members.php:1171
+#: inc/class-wp-members.php:546
msgid "First Name"
msgstr ""
-#: inc/class-wp-members.php:1172
+#: inc/class-wp-members.php:547
msgid "Last Name"
msgstr ""
-#: inc/class-wp-members.php:1173
+#: inc/class-wp-members.php:548
msgid "Address 1"
msgstr ""
-#: inc/class-wp-members.php:1174
+#: inc/class-wp-members.php:549
msgid "Address 2"
msgstr ""
-#: inc/class-wp-members.php:1175
+#: inc/class-wp-members.php:550
msgid "City"
msgstr ""
-#: inc/class-wp-members.php:1176
+#: inc/class-wp-members.php:551
msgid "State"
msgstr ""
-#: inc/class-wp-members.php:1177
+#: inc/class-wp-members.php:552
msgid "Zip"
msgstr ""
-#: inc/class-wp-members.php:1178
+#: inc/class-wp-members.php:553
msgid "Country"
msgstr ""
-#: inc/class-wp-members.php:1179
+#: inc/class-wp-members.php:554
msgid "Day Phone"
msgstr ""
-#: inc/class-wp-members.php:1180 inc/class-wp-members.php:1211
+#: inc/class-wp-members.php:555 inc/class-wp-members.php:588
msgid "Email"
msgstr ""
-#: inc/class-wp-members.php:1181
+#: inc/class-wp-members.php:556
msgid "Confirm Email"
msgstr ""
-#: inc/class-wp-members.php:1182
+#: inc/class-wp-members.php:557
msgid "Website"
msgstr ""
-#: inc/class-wp-members.php:1183
+#: inc/class-wp-members.php:558
msgid "Biographical Info"
msgstr ""
-#: inc/class-wp-members.php:1184 inc/class-wp-members.php:1194
-#: inc/class-wp-members.php:1271
+#: inc/class-wp-members.php:559 inc/class-wp-members.php:569
+#: inc/class-wp-members.php:645
msgid "Password"
msgstr ""
-#: inc/class-wp-members.php:1185
+#: inc/class-wp-members.php:560
msgid "Confirm Password"
msgstr ""
-#: inc/class-wp-members.php:1186
+#: inc/class-wp-members.php:561
msgid "TOS"
msgstr ""
-#: inc/class-wp-members.php:1192
+#: inc/class-wp-members.php:567
msgid "Existing Users Log In"
msgstr ""
-#: inc/class-wp-members.php:1193 inc/class-wp-members.php:1210
-#: inc/class-wp-members.php:1233 inc/class-wp-members.php:1270
+#: inc/class-wp-members.php:568 inc/class-wp-members.php:587
+#: inc/class-wp-members.php:608 inc/class-wp-members.php:644
msgid "Username"
msgstr ""
-#: inc/class-wp-members.php:1195 inc/shortcodes.php:645
+#: inc/class-wp-members.php:570
msgid "Log In"
msgstr ""
-#: inc/class-wp-members.php:1196
+#: inc/class-wp-members.php:571
msgid "Remember Me"
msgstr ""
-#: inc/class-wp-members.php:1197
+#: inc/class-wp-members.php:572
msgid "Forgot password?"
msgstr ""
-#: inc/class-wp-members.php:1198
+#: inc/class-wp-members.php:573
msgid "Click here to reset"
msgstr ""
-#: inc/class-wp-members.php:1199
+#: inc/class-wp-members.php:574
msgid "New User?"
msgstr ""
-#: inc/class-wp-members.php:1200
+#: inc/class-wp-members.php:575
msgid "Click here to register"
msgstr ""
-#: inc/class-wp-members.php:1203 inc/class-wp-members.php:1256
+#: inc/class-wp-members.php:576
+msgid "Forgot username?"
+msgstr ""
+
+#: inc/class-wp-members.php:577
+msgid "Click here"
+msgstr ""
+
+#: inc/class-wp-members.php:580 inc/class-wp-members.php:630
msgid "Change Password"
msgstr ""
-#: inc/class-wp-members.php:1204
+#: inc/class-wp-members.php:581
msgid "New password"
msgstr ""
-#: inc/class-wp-members.php:1205
+#: inc/class-wp-members.php:582
msgid "Confirm new password"
msgstr ""
-#: inc/class-wp-members.php:1206
+#: inc/class-wp-members.php:583
msgid "Update Password"
msgstr ""
-#: inc/class-wp-members.php:1209
+#: inc/class-wp-members.php:586
msgid "Reset Forgotten Password"
msgstr ""
-#: inc/class-wp-members.php:1212
+#: inc/class-wp-members.php:589
msgid "Reset Password"
msgstr ""
-#: inc/class-wp-members.php:1213
-msgid "Forgot username?"
-msgstr ""
-
-#: inc/class-wp-members.php:1214
-msgid "Click here"
-msgstr ""
-
-#: inc/class-wp-members.php:1217 inc/class-wp-members.php:1219
+#: inc/class-wp-members.php:592 inc/class-wp-members.php:594
msgid "Retrieve username"
msgstr ""
-#: inc/class-wp-members.php:1218
+#: inc/class-wp-members.php:593
msgid "Email Address"
msgstr ""
-#: inc/class-wp-members.php:1222
+#: inc/class-wp-members.php:597
msgid "New User Registration"
msgstr ""
-#: inc/class-wp-members.php:1223
+#: inc/class-wp-members.php:598
msgid "Choose a Username"
msgstr ""
-#: inc/class-wp-members.php:1224
+#: inc/class-wp-members.php:599
msgid "Input the code:"
msgstr ""
-#: inc/class-wp-members.php:1225
+#: inc/class-wp-members.php:600
#, php-format
msgid "Please indicate that you agree to the %s TOS %s"
msgstr ""
-#: inc/class-wp-members.php:1226
+#: inc/class-wp-members.php:601
msgid "Reset Form"
msgstr ""
-#: inc/class-wp-members.php:1227 inc/class-wp-members.php:1274
-#: inc/shortcodes.php:642 inc/wp-registration.php:352
+#: inc/class-wp-members.php:602 inc/class-wp-members.php:648 inc/core.php:522
msgid "Register"
msgstr ""
-#: inc/class-wp-members.php:1229
+#: inc/class-wp-members.php:604
msgid "Required field"
msgstr ""
-#: inc/class-wp-members.php:1232 inc/deprecated.php:226
+#: inc/class-wp-members.php:607 inc/shortcodes.php:432
msgid "Edit Your Information"
msgstr ""
-#: inc/class-wp-members.php:1234
+#: inc/class-wp-members.php:609
msgid "Update Profile"
msgstr ""
-#: inc/class-wp-members.php:1235
+#: inc/class-wp-members.php:610
msgid "Update this file"
msgstr ""
-#: inc/class-wp-members.php:1238
+#: inc/class-wp-members.php:613
msgid "Login Failed!"
msgstr ""
-#: inc/class-wp-members.php:1239
+#: inc/class-wp-members.php:614
msgid "You entered an invalid username or password."
msgstr ""
-#: inc/class-wp-members.php:1240
+#: inc/class-wp-members.php:615
msgid "Click here to continue."
msgstr ""
-#: inc/class-wp-members.php:1241
+#: inc/class-wp-members.php:616
msgid "Password fields cannot be empty"
msgstr ""
-#: inc/class-wp-members.php:1242
+#: inc/class-wp-members.php:617
msgid "Sorry, that email address was not found."
msgstr ""
-#: inc/class-wp-members.php:1243
+#: inc/class-wp-members.php:618
#, php-format
msgid "An email was sent to %s with your username."
msgstr ""
-#: inc/class-wp-members.php:1244
+#: inc/class-wp-members.php:619
#, php-format
msgid "Sorry, %s is a required field."
msgstr ""
-#: inc/class-wp-members.php:1245
+#: inc/class-wp-members.php:620
msgid "You must enter a valid email address."
msgstr ""
-#: inc/class-wp-members.php:1246
+#: inc/class-wp-members.php:621
msgid "The username cannot include non-alphanumeric characters."
msgstr ""
-#: inc/class-wp-members.php:1247
+#: inc/class-wp-members.php:622
msgid "Sorry, username is a required field"
msgstr ""
-#: inc/class-wp-members.php:1248
+#: inc/class-wp-members.php:623
msgid "Passwords did not match."
msgstr ""
-#: inc/class-wp-members.php:1249
+#: inc/class-wp-members.php:624
msgid "Emails did not match."
msgstr ""
-#: inc/class-wp-members.php:1250
+#: inc/class-wp-members.php:625
msgid "You must complete the CAPTCHA form."
msgstr ""
-#: inc/class-wp-members.php:1251
+#: inc/class-wp-members.php:626
msgid "CAPTCHA was not valid."
msgstr ""
-#: inc/class-wp-members.php:1252 inc/register.php:53
-msgid "There was an error processing the form."
-msgstr ""
-
-#: inc/class-wp-members.php:1255
+#: inc/class-wp-members.php:629
msgid "Edit My Information"
msgstr ""
-#: inc/class-wp-members.php:1257 inc/class-wp-members.php:1260
-#: inc/class-wp-members.php:1262 inc/class-wp-members.php:1266
+#: inc/class-wp-members.php:631 inc/class-wp-members.php:634
+#: inc/class-wp-members.php:636 inc/class-wp-members.php:640
#, php-format
msgid "You are logged in as %s"
msgstr ""
-#: inc/class-wp-members.php:1258
+#: inc/class-wp-members.php:632
msgid "Click to log out."
msgstr ""
-#: inc/class-wp-members.php:1259
+#: inc/class-wp-members.php:633
msgid "Begin using the site."
msgstr ""
-#: inc/class-wp-members.php:1261
+#: inc/class-wp-members.php:635
msgid "Click to log out"
msgstr ""
-#: inc/class-wp-members.php:1263
+#: inc/class-wp-members.php:637
msgid "click to log out"
msgstr ""
-#: inc/class-wp-members.php:1267
+#: inc/class-wp-members.php:641
msgid "click here to log out"
msgstr ""
-#: inc/class-wp-members.php:1268
+#: inc/class-wp-members.php:642
msgid "Login Failed! You entered an invalid username or password."
msgstr ""
-#: inc/class-wp-members.php:1269
+#: inc/class-wp-members.php:643
msgid "You are not logged in."
msgstr ""
-#: inc/class-wp-members.php:1273
+#: inc/class-wp-members.php:646
+msgid "log in"
+msgstr ""
+
+#: inc/class-wp-members.php:647
msgid "Forgot?"
msgstr ""
-#: inc/class-wp-members.php:1277
+#: inc/class-wp-members.php:651
msgid ""
"This content is restricted to site members. If you are an existing user, "
"please log in. New users may register below."
msgstr ""
-#: inc/class-wp-members.php:1278
+#: inc/class-wp-members.php:652
msgid "Sorry, that username is taken, please try another."
msgstr ""
-#: inc/class-wp-members.php:1279
+#: inc/class-wp-members.php:653
msgid ""
"Sorry, that email address already has an account. Please try another."
msgstr ""
-#: inc/class-wp-members.php:1280
+#: inc/class-wp-members.php:654
msgid ""
"Congratulations! Your registration was successful.
You may now "
"log in using the password that was emailed to you."
msgstr ""
-#: inc/class-wp-members.php:1281
+#: inc/class-wp-members.php:655
msgid "Your information was updated!"
msgstr ""
-#: inc/class-wp-members.php:1282
+#: inc/class-wp-members.php:656
msgid "Passwords did not match.
Please try again."
msgstr ""
-#: inc/class-wp-members.php:1283
+#: inc/class-wp-members.php:657
msgid "Password successfully changed!"
msgstr ""
-#: inc/class-wp-members.php:1284
+#: inc/class-wp-members.php:658
msgid "Either the username or email address do not exist in our records."
msgstr ""
-#: inc/class-wp-members.php:1285
+#: inc/class-wp-members.php:659
msgid ""
"Password successfully reset!
An email containing a new password "
"has been sent to the email address on file for your account."
msgstr ""
-#: inc/register.php:407
+#: inc/core.php:106
+msgid "ERROR: User has not been activated."
+msgstr ""
+
+#: inc/register.php:45
+msgid "There was an error processing the form."
+msgstr ""
+
+#: inc/register.php:557
msgid "We were unable to validate the public key."
msgstr ""
-#: inc/register.php:411
+#: inc/register.php:561
msgid "We were unable to validate the private key."
msgstr ""
-#: inc/register.php:415
+#: inc/register.php:565
msgid "The challenge parameter of the verify script was incorrect."
msgstr ""
-#: inc/register.php:419
+#: inc/register.php:569
msgid "The CAPTCHA solution was incorrect."
msgstr ""
-#: inc/register.php:423
+#: inc/register.php:573
msgid "The parameters to verify were incorrect"
msgstr ""
-#: inc/register.php:427
+#: inc/register.php:577
msgid ""
"reCAPTCHA API keys are tied to a specific domain name for security reasons."
msgstr ""
-#: inc/register.php:431
+#: inc/register.php:581
msgid "The reCAPTCHA server was not reached. Please try to resubmit."
msgstr ""
-#: inc/register.php:435
+#: inc/register.php:585
msgid "You have entered an incorrect code value. Please try again."
msgstr ""
-#: inc/shortcodes.php:576
+#: inc/shortcodes.php:346
msgid "Click here to log out."
msgstr ""
-#: inc/utilities.php:121
+#: inc/users.php:37
+msgid "Additional Information"
+msgstr ""
+
+#: inc/utilities.php:202
msgid "(more…)"
msgstr ""
From f0c80e9f7aebfcbeb824399ef94ce7c18249c1cf Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Sat, 30 Dec 2017 22:07:09 -0600
Subject: [PATCH 0736/1694] add placeholder support for custom fields in
woocommerce reg form
---
inc/wp-registration.php | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/inc/wp-registration.php b/inc/wp-registration.php
index d867fdc9..a24beff9 100644
--- a/inc/wp-registration.php
+++ b/inc/wp-registration.php
@@ -126,7 +126,7 @@ function wpmem_do_wp_register_form( $process = 'wp' ) {
case( 'multicheckbox' ):
case( 'radio' ):
$row_before = '
',
- );
-
- /**
- * Filter sidebar login status arguments.
- *
- * @since 3.1.0
- * @since 3.1.2 Pass default args.
- *
- * @param array $defaults
- * @return array
- */
- $args = apply_filters( 'wpmem_sidebar_status_args', $defaults );
-
- // Merge $args with $defaults.
- $args = wp_parse_args( $args, $defaults );
-
- // Generate the message string.
- $str = $args['wrapper_before'] . $args['status_text'] . "" . $args['link_text'] . '' . $args['wrapper_after'];
-
- /**
- * Filter the sidebar user login status.
- *
- * @since unknown
- *
- * @param string $str The login status for the user.
- */
- $str = apply_filters( 'wpmem_sidebar_status', $str );
-
- echo $str;
- }
-}
-endif;
-
-// End of file.
\ No newline at end of file
From 9f65de35fa59c696edaa79fc0b0a4d239b06753e Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 13 Feb 2018 23:12:20 -0600
Subject: [PATCH 0759/1694] update comments
---
admin/tab-dropins.php | 1 +
inc/class-wp-members-forms.php | 2 ++
inc/class-wp-members-shortcodes.php | 11 +++++++++++
inc/class-wp-members.php | 5 +++--
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/admin/tab-dropins.php b/admin/tab-dropins.php
index 33ca0adf..11ea4709 100644
--- a/admin/tab-dropins.php
+++ b/admin/tab-dropins.php
@@ -170,6 +170,7 @@ function wpmem_a_render_dropins_table() {
global $wpmem;
// Get the dropin folder.
+ /** This filter is documented in inc/class-wp-members.php */
$folder = apply_filters( 'wpmem_dropin_folder', WPMEM_DROPIN_DIR );
// Set file headers for dropins.
diff --git a/inc/class-wp-members-forms.php b/inc/class-wp-members-forms.php
index 06e54def..884235c4 100644
--- a/inc/class-wp-members-forms.php
+++ b/inc/class-wp-members-forms.php
@@ -652,6 +652,7 @@ function login_form( $page, $arr ) {
* the generated form.
*
* @since 2.7.4
+ * @deprecated 3.2.0 Use wpmem_login_form instead.
*
* @param string $str The HTML to add before the form. Default null.
* @param string $arr['action'] The action being performed by the form. login|pwdreset|pwdchange|getusername.
@@ -1194,6 +1195,7 @@ function register_form( $tag = 'new', $heading = '', $redirect_to = null ) {
* the generated form.
*
* @since 2.7.4
+ * @deprecated 3.2.0 Use wpmem_register_form instead.
*
* @param string $str The HTML to add before the form. Default null.
* @param string $tag Toggle new registration or profile update. new|edit.
diff --git a/inc/class-wp-members-shortcodes.php b/inc/class-wp-members-shortcodes.php
index 6ff4aac8..34098892 100644
--- a/inc/class-wp-members-shortcodes.php
+++ b/inc/class-wp-members-shortcodes.php
@@ -60,6 +60,7 @@ function __construct() {
*
* @since 3.0.0
* @since 3.1.3 Added forgot_username shortcode.
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::forms().
*
* @global object $wpmem The WP_Members object.
* @global string $wpmem_themsg The WP-Members message container.
@@ -171,6 +172,7 @@ function forms( $atts, $content = null, $tag = 'wpmem_form' ) {
* only to logged out users or visitors.
*
* @since 3.0.0
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::logged_in().
*
* @global object $wpmem The WP_Members object.
*
@@ -263,6 +265,7 @@ function logged_in( $atts, $content = null, $tag = 'wpmem_logged_in' ) {
* Handles the [wpmem_logged_out] shortcode.
*
* @since 3.0.0
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::logged_out().
*
* @param array $atts
* @param string $content
@@ -283,6 +286,7 @@ function logged_out( $atts, $content = null, $tag ) {
*
* @since 3.0.0
* @since 3.1.5 Added total user count features.
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::user_count().
*
* @global object $wpdb The WordPress database object.
* @param array $atts {
@@ -321,6 +325,7 @@ function user_count( $atts, $content = null ) {
*
* @since 3.1.0
* @since 3.1.2 Added function arguments.
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::user_profile().
*
* @global object $wpmem The WP_Members object.
* @global string $wpmem_themsg The WP-Members message container.
@@ -436,6 +441,7 @@ function user_profile( $atts, $content, $tag ) {
*
* @since 3.1.1
* @since 3.1.6 Uses wpmem_loginout().
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::loginout().
*
* @param array $atts {
* The shortcode attributes.
@@ -473,6 +479,7 @@ function loginout( $atts, $content, $tag ) {
* @since 3.1.2
* @since 3.1.4 Changed to display value rather than stored value for dropdown/multicheck/radio.
* @since 3.1.5 Added display attribute, meta key as a direct attribute, and image/file display.
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::fields().
*
* @global object $wpmem The WP_Members object.
* @param array $atts {
@@ -587,6 +594,7 @@ function fields( $atts, $content = null, $tag ) {
* Logout link shortcode [wpmem_logout].
*
* @since 3.1.2
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::logout().
*
* @param array $atts {
* The shortcode attributes.
@@ -610,6 +618,7 @@ function logout( $atts, $content, $tag ) {
* TOS shortcode [wpmem_tos].
*
* @since 3.1.2
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::tos().
*
* @param array $atts {
* The shortcode attributes.
@@ -628,6 +637,7 @@ function tos( $atts, $content, $tag ) {
* Display user avatar.
*
* @since 3.1.7
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::avatar().
*
* @param array $atts {
* The shortcode attributes.
@@ -657,6 +667,7 @@ function avatar( $atts, $content, $tag ) {
* Generates a login link with a return url.
*
* @since 3.1.7
+ * @since 3.2.0 Moved to WP_Members_Shortcodes::login_link().
*
* @param array $atts {
* The shortcode attributes.
diff --git a/inc/class-wp-members.php b/inc/class-wp-members.php
index 9383a68d..27a846ed 100644
--- a/inc/class-wp-members.php
+++ b/inc/class-wp-members.php
@@ -244,6 +244,7 @@ function __construct() {
*/
require_once( WPMEM_PATH . 'wp-members-install.php' );
// Update settings.
+ /** This filter is documented in /inc/class-wp-members.php */
$settings = apply_filters( 'wpmem_settings', wpmem_do_install() );
}
@@ -1254,9 +1255,9 @@ function get_text( $str ) {
* Filter default terms.
*
* @since 3.1.0
- * @since 3.2.0 Passes $defaults param
+ * @since 3.2.0 Passes $defaults param as a required element.
*
- * @param array $defaults
+ * @param array $defaults (required)
*/
$text = apply_filters( 'wpmem_default_text_strings', $defaults );
From 24821dbcbdaf35396b2805f7adbb09040044e68b Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Sat, 10 Mar 2018 20:23:34 -0600
Subject: [PATCH 0760/1694] deprecated wpmem_settings_loaded, misc cleanup
---
.../class-wp-members-products-admin.php | 2 +-
admin/tab-about.php | 6 +--
inc/class-wp-members-user.php | 7 ++++
inc/class-wp-members.php | 39 +++++--------------
4 files changed, 20 insertions(+), 34 deletions(-)
diff --git a/admin/includes/class-wp-members-products-admin.php b/admin/includes/class-wp-members-products-admin.php
index 029a0348..e6494dc1 100644
--- a/admin/includes/class-wp-members-products-admin.php
+++ b/admin/includes/class-wp-members-products-admin.php
@@ -140,7 +140,7 @@ function details_html( $post ) {
get_meta( 'membership_product_role' ) ); ?>
-
+
get_meta( 'membership_product_expires' ) === 'expires' ) ? 'checked' : ''; ?>>
diff --git a/admin/tab-about.php b/admin/tab-about.php
index 725dc2bd..3f3158e5 100644
--- a/admin/tab-about.php
+++ b/admin/tab-about.php
@@ -65,16 +65,16 @@ function wpmem_a_build_about_tab() { ?>
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.)
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.
+ and be developed. Why put your trust in an unknown? WP-Members has a 12 year track record of active development and support.
diff --git a/inc/class-wp-members-user.php b/inc/class-wp-members-user.php
index 0b7765cc..8ec230bb 100644
--- a/inc/class-wp-members-user.php
+++ b/inc/class-wp-members-user.php
@@ -549,6 +549,25 @@ function set_user_product( $product, $user_id = false ) {
return update_user_meta( $user_id, '_wpmem_products', $user_products );
}
+ /**
+ * Removes a product from a user.
+ *
+ * @since 3.2.0
+ *
+ * @param string $product
+ * @param int $user_id
+ */
+ function remove_user_product( $product, $user_id = false ) {
+ global $wpmem;
+ $user_id = ( ! $user_id ) ? get_current_user_id() : $user_id;
+ $user_products = $this->get_user_products( $user_id );
+ if ( $user_products ) {
+ unset( $user_products[ $product ] );
+ update_user_meta( $user_id, '_wpmem_products', $user_products );
+ }
+ return;
+ }
+
/**
* Utility for expiration validation.
*
From b4973a49a70571f9dabcf81c20b021f926f731b4 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Sun, 1 Jul 2018 20:55:53 -0400
Subject: [PATCH 0809/1694] 3.2.0 beta release candidate 2
---
wp-members.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wp-members.php b/wp-members.php
index 1456e4f6..297cadfe 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -3,7 +3,7 @@
Plugin Name: WP-Members
Plugin URI: https://rocketgeek.com
Description: WP access restriction and user registration. For more information on plugin features, refer to the online Users Guide. A Quick Start Guide is also available. WP-Members(tm) is a trademark of butlerblog.com.
-Version: 3.2.0.rc.1
+Version: 3.2.0.rc.2
Author: Chad Butler
Author URI: http://butlerblog.com/
Text Domain: wp-members
@@ -66,7 +66,7 @@
}
// Initialize constants.
-define( 'WPMEM_VERSION', '3.2.0.rc.1' );
+define( 'WPMEM_VERSION', '3.2.0.rc.2' );
define( 'WPMEM_DEBUG', false );
define( 'WPMEM_DIR', plugin_dir_url ( __FILE__ ) );
define( 'WPMEM_PATH', plugin_dir_path( __FILE__ ) );
From 131ae15fba8399fcb881e548ec9cacf7cd5e0711 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 3 Jul 2018 08:07:39 -0400
Subject: [PATCH 0810/1694] fix where password fields were removed when in
register error
---
inc/register.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/inc/register.php b/inc/register.php
index a85b14a6..e0a49a92 100644
--- a/inc/register.php
+++ b/inc/register.php
@@ -121,9 +121,11 @@ function wpmem_registration( $tag ) {
*/
$wpmem->user->post_data = apply_filters( 'wpmem_pre_validate_form', $wpmem->user->post_data, $tag );
- $pass_arr = ( 'update' == $tag ) ? array( 'username', 'password', 'confirm_password', 'password_confirm' ) : array( 'password', 'confirm_password', 'password_confirm' );
- foreach ( $pass_arr as $pass ) {
- unset( $wpmem->fields[ $pass ] );
+ if ( 'update' == $tag ) {
+ $pass_arr = array( 'username', 'password', 'confirm_password', 'password_confirm' );
+ foreach ( $pass_arr as $pass ) {
+ unset( $wpmem->fields[ $pass ] );
+ }
}
// Check for required fields, reverse the array for logical error message order.
From 826b59c68d3ca09955a8b704925a73d9365e1025 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 3 Jul 2018 08:10:01 -0400
Subject: [PATCH 0811/1694] 3.2.0 beta release candidate 3
---
readme.txt | 65 ++++++++++++++++++++++----------------------------
wp-members.php | 4 ++--
2 files changed, 30 insertions(+), 39 deletions(-)
diff --git a/readme.txt b/readme.txt
index 2bcb7e35..6d0ae9e3 100644
--- a/readme.txt
+++ b/readme.txt
@@ -6,20 +6,18 @@ Tested up to: 4.9
Stable tag: 3.2.0
License: GPLv2
-WP-Members membership plugin turns your WordPress site into a membership site. Restrict premium content, create custom registration fields, and more.
+The WP-Members membership plugin turns your WordPress site into a membership site. Restrict premium content, create custom registration fields, and more.
== Description ==
=== Membership Sites. Simplified. ===
-You need a membership site. You want to focus on your business, not mastering a plugin. WP-Members is simple to use, yet flexible in every way imaginable.
+You need a membership site, but you want to focus on your business, not mastering a plugin. WP-Members is simple to use, easy to set up, yet flexible in every way imaginable.
-The plugin restricts selected WordPress® content to registered site members. WP-Members™ puts the registration process on the site front end so it is inline with your content rather than the native WP login page. WP-Members™ requires __no__ modifications to your theme while remainging scalable for users who want to customize the look and feel, or want to restrict only some content. It is a great tool for sites offering premium content to subscribers, and is adaptable to a variety of applications.
+The plugin restricts selected WordPress content to registered site members. WP-Members puts the registration process on the site front end so it is part of your content instead of the native WP login page. WP-Members requires no modifications to your theme while remaining scalable for users who want to customize the look and feel, or want to restrict only some content. It is a great tool for sites offering premium content to subscribers and is adaptable to a variety of applications.
Simple to install and configure - yet customizable and scalable!
-[youtube http://www.youtube.com/watch?v=x4MEoRLSY_U]
-
= Features: =
* Block posts, pages, and custom post types
@@ -29,85 +27,78 @@ Simple to install and configure - yet customizable and scalable!
* Notify admin of new user registrations
* Hold new registrations for admin approval
* Create post excerpt teaser content automatically
-* More than 100 action and filter hooks for extensibility
+* More than 120 action and filter hooks for customization
+* A library of API functions for extensibility
-By default, WordPress® allows all content to be "open" and viewable by anyone and allows the site owner to restrict specific content if desired by setting a password for the post. WP-Members™ operates with the reverse assumption. It restricts all posts by default but allows the site owner to "unblock" content as desired. WP-Members™ also offers the ability to change these default plugin settings. For those that simply want to utilize the member management features and possibly restrict some content, the default setting can easily be toggled to block or unblock pages and/or posts by default. No matter what the default setting, individual posts or pages can be set to be blocked or unblocked at the article level, overriding the default setting.
+WP-Members allows you to set content as blocked or hidden to restrict For those that simply want to utilize the member management features and possibly restrict some content, the default setting can easily be toggled to block or unblock pages and/or posts by default. No matter what the default setting, individual posts or pages can be set to be blocked or unblocked at the article level, overriding the default setting.
-The plugin installs with additional registration fields including name, address, phone, and email. Using the WP-Members™ admin panel, you can also create your own custom registration fields and delete existing ones. Changing the field order is simple with a drag-and-drop interface. All of the registration process is inline with your theme and content rather than using the WordPress® login page. This offers you a premium content site with a professional and branded look and feel. It also provides an opportunity for the user to register without leaving the page to do so - less clicks = more conversions.
+The plugin installs with additional registration fields including name, address, phone, and email. Using the WP-Members admin panel, you can also create your own custom registration fields and delete existing ones. Changing the field order is simple with a drag-and-drop interface. The registration form will be part of your content rather than using the WordPress login page. This offers you a premium content site with a professional and branded look and feel. It also provides an opportunity for the user to register without leaving the page to do so - less clicks = more conversions.
There are also some special pages that can be created with simple shortcodes:
* A User Profile page where registered members can edit their information and change/reset their password: [wpmem_profile]
-* A Registration page available for those that need a specific URL for registrations (such as email marketing or banner ad landing pages). Note: this is strictly optional as a registration form can also be included by default on blocked content pages: [wpmem_form register]
-* A Login page. This is also an optional page as the login form is included by default on blocked content. But if you need a specific login page, this can be created with a simple shortcode: [wpmem_form login]
+* A Registration page available for those that need a specific URL for registrations (such as email marketing or banner ad landing pages). Note: this is strictly optional as a registration form can also be included by default on blocked content pages: [wpmem_form register]
+* A Login page. This is also an optional page as the login form is included by default on blocked content. But if you need a specific login page, this can be created with a simple shortcode: [wpmem_form login]
* [And more shortcodes are available](https://rocketgeek.com/plugins/wp-members/users-guide/shortcodes/)!
-The plugin runs on a framework with over 100 action and filter hooks so you can fully customize your implementation.
-
-In addition to all of the features above, the plugin can be extended with premium add-on modules available from the support site rocketgeek.com. Members of rocketgeek.com have access to support, examples, tutorials, and code snippets that will help you extend and customize the base plugin using the plugin's framework. Some of the add-ons have their own hooks and shortcodes to further extend the plugin's extensibility. [Visit the site for more info](https://rocketgeek.com/about/site-membership-subscription/).
-
-= What the plugin does not do =
+Powerful cusotmizations can be constructed with over 100 action and filter hooks, as well as user accessible functions.
-WP-Members does not automatically hide absolutely everything from view. The default install of the plugin is designed to use "teaser" content to drive users to want to register. If you want certain content or menu elements completely hidden, there are ways to do that with some customization between your theme and the plugin, but it is not automatic.
+In addition to all of the features above, the plugin can be extended with premium add-on modules available from the support site rocketgeek.com. Members of rocketgeek.com have access to support, examples, tutorials, and code snippets that will help you extend and customize the base plugin using the plugin's framework. Some of the add-ons have their own hooks and shortcodes to further expand the plugin's extensibility. [Visit the site for more info](https://rocketgeek.com/about/site-membership-subscription/).
== Installation ==
-WP-Members™ is designed to run "out-of-the-box" with no modifications to your WP installation necessary. Please follow the installation instructions below. __Most of the support issues that arise are a result of improper installation or simply not reading/following directions__.
+WP-Members is designed to run "out-of-the-box" with no modifications to your WP installation necessary. Please follow the installation instructions below. __Most of the support issues that arise are a result of improper installation or simply not reading/following directions__.
= Basic Install: =
-The best start is to follow the instructions in the [Quick Start Guide](https://rocketgeek.com/plugins/wp-members/quick-start-guide/). There is also a complete [Users Guide available](https://rocketgeek.com/plugins/wp-members/users-guide/) that covers all of the plugin's features in depth.
+The best way to begin is to review the [Initial Setup Video](https://rocketgeek.com/plugins/wp-members/docs/videos/). There is also a complete [Users Guide available](https://rocketgeek.com/plugins/wp-members/docs/) that covers all of the plugin's features in depth.
1. Upload the `/wp-members/` directory and its contents to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress®
-You are ready to begin using WP-Members™. Now follow the instructions titled "Locking down your site" below.
-
-NOTE: Please follow instructions for installation. The vast majority of people that have marked the plugin as "broken" in the plugin compatibility form simply did not read/follow installation instructions. If something is unclear, ask for assistance.
+You are ready to begin using WP-Members. Now follow the instructions titled "Locking down your site" below.
= Locking down your site: =
-* To begin restricting posts, you will need to be using the `` link in your posts. Content above to the "more" split will display on summary pages (home, archive, category) but the user will be required to login to view the entire post. You may also use the plugin's auto excerpt setting to create post excerpts automatically. If you do not use the "more" tag or the auto excerpt setting, full post content is going to show on archive templates.
-* To begin restricting pages, change the plugin default setting for pages to be blocked. Unlike posts, the `` link is not necessary in the blocking of pages, but __must__ be used if you have the "show excerpts" setting turned on.
-* To protect comments, we recommend setting "Users must be registered and logged in to comment" under Settings > Discussion
-* Also on the page Settings > General, we recommend making sure "Anyone can register" is unchecked. While not required, this will prevent WP's native registration from colliding with WP-Members™, especially if you are using any of the WP-Members™ additional registration fields.
-* Under Settings > Reading, we recommend that "For each article in a feed, show" is set to "Summary." WordPress® installs with full feed settings by default. If you don't change this, your feeds will show full content.
+* To restrict posts, you will need to use the `` link in your posts. Content above to the "more" split will display on summary pages (home, archive, category) but the user will be required to login to view the entire post. You may also use the plugin's auto excerpt setting to create post excerpts automatically. If you do not use the "more" tag or the auto excerpt setting, full post content is going to show on archive templates, unless the post is marked as hidden.
+* To begin restricting pages, change the plugin default setting for pages to be blocked. Unlike posts, the `` link is not necessary in the blocking of pages, but __must__ be used if you have the "show excerpts" setting turned on for pages.
+* To protect comments, we recommend setting "Users must be registered and logged in to comment" under Settings > Discussion.
+* On the Settings > General page, it is recommended that you uncheck "Anyone can register". While not required, this will prevent WP's native registration from colliding with WP-Members, especially if you are using any of the WP-Members additional registration fields.
+* Under Settings > Reading, "For each article in a feed, show" is recommended to be set to "Summary." WordPress installs with full feed settings by default. If you don't change this, your feeds will show full content.
= Additional Settings and Information =
-A full Users Guide is [available here](https://rocketgeek.com/plugins/wp-members/users-guide/). The guide outlines the installation process, and also documents how to use all of the settings.
+A full Users Guide is [available here](https://rocketgeek.com/plugins/wp-members/docs/). The guide outlines the installation process, and also documents how to use all of the settings.
= Plugin Extensibility =
-WP-Members™ is designed to be an out-of-the-box usable plugin, but also have an extensible framework for maximum flexibility and customization. For this purpose, there are a number of shortcodes, filters, and actions that can be used.
+WP-Members is designed to be an out-of-the-box usable plugin, but also have an extensible framework for maximum flexibility and customization. For this purpose, there are a number of functions, shortcodes, filters, and actions that can be used.
See [this page](https://rocketgeek.com/plugins/wp-members/users-guide/shortcodes/) for a list of shortcodes and their description.
-The plugin has 80 filter and action hooks. For a list of hooks and a description of their use, see [this page](https://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/)
+The plugin has over 120 filter and action hooks. For a list of hooks and a description of their use, see [this page](https://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/)
-The plugin's premium support site has __loads__ of tips, tricks, and sample code for you to make maximum use out of the plugin. [Get more information here](https://rocketgeek.com/about/site-membership-subscription/). Members of the premium support site also have access to premium add-on modules.
+The plugin's premium support site has many tips, tricks, and sample code for you to make maximum use out of the plugin. [Get more information here](https://rocketgeek.com/plugins/wp-members/support-options/). Members of the premium support site also have access to premium add-on modules.
== Frequently Asked Questions ==
-The FAQs are maintained at https://rocketgeek.com/plugins/wp-members/users-guide/faqs/
+The FAQs are maintained at https://rocketgeek.com/plugins/wp-members/docs/faqs/
== Other Notes ==
-= Statement regarding the name WP-Members™ =
-
-WP-Members™ is a trademark of butlerblog.com.
+= WP-Members™ is a trademark of butlerblog.com =
-There are a number of commercial vendors offering products called WP-Members™ or a derivative thereof. Most of these products are neither free, nor are all of them open source. The original plugin hosted here has been publicly available since 2006 and in no way associated with any of these vendors. Tagging your support request in the wordpress.org forums attaches it to this plugin. If you are seeking support for one of these commercial products, you should seek support from the vendor. If you got it from a site other than [here](http://wordpress.org/extend/plugins/wp-members) then it isn't WP-Members™.
+There are a number of commercial vendors offering products called WP-Members. Most of these products are neither free and some are not open source. The original plugin hosted here has been publicly available since 2006 and is in no way associated with any of these vendors. If you are seeking support for one of these commercial products, you should seek support from the vendor. If you got it from a site other than [rocketgeek.com](https://rocketgeek.com/plugins/wp-members/) or [wordpress.org](https://wordpress.org/extend/plugins/wp-members) then it isn't WP-Members™.
An [official statement is available here](http://butlerblog.com/regarding-wp-members).
-= Regarding RocketGeek.com =
+= RocketGeek.com =
-Premium priority support is available at the plugin's site [RocketGeek.com](https://rocketgeek.com). A site membership includes priority support, members-only forum access, plugin extensions, and a custom code snippet library. [RocketGeek.com](https://rocketgeek.com) is the only site officially managed for this plugin's support.
+Premium priority support is available at the plugin's site [RocketGeek.com](https://rocketgeek.com). A site membership includes priority support, members-only forum access, plugin extensions, and a custom code snippet library. [RocketGeek.com](https://rocketgeek.com) is the only site officially managed for this plugin's support.
== Upgrade Notice ==
diff --git a/wp-members.php b/wp-members.php
index 297cadfe..5a712333 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -3,7 +3,7 @@
Plugin Name: WP-Members
Plugin URI: https://rocketgeek.com
Description: WP access restriction and user registration. For more information on plugin features, refer to the online Users Guide. A Quick Start Guide is also available. WP-Members(tm) is a trademark of butlerblog.com.
-Version: 3.2.0.rc.2
+Version: 3.2.0.rc.3
Author: Chad Butler
Author URI: http://butlerblog.com/
Text Domain: wp-members
@@ -66,7 +66,7 @@
}
// Initialize constants.
-define( 'WPMEM_VERSION', '3.2.0.rc.2' );
+define( 'WPMEM_VERSION', '3.2.0.rc.3' );
define( 'WPMEM_DEBUG', false );
define( 'WPMEM_DIR', plugin_dir_url ( __FILE__ ) );
define( 'WPMEM_PATH', plugin_dir_path( __FILE__ ) );
From fef55763f71e4d3e4ac8c9b9fcd072f533fd1dfd Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 3 Jul 2018 09:01:23 -0400
Subject: [PATCH 0812/1694] added placeholder, pattern, and title attribute
support for password fields
---
inc/class-wp-members-forms.php | 4 +++-
readme.txt | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/inc/class-wp-members-forms.php b/inc/class-wp-members-forms.php
index b008fe25..a1e44883 100644
--- a/inc/class-wp-members-forms.php
+++ b/inc/class-wp-members-forms.php
@@ -101,7 +101,9 @@ function create_form_field( $args ) {
case "password":
$class = $this->sanitize_class( $class );
$placeholder = ( $placeholder ) ? ' placeholder="' . esc_attr( $placeholder ) . '"' : '';
- $str = "";
+ $pattern = ( $pattern ) ? ' pattern="' . esc_attr( $pattern ) . '"' : '';
+ $title = ( $title ) ? ' title="' . esc_attr( $title ) . '"' : '';
+ $str = "";
break;
case "image":
diff --git a/readme.txt b/readme.txt
index 6d0ae9e3..ebe28b82 100644
--- a/readme.txt
+++ b/readme.txt
@@ -159,6 +159,7 @@ WP-Members 3.2.0 is a major update. See changelog for important details. Minimum
* HTML5 update - form anchor tags changed from "name" to "id".
* HTML5 update - form id tags set default value (can still be filtered).
* HTML5 update - removed "align" attribute (captcha, link-text).
+* HTML5 update - added placeholder, pattern, and title attribute support for password fields.
* Improved the add a field dialog to adjust required inputs depending on field type.
* Added placeholder, rows, and cols attribute support for textarea field settings.
* Moved remaining core functions to appropriate object classes, left wrappers for most.
From 88a75e3dce7758e454690646fbb7dfa8438d24be Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Tue, 3 Jul 2018 10:56:10 -0400
Subject: [PATCH 0813/1694] fix excluded fields for admin/user profile update
---
inc/class-wp-members-user-profile.php | 3 +--
inc/class-wp-members.php | 4 ++++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/inc/class-wp-members-user-profile.php b/inc/class-wp-members-user-profile.php
index aecedf3e..d55f12c5 100644
--- a/inc/class-wp-members-user-profile.php
+++ b/inc/class-wp-members-user-profile.php
@@ -296,8 +296,7 @@ static function update( $user_id ) {
*/
$fields = apply_filters( 'wpmem_' . $display . '_profile_update', $fields, $user_id );
- // Get any excluded meta fields.
- $exclude = wpmem_get_excluded_meta( 'admin-profile' );
+ // Handle meta update, skip excluded fields.
foreach ( $fields as $key => $val ) {
if ( ! in_array( $key, $exclude ) ) {
if ( ( 'admin' != $display && 'ok' == $chk ) || 'admin' == $display ) {
diff --git a/inc/class-wp-members.php b/inc/class-wp-members.php
index cb62dd46..eebf5f04 100644
--- a/inc/class-wp-members.php
+++ b/inc/class-wp-members.php
@@ -1089,6 +1089,10 @@ function excluded_fields( $tag ) {
$excluded_fields[] = 'username';
}
+ if ( 'admin-profile' == $tag || 'user-profile' == $tag ) {
+ array_push( $excluded_fields, 'first_name', 'last_name', 'nickname', 'display_name', 'user_email', 'description', 'user_url' );
+ }
+
/**
* Filter the fields to be excluded when user is created/updated.
*
From c40f019728ccbdd609becb7b556287021174fb62 Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 9 Jul 2018 10:25:27 -0400
Subject: [PATCH 0814/1694] fixes to 3.2 email object (from/from_name)
---
admin/tab-emails.php | 6 ++----
admin/tab-options.php | 5 -----
inc/class-wp-members-email.php | 19 +++++++++++++++----
wp-members-install.php | 22 +++++++---------------
4 files changed, 24 insertions(+), 28 deletions(-)
diff --git a/admin/tab-emails.php b/admin/tab-emails.php
index 6dbd98ae..30579c36 100644
--- a/admin/tab-emails.php
+++ b/admin/tab-emails.php
@@ -129,10 +129,8 @@ function wpmem_update_emails() {
if ( $wpmem->email->from != $_POST['wp_mail_from'] || $wpmem->email->from_name != $_POST['wp_mail_from_name'] ) {
$wpmem->email->from = sanitize_email( $_POST['wp_mail_from'] );
$wpmem->email->from_name = sanitize_text_field( $_POST['wp_mail_from_name'] );
- $wpmem_newsettings = get_option( 'wpmembers_settings' );
- $wpmem_newsettings['email']['from'] = sanitize_email( $_POST['wp_mail_from'] );
- $wpmem_newsettings['email']['from_name'] = sanitize_text_field( $_POST['wp_mail_from_name'] );
- update_option( 'wpmembers_settings', $wpmem_newsettings );
+ update_option( 'wpmembers_email_wpfrom', $wpmem->email->from );
+ update_option( 'wpmembers_email_wpname', $wpmem->email->from_name );
}
// Update the various emails being used.
diff --git a/admin/tab-options.php b/admin/tab-options.php
index 91aa23fb..559878a7 100644
--- a/admin/tab-options.php
+++ b/admin/tab-options.php
@@ -457,11 +457,6 @@ function wpmem_update_options() {
$wpmem_newsettings['form_tags'] = $wpmem->form_tags;
}
- // Leave email settings alone.
- if ( isset( $wpmem->email ) ) {
- $wpmem_newsettings['email'] = $wpmem->email;
- }
-
// Get settings for blocking, excerpts, show login, and show registration for posts, pages, and custom post types.
$option_group_array = array( 'block', 'show_excerpt', 'show_login', 'show_reg', 'autoex' );
foreach ( $option_group_array as $option_group_item ) {
diff --git a/inc/class-wp-members-email.php b/inc/class-wp-members-email.php
index 96b3cb55..e40d7078 100644
--- a/inc/class-wp-members-email.php
+++ b/inc/class-wp-members-email.php
@@ -50,6 +50,16 @@ class WP_Members_Email {
*/
public $settings;
+ /**
+ * Constructor
+ *
+ * @since 3.2.0
+ */
+ function __construct() {
+ $this->from = get_option( 'wpmembers_email_wpfrom', '' );
+ $this->from_name = get_option( 'wpmembers_email_wpname', '' );
+ }
+
/**
* Builds emails for the user.
*
@@ -239,7 +249,7 @@ function to_user( $user_id, $password, $tag, $wpmem_fields = null, $field_data =
$this->settings['body'] = ( $this->settings['add_footer'] ) ? $this->settings['body'] . "\r\n" . $foot : $this->settings['body'];
// Send message.
- $this->send();
+ $this->send( 'user' );
}
return;
@@ -456,7 +466,7 @@ function notify_admin( $user_id, $wpmem_fields = null, $field_data = null ) {
$this->settings['body'] = apply_filters( 'wpmem_email_notify', $this->settings['body'] );
// Send the message.
- $this->send();
+ $this->send( 'admin' );
}
}
@@ -497,11 +507,12 @@ function from_name( $name ) {
*
* @since 3.2.0
*/
- function send() {
+ function send( $to ) {
+ $send_to = ( 'user' == $to ) ? $this->settings['user_email'] : $this->settings['admin_email'];
// Apply WP's "from" and "from name" email filters.
add_filter( 'wp_mail_from', array( $this, 'from' ) );
add_filter( 'wp_mail_from_name', array( $this, 'from_name' ) );
// Send the message.
- wp_mail( $this->settings['user_email'], stripslashes( $this->settings['subj'] ), stripslashes( $this->settings['body'] ), $this->settings['headers'] );
+ wp_mail( $send_to, stripslashes( $this->settings['subj'] ), stripslashes( $this->settings['body'] ), $this->settings['headers'] );
}
}
\ No newline at end of file
diff --git a/wp-members-install.php b/wp-members-install.php
index bb0c6e3e..5c827e41 100644
--- a/wp-members-install.php
+++ b/wp-members-install.php
@@ -50,6 +50,7 @@ function wpmem_do_install() {
if ( ! get_option( 'wpmembers_settings' ) || $chk_force == true ) {
+ // New install.
$wpmem_settings = wpmem_install_settings();
wpmem_install_fields();
wpmem_install_dialogs();
@@ -58,6 +59,7 @@ function wpmem_do_install() {
} else {
+ // Upgrade.
$wpmem_settings = wpmem_upgrade_settings();
wpmem_upgrade_captcha();
wpmem_append_email();
@@ -129,14 +131,11 @@ function wpmem_upgrade_settings() {
$wpmem_settings['form_tags'] = array( 'default' => 'Registration Default' );
}
- // If email is not set, add it with existing setting or default.
- if ( ! isset( $wpmem_settings['email'] ) ) {
- $from = get_option( 'wpmembers_email_wpfrom' );
- $name = get_option( 'wpmembers_email_wpname' );
- $wpmem_settings['email'] = array(
- 'from' => ( $from ) ? $from : '',
- 'from_name' => ( $name ) ? $name : '',
- );
+ // If email is set in the settings array, change it back to the pre-3.1 option.
+ if ( isset( $wpmem_settings['email'] ) ) {
+ update_option( 'wpmembers_email_wpfrom', $wpmem_settings['email']['from'] );
+ update_option( 'wpmembers_email_wpname', $wpmem_settings['email']['from_name'] );
+ unset( $wpmem_settings['email'] );
}
// Version number should be updated no matter what.
@@ -199,12 +198,6 @@ function wpmem_upgrade_settings() {
// Add new settings.
$wpmem_newsettings['post_types'] = array();
$wpmem_settings['form_tags'] = array( 'default' => 'Registration Default' );
- $from = get_option( 'wpmembers_email_wpfrom' );
- $name = get_option( 'wpmembers_email_wpname' );
- $wpmem_settings['email'] = array(
- 'from' => ( $from ) ? $from : '',
- 'from_name' => ( $name ) ? $name : '',
- );
// Merge settings.
$wpmem_newsettings = array_merge( $wpmem_settings, $wpmem_newsettings );
@@ -511,7 +504,6 @@ function wpmem_install_settings() {
'attrib' => 0,
'post_types' => array(),
'form_tags' => array( 'default' => 'Registration Default' ),
- 'email' => array( 'from' => '', 'from_name' => '' ),
);
// Using update_option to allow for forced update.
From 5e7a5a5e30db45a34ab47b2ee748d6b2d3aa513c Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 9 Jul 2018 10:26:59 -0400
Subject: [PATCH 0815/1694] use sanitize_textarea_field for textarea in profile
---
inc/class-wp-members-user-profile.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/inc/class-wp-members-user-profile.php b/inc/class-wp-members-user-profile.php
index d55f12c5..069aa82e 100644
--- a/inc/class-wp-members-user-profile.php
+++ b/inc/class-wp-members-user-profile.php
@@ -262,7 +262,8 @@ static function update( $user_id ) {
&& $field['type'] != 'multiselect'
&& $field['type'] != 'multicheckbox'
&& $field['type'] != 'file'
- && $field['type'] != 'image' ) {
+ && $field['type'] != 'image'
+ && $field['type'] != 'textarea' ) {
( isset( $_POST[ $meta ] ) && 'password' != $field['type'] ) ? $fields[ $meta ] = sanitize_text_field( $_POST[ $meta ] ) : false;
// For user profile (not admin).
@@ -282,6 +283,8 @@ static function update( $user_id ) {
$fields[ $meta ] = ( isset( $_POST[ $meta ] ) ) ? sanitize_text_field( $_POST[ $meta ] ) : '';
} elseif ( $field['type'] == 'multiselect' || $field['type'] == 'multicheckbox' ) {
$fields[ $meta ] = ( isset( $_POST[ $meta ] ) ) ? implode( $field['delimiter'], wp_unslash( $_POST[ $meta ] ) ) : '';
+ } elseif ( $field['type'] == 'textarea' ) {
+ $fields[ $meta ] = ( isset( $_POST[ $meta ] ) ) ? sanitize_textarea_field( $_POST[ $meta ] ) : '';
}
}
From 89b108d99d8753cd370dd94d4d883de8c27a765c Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 9 Jul 2018 10:27:45 -0400
Subject: [PATCH 0816/1694] 3.2.0 beta release candidate 4
---
wp-members.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wp-members.php b/wp-members.php
index 5a712333..d372b96c 100644
--- a/wp-members.php
+++ b/wp-members.php
@@ -3,7 +3,7 @@
Plugin Name: WP-Members
Plugin URI: https://rocketgeek.com
Description: WP access restriction and user registration. For more information on plugin features, refer to the online Users Guide. A Quick Start Guide is also available. WP-Members(tm) is a trademark of butlerblog.com.
-Version: 3.2.0.rc.3
+Version: 3.2.0.rc.4
Author: Chad Butler
Author URI: http://butlerblog.com/
Text Domain: wp-members
@@ -66,7 +66,7 @@
}
// Initialize constants.
-define( 'WPMEM_VERSION', '3.2.0.rc.3' );
+define( 'WPMEM_VERSION', '3.2.0.rc.4' );
define( 'WPMEM_DEBUG', false );
define( 'WPMEM_DIR', plugin_dir_url ( __FILE__ ) );
define( 'WPMEM_PATH', plugin_dir_path( __FILE__ ) );
From d68d1502d72d7b21949fb927a8763e900db9fa2b Mon Sep 17 00:00:00 2001
From: Chad Butler
Date: Mon, 9 Jul 2018 19:30:51 -0400
Subject: [PATCH 0817/1694] 3.2.0 cleanup
---
admin/dialogs.php | 20 ++++++++++----------
readme.txt | 6 ++----
wp-members.php | 4 ++--
3 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/admin/dialogs.php b/admin/dialogs.php
index b74a4651..da97f751 100644
--- a/admin/dialogs.php
+++ b/admin/dialogs.php
@@ -238,16 +238,16 @@ function butlerblog_dashboard_widget() {
* @since 2.8.0
*/
function butlerblog_feed_output() {
- echo '