Version Description
Download this release
Release Info
Developer | ultimatemember |
Plugin | Ultimate Member – User Profile & Membership Plugin |
Version | 1.3.27 |
Comparing to | |
See all releases |
Code changes from version 1.3.26 to 1.3.27
- admin/core/um-admin-users.php +1 -1
- core/um-builtin.php +8 -2
- core/um-query.php +0 -1
- core/um-short-functions.php +1 -30
- core/um-shortcodes.php +1 -3
- core/um-user.php +7 -28
- index.php +1 -1
- readme.txt +5 -1
admin/core/um-admin-users.php
CHANGED
@@ -337,7 +337,7 @@ class UM_Admin_Users {
|
|
337 |
delete_option( "um_cache_userdata_{$user_id}" );
|
338 |
}
|
339 |
um_fetch_user( $user_id );
|
340 |
-
return um_user('
|
341 |
|
342 |
}
|
343 |
|
337 |
delete_option( "um_cache_userdata_{$user_id}" );
|
338 |
}
|
339 |
um_fetch_user( $user_id );
|
340 |
+
return $ultimatemember->user->get_role_name( um_user('role') );
|
341 |
|
342 |
}
|
343 |
|
core/um-builtin.php
CHANGED
@@ -522,6 +522,12 @@ class UM_Builtin {
|
|
522 |
|
523 |
global $ultimatemember;
|
524 |
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
$profile_privacy = apply_filters('um_profile_privacy_options', array( __('Everyone','ultimatemember'), __('Only me','ultimatemember') ) );
|
526 |
|
527 |
$this->predefined_fields = array(
|
@@ -827,7 +833,7 @@ class UM_Builtin {
|
|
827 |
'required' => 0,
|
828 |
'public' => 1,
|
829 |
'editable' => 1,
|
830 |
-
'options' => $
|
831 |
),
|
832 |
|
833 |
'role_radio' => array(
|
@@ -838,7 +844,7 @@ class UM_Builtin {
|
|
838 |
'required' => 0,
|
839 |
'public' => 1,
|
840 |
'editable' => 1,
|
841 |
-
'options' => $
|
842 |
),
|
843 |
|
844 |
'languages' => array(
|
522 |
|
523 |
global $ultimatemember;
|
524 |
|
525 |
+
if ( class_exists('UM_Query') ) {
|
526 |
+
$um_roles = $ultimatemember->query->get_roles( false, array('admin') );
|
527 |
+
} else {
|
528 |
+
$um_roles = array();
|
529 |
+
}
|
530 |
+
|
531 |
$profile_privacy = apply_filters('um_profile_privacy_options', array( __('Everyone','ultimatemember'), __('Only me','ultimatemember') ) );
|
532 |
|
533 |
$this->predefined_fields = array(
|
833 |
'required' => 0,
|
834 |
'public' => 1,
|
835 |
'editable' => 1,
|
836 |
+
'options' => $um_roles,
|
837 |
),
|
838 |
|
839 |
'role_radio' => array(
|
844 |
'required' => 0,
|
845 |
'public' => 1,
|
846 |
'editable' => 1,
|
847 |
+
'options' => $um_roles,
|
848 |
),
|
849 |
|
850 |
'languages' => array(
|
core/um-query.php
CHANGED
@@ -258,7 +258,6 @@ class UM_Query {
|
|
258 |
if ( isset($post_id) && $post_id != '' ){
|
259 |
$meta = get_post_custom( $post_id );
|
260 |
$array['role'] = $real_role_slug;
|
261 |
-
$array['role_name'] = get_the_title( $post_id );
|
262 |
foreach ($meta as $k => $v){
|
263 |
if ( strstr($k, '_um_') ) {
|
264 |
$k = str_replace('_um_', '', $k);
|
258 |
if ( isset($post_id) && $post_id != '' ){
|
259 |
$meta = get_post_custom( $post_id );
|
260 |
$array['role'] = $real_role_slug;
|
|
|
261 |
foreach ($meta as $k => $v){
|
262 |
if ( strstr($k, '_um_') ) {
|
263 |
$k = str_replace('_um_', '', $k);
|
core/um-short-functions.php
CHANGED
@@ -1142,36 +1142,7 @@ function um_fetch_user( $user_id ) {
|
|
1142 |
return $uri;
|
1143 |
return '';
|
1144 |
}
|
1145 |
-
|
1146 |
-
/**
|
1147 |
-
* @function um_user()
|
1148 |
-
*
|
1149 |
-
* @description This function can be used to get user's data. This can be user profile data or user permissions.
|
1150 |
-
*
|
1151 |
-
* @usage <?php echo um_user( $data ); ?>
|
1152 |
-
*
|
1153 |
-
* @param $data (string) (required) The field or data you want to retrieve for user.
|
1154 |
-
* @param $attrs (string) (optional) Additional attribute for profile data that may need extra configuration.
|
1155 |
-
*
|
1156 |
-
* @returns Returns the user data requested If found. A user must be previously set using um_fetch_user() to
|
1157 |
-
properly retrieve user data.
|
1158 |
-
*
|
1159 |
-
* @example The example below can retrieve the user's display name
|
1160 |
|
1161 |
-
<?php
|
1162 |
-
|
1163 |
-
$display_name = um_user('display_name');
|
1164 |
-
echo $display_name; // prints the user's display name
|
1165 |
-
|
1166 |
-
?>
|
1167 |
-
|
1168 |
-
*
|
1169 |
-
* @example The example below can retrieve user's community role
|
1170 |
-
|
1171 |
-
<?php echo um_user('role_name'); // example: Member or Admin ?>
|
1172 |
-
|
1173 |
-
*
|
1174 |
-
*/
|
1175 |
function um_user( $data, $attrs = null ) {
|
1176 |
|
1177 |
global $ultimatemember;
|
@@ -1279,7 +1250,7 @@ function um_user( $data, $attrs = null ) {
|
|
1279 |
|
1280 |
case 'role_select':
|
1281 |
case 'role_radio':
|
1282 |
-
return um_user('
|
1283 |
break;
|
1284 |
|
1285 |
case 'submitted':
|
1142 |
return $uri;
|
1143 |
return '';
|
1144 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1146 |
function um_user( $data, $attrs = null ) {
|
1147 |
|
1148 |
global $ultimatemember;
|
1250 |
|
1251 |
case 'role_select':
|
1252 |
case 'role_radio':
|
1253 |
+
return $ultimatemember->user->get_role_name( um_user('role') );
|
1254 |
break;
|
1255 |
|
1256 |
case 'submitted':
|
core/um-shortcodes.php
CHANGED
@@ -89,9 +89,7 @@ class UM_Shortcodes {
|
|
89 |
***/
|
90 |
function body_class( $classes ) {
|
91 |
global $ultimatemember;
|
92 |
-
|
93 |
-
$classes[] = ( $ultimatemember->mobile->isMobile() ) ? 'um-mobile' : 'um-desktop';
|
94 |
-
|
95 |
$array = $ultimatemember->permalinks->core;
|
96 |
if ( !$array ) return $classes;
|
97 |
|
89 |
***/
|
90 |
function body_class( $classes ) {
|
91 |
global $ultimatemember;
|
92 |
+
|
|
|
|
|
93 |
$array = $ultimatemember->permalinks->core;
|
94 |
if ( !$array ) return $classes;
|
95 |
|
core/um-user.php
CHANGED
@@ -539,6 +539,9 @@ class UM_User {
|
|
539 |
function deactivate(){
|
540 |
global $ultimatemember;
|
541 |
$this->set_status('inactive');
|
|
|
|
|
|
|
542 |
$ultimatemember->mail->send( um_user('user_email'), 'inactive_email' );
|
543 |
}
|
544 |
|
@@ -619,34 +622,10 @@ class UM_User {
|
|
619 |
}
|
620 |
}
|
621 |
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
*
|
627 |
-
* @usage <?php $ultimatemember->user->get_role_name(); ?>
|
628 |
-
*
|
629 |
-
* @returns The user role's name.
|
630 |
-
*
|
631 |
-
* @example Do something if the user's role is Paid Customer
|
632 |
-
|
633 |
-
<?php
|
634 |
-
|
635 |
-
um_fetch_user( 12 );
|
636 |
-
|
637 |
-
if ( $ultimatemember->user->get_role_name() == 'Paid Customer' ) {
|
638 |
-
// Show this to paid customers
|
639 |
-
} else {
|
640 |
-
// You are a free member
|
641 |
-
}
|
642 |
-
|
643 |
-
?>
|
644 |
-
|
645 |
-
*
|
646 |
-
*
|
647 |
-
*/
|
648 |
-
function get_role_name() {
|
649 |
-
return $this->profile['role_name'];
|
650 |
}
|
651 |
|
652 |
/***
|
539 |
function deactivate(){
|
540 |
global $ultimatemember;
|
541 |
$this->set_status('inactive');
|
542 |
+
|
543 |
+
do_action('um_after_user_is_inactive', um_user('ID') );
|
544 |
+
|
545 |
$ultimatemember->mail->send( um_user('user_email'), 'inactive_email' );
|
546 |
}
|
547 |
|
622 |
}
|
623 |
}
|
624 |
|
625 |
+
function get_role_name( $slug ) {
|
626 |
+
global $wpdb;
|
627 |
+
$post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'um_role' AND post_name = '$slug'");
|
628 |
+
return get_the_title( $post_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
629 |
}
|
630 |
|
631 |
/***
|
index.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: 1.3.
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
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: 1.3.27
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
|
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.3
|
9 |
|
10 |
-
Stable Tag: 1.3.
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
@@ -154,6 +154,10 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
154 |
|
155 |
== Changelog ==
|
156 |
|
|
|
|
|
|
|
|
|
157 |
= 1.3.26: September 25, 2015 =
|
158 |
|
159 |
* New: added Greek language support
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.3
|
9 |
|
10 |
+
Stable Tag: 1.3.27
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
154 |
|
155 |
== Changelog ==
|
156 |
|
157 |
+
= 1.3.27: October 13, 2015 =
|
158 |
+
|
159 |
+
* Fixed: Role name display in Users dashboard
|
160 |
+
|
161 |
= 1.3.26: September 25, 2015 =
|
162 |
|
163 |
* New: added Greek language support
|