Ultimate Member – User Profile & Membership Plugin - Version 2.0.37

Version Description

Download this release

Release Info

Developer nsinelnikov
Plugin Icon 128x128 Ultimate Member – User Profile & Membership Plugin
Version 2.0.37
Comparing to
See all releases

Code changes from version 2.0.36 to 2.0.37

includes/admin/assets/js/um-admin-blocks.js CHANGED
@@ -11,8 +11,6 @@ var um_components = wp.components,
11
umTextareaControl = um_components.TextareaControl,
12
umPanelBody = um_components.PanelBody;
13
14
- var __ = wp.i18n.__;
15
-
16
var um_block_restriction = wp.compose.createHigherOrderComponent( function( BlockEdit ) {
17
var um_condition_fields = {
18
um_who_access:'um_block_settings_hide',
@@ -39,18 +37,18 @@ var um_block_restriction = wp.compose.createHigherOrderComponent( function( Bloc
39
um_condition_fields['um_roles_access'] = '';
40
um_condition_fields['um_message_type'] = '';
41
42
- if ( parseInt( props.attributes.um_message_type ) === 0 || typeof props.attributes.um_message_type === 'undefined' ) {
43
- um_condition_fields['um_message_content'] = 'um_block_settings_hide';
44
- } else {
45
um_condition_fields['um_message_content'] = '';
46
}
47
} else {
48
um_condition_fields['um_message_type'] = '';
49
50
- if ( parseInt( props.attributes.um_message_type ) === 0 || typeof props.attributes.um_message_type === 'undefined' ) {
51
- um_condition_fields['um_message_content'] = 'um_block_settings_hide';
52
- } else {
53
um_condition_fields['um_message_content'] = '';
54
}
55
}
56
}
@@ -65,12 +63,12 @@ var um_block_restriction = wp.compose.createHigherOrderComponent( function( Bloc
65
um_el(
66
umPanelBody,
67
{
68
- title: __( 'UM access Controls', 'ultimate-member' )
69
},
70
um_el(
71
umToggleControl,
72
{
73
- label: __( 'Restrict access?', 'ultimate-member' ),
74
checked: props.attributes.um_is_restrict,
75
onChange: function onChange( value ) {
76
props.setAttributes({ um_is_restrict: value });
@@ -90,19 +88,19 @@ var um_block_restriction = wp.compose.createHigherOrderComponent( function( Bloc
90
{
91
type: 'number',
92
className: um_condition_fields['um_who_access'],
93
- label: __( 'Who can access this content?', 'ultimate-member' ),
94
value: props.attributes.um_who_access,
95
options: [
96
{
97
- label: __( 'Everyone', 'ultimate-member' ),
98
value: 0
99
},
100
{
101
- label: __( 'Logged in users', 'ultimate-member' ),
102
value: 1
103
},
104
{
105
- label: __( 'Logged out users', 'ultimate-member' ),
106
value: 2
107
}
108
],
@@ -127,7 +125,7 @@ var um_block_restriction = wp.compose.createHigherOrderComponent( function( Bloc
127
{
128
multiple: true,
129
className: um_condition_fields['um_roles_access'],
130
- label: __( 'What roles can access this content?', 'ultimate-member' ),
131
value: props.attributes.um_roles_access,
132
options: um_restrict_roles,
133
onChange: function onChange( value ) {
@@ -140,24 +138,28 @@ var um_block_restriction = wp.compose.createHigherOrderComponent( function( Bloc
140
{
141
type: 'number',
142
className: um_condition_fields['um_message_type'],
143
- label: __( 'Restriction Message', 'ultimate-member' ),
144
value: props.attributes.um_message_type,
145
options: [
146
{
147
- label: __( 'Global default message', 'ultimate-member' ),
148
value: 0
149
},
150
{
151
- label: __( 'Custom Message', 'ultimate-member' ),
152
value: 1
153
}
154
],
155
onChange: function onChange( value ) {
156
props.setAttributes({ um_message_type: value });
157
- if ( parseInt( value ) === 0 ) {
158
- um_condition_fields['um_message_content'] = 'um_block_settings_hide';
159
- } else {
160
um_condition_fields['um_message_content'] = '';
161
}
162
}
163
}
@@ -167,7 +169,7 @@ var um_block_restriction = wp.compose.createHigherOrderComponent( function( Bloc
167
{
168
type: 'number',
169
className: um_condition_fields['um_message_content'],
170
- label: __( 'Message Content', 'ultimate-member' ),
171
value: props.attributes.um_message_content,
172
onChange: function onChange( value ) {
173
props.setAttributes({ um_message_content: value });
11
umTextareaControl = um_components.TextareaControl,
12
umPanelBody = um_components.PanelBody;
13
14
var um_block_restriction = wp.compose.createHigherOrderComponent( function( BlockEdit ) {
15
var um_condition_fields = {
16
um_who_access:'um_block_settings_hide',
37
um_condition_fields['um_roles_access'] = '';
38
um_condition_fields['um_message_type'] = '';
39
40
+ if ( parseInt( props.attributes.um_message_type ) === 2 ) {
41
um_condition_fields['um_message_content'] = '';
42
+ } else {
43
+ um_condition_fields['um_message_content'] = 'um_block_settings_hide';
44
}
45
} else {
46
um_condition_fields['um_message_type'] = '';
47
48
+ if ( parseInt( props.attributes.um_message_type ) === 2 ) {
49
um_condition_fields['um_message_content'] = '';
50
+ } else {
51
+ um_condition_fields['um_message_content'] = 'um_block_settings_hide';
52
}
53
}
54
}
63
um_el(
64
umPanelBody,
65
{
66
+ title: wp.i18n.__( 'UM access Controls', 'ultimate-member' )
67
},
68
um_el(
69
umToggleControl,
70
{
71
+ label: wp.i18n.__( 'Restrict access?', 'ultimate-member' ),
72
checked: props.attributes.um_is_restrict,
73
onChange: function onChange( value ) {
74
props.setAttributes({ um_is_restrict: value });
88
{
89
type: 'number',
90
className: um_condition_fields['um_who_access'],
91
+ label: wp.i18n.__( 'Who can access this content?', 'ultimate-member' ),
92
value: props.attributes.um_who_access,
93
options: [
94
{
95
+ label: wp.i18n.__( 'Everyone', 'ultimate-member' ),
96
value: 0
97
},
98
{
99
+ label: wp.i18n.__( 'Logged in users', 'ultimate-member' ),
100
value: 1
101
},
102
{
103
+ label: wp.i18n.__( 'Logged out users', 'ultimate-member' ),
104
value: 2
105
}
106
],
125
{
126
multiple: true,
127
className: um_condition_fields['um_roles_access'],
128
+ label: wp.i18n.__( 'What roles can access this content?', 'ultimate-member' ),
129
value: props.attributes.um_roles_access,
130
options: um_restrict_roles,
131
onChange: function onChange( value ) {
138
{
139
type: 'number',
140
className: um_condition_fields['um_message_type'],
141
+ label: wp.i18n.__( 'Restriction Action', 'ultimate-member' ),
142
value: props.attributes.um_message_type,
143
options: [
144
{
145
+ label: wp.i18n.__( 'Hide block', 'ultimate-member' ),
146
value: 0
147
},
148
{
149
+ label: wp.i18n.__( 'Show global default message', 'ultimate-member' ),
150
value: 1
151
+ },
152
+ {
153
+ label: wp.i18n.__( 'Show custom message', 'ultimate-member' ),
154
+ value: 2
155
}
156
],
157
onChange: function onChange( value ) {
158
props.setAttributes({ um_message_type: value });
159
+ if ( parseInt( value ) === 2 ) {
160
um_condition_fields['um_message_content'] = '';
161
+ } else {
162
+ um_condition_fields['um_message_content'] = 'um_block_settings_hide';
163
}
164
}
165
}
169
{
170
type: 'number',
171
className: um_condition_fields['um_message_content'],
172
+ label: wp.i18n.__( 'Restriction Message Content', 'ultimate-member' ),
173
value: props.attributes.um_message_content,
174
onChange: function onChange( value ) {
175
props.setAttributes({ um_message_content: value });
includes/admin/core/class-admin-columns.php CHANGED
@@ -31,6 +31,43 @@ if ( ! class_exists( 'um\admin\core\Admin_Columns' ) ) {
31
add_filter( 'display_post_states', array( &$this, 'add_display_post_states' ), 10, 2 );
32
33
add_filter( 'post_row_actions', array( &$this, 'remove_bulk_actions_um_form_inline' ) );
34
}
35
36
31
add_filter( 'display_post_states', array( &$this, 'add_display_post_states' ), 10, 2 );
32
33
add_filter( 'post_row_actions', array( &$this, 'remove_bulk_actions_um_form_inline' ) );
34
+
35
+ add_filter( 'manage_users_columns', array( &$this, 'manage_users_columns' ) );
36
+
37
+ add_filter( 'manage_users_custom_column', array( &$this, 'manage_users_custom_column' ), 10, 3 );
38
+ }
39
+
40
+
41
+ /**
42
+ * Filter: Add column 'Status'
43
+ *
44
+ * @param array $columns
45
+ *
46
+ * @return array
47
+ */
48
+ public function manage_users_columns( $columns ) {
49
+ $columns['account_status'] = __( 'Status', 'ultimate-member' );
50
+ return $columns;
51
+ }
52
+
53
+
54
+ /**
55
+ * Filter: Show column 'Status'
56
+ *
57
+ * @param string $val
58
+ * @param string $column_name
59
+ * @param int $user_id
60
+ *
61
+ * @return string
62
+ */
63
+ public function manage_users_custom_column( $val, $column_name, $user_id ) {
64
+ if ( $column_name == 'account_status' ) {
65
+ um_fetch_user( $user_id );
66
+ $value = um_user( 'account_status_name' );
67
+ um_reset_user();
68
+ return $value;
69
+ }
70
+ return $val;
71
}
72
73
includes/admin/core/class-admin-enqueue.php CHANGED
@@ -393,7 +393,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
393
* Load Gutenberg scripts
394
*/
395
function load_gutenberg_js() {
396
- wp_register_script( 'um_block_js', $this->js_url . 'um-admin-blocks.js', array( 'wp-i18n', 'wp-blocks', 'wp-editor', 'wp-components' ), ultimatemember_version, true );
397
wp_set_script_translations( 'um_block_js', 'ultimate-member' );
398
399
$restrict_options = array();
393
* Load Gutenberg scripts
394
*/
395
function load_gutenberg_js() {
396
+ //disable Gutenberg scripts to avoid the conflicts
397
+ $disable_script = apply_filters( 'um_disable_blocks_script', false );
398
+ if ( $disable_script ) {
399
+ return;
400
+ }
401
+
402
+ wp_register_script( 'um_block_js', $this->js_url . 'um-admin-blocks.js', array( 'wp-i18n', 'wp-blocks', 'wp-components' ), ultimatemember_version, true );
403
wp_set_script_translations( 'um_block_js', 'ultimate-member' );
404
405
$restrict_options = array();
includes/core/class-access.php CHANGED
@@ -1172,7 +1172,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
1172
return $block_content;
1173
}
1174
1175
- if ( $block['attrs']['um_is_restrict'] !== true ) {
1176
return $block_content;
1177
}
1178
@@ -1186,9 +1186,9 @@ if ( ! class_exists( 'um\core\Access' ) ) {
1186
if ( ! is_user_logged_in() ) {
1187
$block_content = '';
1188
if ( isset( $block['attrs']['um_message_type'] ) ) {
1189
- if ( $block['attrs']['um_message_type'] == '0' ) {
1190
$block_content = $default_message;
1191
- } elseif ( $block['attrs']['um_message_type'] == '1' ) {
1192
$block_content = $block['attrs']['um_message_content'];
1193
}
1194
}
@@ -1204,9 +1204,9 @@ if ( ! class_exists( 'um\core\Access' ) ) {
1204
if ( ! $display ) {
1205
$block_content = '';
1206
if ( isset( $block['attrs']['um_message_type'] ) ) {
1207
- if ( $block['attrs']['um_message_type'] == '0' ) {
1208
$block_content = $default_message;
1209
- } elseif ( $block['attrs']['um_message_type'] == '1' ) {
1210
$block_content = $block['attrs']['um_message_content'];
1211
}
1212
}
@@ -1219,9 +1219,9 @@ if ( ! class_exists( 'um\core\Access' ) ) {
1219
if ( is_user_logged_in() ) {
1220
$block_content = '';
1221
if ( isset( $block['attrs']['um_message_type'] ) ) {
1222
- if ( $block['attrs']['um_message_type'] == '0' ) {
1223
$block_content = $default_message;
1224
- } elseif ( $block['attrs']['um_message_type'] == '1' ) {
1225
$block_content = $block['attrs']['um_message_content'];
1226
}
1227
}
1172
return $block_content;
1173
}
1174
1175
+ if ( ! isset( $block['attrs']['um_is_restrict'] ) || $block['attrs']['um_is_restrict'] !== true ) {
1176
return $block_content;
1177
}
1178
1186
if ( ! is_user_logged_in() ) {
1187
$block_content = '';
1188
if ( isset( $block['attrs']['um_message_type'] ) ) {
1189
+ if ( $block['attrs']['um_message_type'] == '1' ) {
1190
$block_content = $default_message;
1191
+ } elseif ( $block['attrs']['um_message_type'] == '2' ) {
1192
$block_content = $block['attrs']['um_message_content'];
1193
}
1194
}
1204
if ( ! $display ) {
1205
$block_content = '';
1206
if ( isset( $block['attrs']['um_message_type'] ) ) {
1207
+ if ( $block['attrs']['um_message_type'] == '1' ) {
1208
$block_content = $default_message;
1209
+ } elseif ( $block['attrs']['um_message_type'] == '2' ) {
1210
$block_content = $block['attrs']['um_message_content'];
1211
}
1212
}
1219
if ( is_user_logged_in() ) {
1220
$block_content = '';
1221
if ( isset( $block['attrs']['um_message_type'] ) ) {
1222
+ if ( $block['attrs']['um_message_type'] == '1' ) {
1223
$block_content = $default_message;
1224
+ } elseif ( $block['attrs']['um_message_type'] == '2' ) {
1225
$block_content = $block['attrs']['um_message_content'];
1226
}
1227
}
languages/ultimate-member-en_US.mo CHANGED
Binary file
languages/ultimate-member-en_US.po CHANGED
@@ -1,8 +1,8 @@
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: Ultimate Member\n"
4
- "POT-Creation-Date: 2019-01-07 21:02+0200\n"
5
- "PO-Revision-Date: 2019-01-07 21:02+0200\n"
6
"Last-Translator: \n"
7
"Language-Team: \n"
8
"Language: en_US\n"
@@ -162,27 +162,31 @@ msgstr ""
162
msgid "This is not possible for security reasons."
163
msgstr ""
164
165
- #: includes/admin/core/class-admin-columns.php:64
166
msgid "Duplicate"
167
msgstr ""
168
169
- #: includes/admin/core/class-admin-columns.php:93
170
- #: includes/admin/core/class-admin-columns.php:113
171
#: includes/admin/templates/role/role-edit.php:171
172
msgid "Title"
173
msgstr ""
174
175
- #: includes/admin/core/class-admin-columns.php:94
176
- #: includes/admin/core/class-admin-columns.php:114
177
msgid "ID"
178
msgstr ""
179
180
- #: includes/admin/core/class-admin-columns.php:95
181
msgid "Type"
182
msgstr ""
183
184
- #: includes/admin/core/class-admin-columns.php:96
185
- #: includes/admin/core/class-admin-columns.php:115
186
#: includes/admin/core/class-admin-settings.php:314
187
#: includes/admin/templates/form/login_settings.php:13
188
#: includes/admin/templates/form/register_customize.php:3
@@ -190,20 +194,20 @@ msgstr ""
190
msgid "Default"
191
msgstr ""
192
193
- #: includes/admin/core/class-admin-columns.php:97
194
- #: includes/admin/core/class-admin-columns.php:116
195
#: includes/admin/core/class-admin-metabox.php:816
196
#: includes/admin/core/class-admin-metabox.php:977
197
msgid "Shortcode"
198
msgstr ""
199
200
- #: includes/admin/core/class-admin-columns.php:98
201
- #: includes/admin/core/class-admin-columns.php:117
202
msgid "Date"
203
msgstr ""
204
205
- #: includes/admin/core/class-admin-columns.php:148
206
- #: includes/admin/core/class-admin-columns.php:181
207
#: includes/admin/core/list-tables/roles-list-table.php:367
208
#: includes/admin/core/list-tables/roles-list-table.php:375
209
#: includes/admin/templates/form/login_customize.php:13
@@ -226,8 +230,8 @@ msgstr ""
226
msgid "No"
227
msgstr ""
228
229
- #: includes/admin/core/class-admin-columns.php:148
230
- #: includes/admin/core/class-admin-columns.php:181
231
#: includes/admin/core/list-tables/roles-list-table.php:367
232
#: includes/admin/core/list-tables/roles-list-table.php:375
233
#: includes/admin/templates/form/login_customize.php:14
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: Ultimate Member\n"
4
+ "POT-Creation-Date: 2019-01-08 14:00+0200\n"
5
+ "PO-Revision-Date: 2019-01-08 14:01+0200\n"
6
"Last-Translator: \n"
7
"Language-Team: \n"
8
"Language: en_US\n"
162
msgid "This is not possible for security reasons."
163
msgstr ""
164
165
+ #: includes/admin/core/class-admin-columns.php:49
166
+ msgid "Status"
167
+ msgstr ""
168
+
169
+ #: includes/admin/core/class-admin-columns.php:101
170
msgid "Duplicate"
171
msgstr ""
172
173
+ #: includes/admin/core/class-admin-columns.php:130
174
+ #: includes/admin/core/class-admin-columns.php:150
175
#: includes/admin/templates/role/role-edit.php:171
176
msgid "Title"
177
msgstr ""
178
179
+ #: includes/admin/core/class-admin-columns.php:131
180
+ #: includes/admin/core/class-admin-columns.php:151
181
msgid "ID"
182
msgstr ""
183
184
+ #: includes/admin/core/class-admin-columns.php:132
185
msgid "Type"
186
msgstr ""
187
188
+ #: includes/admin/core/class-admin-columns.php:133
189
+ #: includes/admin/core/class-admin-columns.php:152
190
#: includes/admin/core/class-admin-settings.php:314
191
#: includes/admin/templates/form/login_settings.php:13
192
#: includes/admin/templates/form/register_customize.php:3
194
msgid "Default"
195
msgstr ""
196
197
+ #: includes/admin/core/class-admin-columns.php:134
198
+ #: includes/admin/core/class-admin-columns.php:153
199
#: includes/admin/core/class-admin-metabox.php:816
200
#: includes/admin/core/class-admin-metabox.php:977
201
msgid "Shortcode"
202
msgstr ""
203
204
+ #: includes/admin/core/class-admin-columns.php:135
205
+ #: includes/admin/core/class-admin-columns.php:154
206
msgid "Date"
207
msgstr ""
208
209
+ #: includes/admin/core/class-admin-columns.php:185
210
+ #: includes/admin/core/class-admin-columns.php:218
211
#: includes/admin/core/list-tables/roles-list-table.php:367
212
#: includes/admin/core/list-tables/roles-list-table.php:375
213
#: includes/admin/templates/form/login_customize.php:13
230
msgid "No"
231
msgstr ""
232
233
+ #: includes/admin/core/class-admin-columns.php:185
234
+ #: includes/admin/core/class-admin-columns.php:218
235
#: includes/admin/core/list-tables/roles-list-table.php:367
236
#: includes/admin/core/list-tables/roles-list-table.php:375
237
#: includes/admin/templates/form/login_customize.php:14
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link:
6
Tags: community, member, membership, user-profile, user-registration
7
Requires at least: 4.7
8
Tested up to: 5.0
9
- Stable tag: 2.0.36
10
License: GNU Version 2 or Any Later Version
11
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
12
@@ -133,10 +133,18 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
133
134
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
135
136
= 2.0.36: January 7, 2019 =
137
138
* Enhancements:
139
- Added Block's restriction options
140
141
* Bugfixes:
142
- Fixed Live Preview form at wp-admin
@@ -146,7 +154,6 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
146
- Fixed small notices at frontend
147
- Fixed a few admin settings fields
148
- Fixed displaying comments when they are disabled
149
- - Added compatibility for upcoming User Events extension
150
151
= 2.0.35: December 9, 2018 =
152
6
Tags: community, member, membership, user-profile, user-registration
7
Requires at least: 4.7
8
Tested up to: 5.0
9
+ Stable tag: 2.0.37
10
License: GNU Version 2 or Any Later Version
11
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
12
133
134
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
135
136
+ = 2.0.37: January 8, 2019 =
137
+
138
+ * Enhancements:
139
+ - Additional Block's restriction options
140
+ - Added column to show User Account Status
141
+ - Added filter for disabling Gutenberg blocks restriction to avoid themes conflicts
142
+
143
= 2.0.36: January 7, 2019 =
144
145
* Enhancements:
146
- Added Block's restriction options
147
+ - Added compatibility for upcoming User Events extension
148
149
* Bugfixes:
150
- Fixed Live Preview form at wp-admin
154
- Fixed small notices at frontend
155
- Fixed a few admin settings fields
156
- Fixed displaying comments when they are disabled
157
158
= 2.0.35: December 9, 2018 =
159
ultimate-member.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
6
- Version: 2.0.36
7
Author: Ultimate Member
8
Author URI: http://ultimatemember.com/
9
Text Domain: ultimate-member
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
6
+ Version: 2.0.37
7
Author: Ultimate Member
8
Author URI: http://ultimatemember.com/
9
Text Domain: ultimate-member