Version Description
Download this release
Release Info
Developer | champsupertramp |
Plugin | Ultimate Member – User Profile & Membership Plugin |
Version | 1.3.50 |
Comparing to | |
See all releases |
Code changes from version 1.3.49 to 1.3.50
- assets/css/um-fileupload.css +10 -10
- core/um-actions-access.php +5 -0
- core/um-actions-account.php +5 -0
- core/um-actions-members.php +1 -1
- core/um-members.php +4 -2
- core/um-navmenu-walker-edit.php +27 -9
- core/um-short-functions.php +57 -7
- core/um-tracking.php +1 -1
- index.php +1 -1
- readme.txt +11 -2
assets/css/um-fileupload.css
CHANGED
@@ -110,21 +110,21 @@
|
|
110 |
- upload progress
|
111 |
*/
|
112 |
|
113 |
-
.upload-statusbar {
|
114 |
margin: 20px 0 0 0;
|
115 |
}
|
116 |
|
117 |
-
.upload-filename {
|
118 |
display: none !important;
|
119 |
}
|
120 |
|
121 |
-
.upload-progress {
|
122 |
position: relative;
|
123 |
width: 100%;
|
124 |
box-sizing: border-box;
|
125 |
}
|
126 |
|
127 |
-
.upload-bar {
|
128 |
width: 0;
|
129 |
height: 10px;
|
130 |
color: #666;
|
@@ -138,7 +138,7 @@
|
|
138 |
- drag and drop area
|
139 |
*/
|
140 |
|
141 |
-
.ajax-upload-dragdrop {
|
142 |
width: 100%;
|
143 |
text-align: center;
|
144 |
vertical-align:middle;
|
@@ -152,12 +152,12 @@
|
|
152 |
line-height: 1em;
|
153 |
}
|
154 |
|
155 |
-
.ajax-upload-dragdrop span.str {
|
156 |
display: block;
|
157 |
margin: 0 0 15px 0;
|
158 |
}
|
159 |
|
160 |
-
.ajax-upload-dragdrop span.icon {
|
161 |
display: block;
|
162 |
font-size: 80px;
|
163 |
line-height: 80px;
|
@@ -165,7 +165,7 @@
|
|
165 |
margin-bottom: 10px;
|
166 |
}
|
167 |
|
168 |
-
.ajax-upload-dragdrop span.help {
|
169 |
display: block;
|
170 |
font-size: 14px;
|
171 |
color: #aaa;
|
@@ -176,7 +176,7 @@
|
|
176 |
- upload button
|
177 |
*/
|
178 |
|
179 |
-
.upload {
|
180 |
cursor: pointer !important;
|
181 |
line-height: 34px !important;
|
182 |
height: 34px;
|
@@ -193,7 +193,7 @@
|
|
193 |
transition: 0.2s;
|
194 |
}
|
195 |
|
196 |
-
.upload:hover {
|
197 |
background: #44b0ec;
|
198 |
}
|
199 |
|
110 |
- upload progress
|
111 |
*/
|
112 |
|
113 |
+
div.um-modal .upload-statusbar {
|
114 |
margin: 20px 0 0 0;
|
115 |
}
|
116 |
|
117 |
+
div.um-modal .upload-filename {
|
118 |
display: none !important;
|
119 |
}
|
120 |
|
121 |
+
div.um-modal .upload-progress {
|
122 |
position: relative;
|
123 |
width: 100%;
|
124 |
box-sizing: border-box;
|
125 |
}
|
126 |
|
127 |
+
div.um-modal .upload-bar {
|
128 |
width: 0;
|
129 |
height: 10px;
|
130 |
color: #666;
|
138 |
- drag and drop area
|
139 |
*/
|
140 |
|
141 |
+
div.um-modal .ajax-upload-dragdrop {
|
142 |
width: 100%;
|
143 |
text-align: center;
|
144 |
vertical-align:middle;
|
152 |
line-height: 1em;
|
153 |
}
|
154 |
|
155 |
+
div.um-modal .ajax-upload-dragdrop span.str {
|
156 |
display: block;
|
157 |
margin: 0 0 15px 0;
|
158 |
}
|
159 |
|
160 |
+
div.um-modal .ajax-upload-dragdrop span.icon {
|
161 |
display: block;
|
162 |
font-size: 80px;
|
163 |
line-height: 80px;
|
165 |
margin-bottom: 10px;
|
166 |
}
|
167 |
|
168 |
+
div.um-modal .ajax-upload-dragdrop span.help {
|
169 |
display: block;
|
170 |
font-size: 14px;
|
171 |
color: #aaa;
|
176 |
- upload button
|
177 |
*/
|
178 |
|
179 |
+
div.um-modal .upload {
|
180 |
cursor: pointer !important;
|
181 |
line-height: 34px !important;
|
182 |
height: 34px;
|
193 |
transition: 0.2s;
|
194 |
}
|
195 |
|
196 |
+
div.um-modal .upload:hover {
|
197 |
background: #44b0ec;
|
198 |
}
|
199 |
|
core/um-actions-access.php
CHANGED
@@ -144,6 +144,11 @@
|
|
144 |
$post_id = get_option('woocommerce_shop_page_id');
|
145 |
|
146 |
} else if ( is_archive() || is_front_page() || is_home() || is_search() || in_the_loop() || is_feed() ) {
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
return;
|
149 |
|
144 |
$post_id = get_option('woocommerce_shop_page_id');
|
145 |
|
146 |
} else if ( is_archive() || is_front_page() || is_home() || is_search() || in_the_loop() || is_feed() ) {
|
147 |
+
|
148 |
+
$current_page_type = um_get_current_page_type();
|
149 |
+
|
150 |
+
do_action("um_access_post_type",$current_page_type);
|
151 |
+
do_action("um_access_post_type_{$current_page_type}");
|
152 |
|
153 |
return;
|
154 |
|
core/um-actions-account.php
CHANGED
@@ -132,6 +132,11 @@
|
|
132 |
}
|
133 |
}
|
134 |
|
|
|
|
|
|
|
|
|
|
|
135 |
// delete account
|
136 |
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account','ultimatemember') ) {
|
137 |
if ( strlen(trim( $_POST['single_user_password'] ) ) == 0 ) {
|
132 |
}
|
133 |
}
|
134 |
|
135 |
+
if ( ! empty( $_POST['user_login'] ) && ! validate_username( $_POST['user_login'] ) ) {
|
136 |
+
$ultimatemember->form->add_error('user_login', __('Your username is invalid','ultimatemember') );
|
137 |
+
return;
|
138 |
+
}
|
139 |
+
|
140 |
// delete account
|
141 |
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account','ultimatemember') ) {
|
142 |
if ( strlen(trim( $_POST['single_user_password'] ) ) == 0 ) {
|
core/um-actions-members.php
CHANGED
@@ -35,7 +35,7 @@
|
|
35 |
|
36 |
<?php if ( isset( $_REQUEST['page_id'] ) && get_option('permalink_structure') == 0 ) { ?>
|
37 |
|
38 |
-
<input type="hidden" name="page_id" id="page_id" value="<?php echo $_REQUEST['page_id']; ?>" />
|
39 |
|
40 |
<?php }
|
41 |
|
35 |
|
36 |
<?php if ( isset( $_REQUEST['page_id'] ) && get_option('permalink_structure') == 0 ) { ?>
|
37 |
|
38 |
+
<input type="hidden" name="page_id" id="page_id" value="<?php echo esc_attr( $_REQUEST['page_id']); ?>" />
|
39 |
|
40 |
<?php }
|
41 |
|
core/um-members.php
CHANGED
@@ -125,7 +125,7 @@ class UM_Members {
|
|
125 |
|
126 |
?>
|
127 |
|
128 |
-
<input type="text"
|
129 |
|
130 |
<?php
|
131 |
|
@@ -140,14 +140,16 @@ class UM_Members {
|
|
140 |
***/
|
141 |
function get_members($args){
|
142 |
|
143 |
-
global $ultimatemember;
|
144 |
|
145 |
extract($args);
|
146 |
|
147 |
$query_args = array();
|
148 |
$query_args = apply_filters( 'um_prepare_user_query_args', $query_args, $args );
|
|
|
149 |
$users = new WP_User_Query( $query_args );
|
150 |
|
|
|
151 |
// number of profiles for mobile
|
152 |
if ( $ultimatemember->mobile->isMobile() && isset( $profiles_per_page_mobile ) )
|
153 |
$profiles_per_page = $profiles_per_page_mobile;
|
125 |
|
126 |
?>
|
127 |
|
128 |
+
<input type="text" name="<?php echo $filter; ?>" id="<?php echo $filter; ?>" placeholder="<?php echo isset( $attrs['label'] ) ? $attrs['label'] : ''; ?>" value='<?php echo esc_attr( um_queried_search_value( $filter, false ) ); ?>' />
|
129 |
|
130 |
<?php
|
131 |
|
140 |
***/
|
141 |
function get_members($args){
|
142 |
|
143 |
+
global $ultimatemember, $wpdb;
|
144 |
|
145 |
extract($args);
|
146 |
|
147 |
$query_args = array();
|
148 |
$query_args = apply_filters( 'um_prepare_user_query_args', $query_args, $args );
|
149 |
+
$wpdb->query('SET SQL_BIG_SELECTS=1');
|
150 |
$users = new WP_User_Query( $query_args );
|
151 |
|
152 |
+
|
153 |
// number of profiles for mobile
|
154 |
if ( $ultimatemember->mobile->isMobile() && isset( $profiles_per_page_mobile ) )
|
155 |
$profiles_per_page = $profiles_per_page_mobile;
|
core/um-navmenu-walker-edit.php
CHANGED
@@ -28,15 +28,32 @@ class UM_Menu_Item_Custom_Fields_Editor {
|
|
28 |
}
|
29 |
|
30 |
foreach ( self::$fields as $_key => $label ) {
|
31 |
-
|
|
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
//
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
// Update
|
@@ -65,6 +82,7 @@ class UM_Menu_Item_Custom_Fields_Editor {
|
|
65 |
$key = sprintf( 'menu-item-%s', $_key );
|
66 |
$id = sprintf( 'edit-%s-%s', $key, $item->ID );
|
67 |
$name = sprintf( '%s[%s]', $key, $item->ID );
|
|
|
68 |
$value = get_post_meta( $item->ID, $key, true );
|
69 |
$class = sprintf( 'field-%s', $_key );
|
70 |
?>
|
@@ -98,7 +116,7 @@ class UM_Menu_Item_Custom_Fields_Editor {
|
|
98 |
<p class="description">
|
99 |
|
100 |
<?php foreach($ultimatemember->query->get_roles() as $role_id => $role) { ?>
|
101 |
-
<label><input type="checkbox" name="<?php echo $
|
102 |
<?php } ?>
|
103 |
|
104 |
</p>
|
28 |
}
|
29 |
|
30 |
foreach ( self::$fields as $_key => $label ) {
|
31 |
+
|
32 |
+
if( $_key == 'um_nav_roles' ){
|
33 |
|
34 |
+
$role_key = sprintf( 'menu-item-%s%d', $_key, $menu_item_db_id );
|
35 |
+
$key = sprintf( 'menu-item-%s', $_key );
|
36 |
+
// Sanitize
|
37 |
+
if ( ! empty( $_POST[ $role_key ] ) ) {
|
38 |
+
// Do some checks here...
|
39 |
+
$value = $_POST[ $role_key ];
|
40 |
+
}
|
41 |
+
else {
|
42 |
+
$value = null;
|
43 |
+
}
|
44 |
+
|
45 |
+
}else{
|
46 |
+
|
47 |
+
$key = sprintf( 'menu-item-%s', $_key );
|
48 |
+
|
49 |
+
// Sanitize
|
50 |
+
if ( ! empty( $_POST[ $key ][ $menu_item_db_id ] ) ) {
|
51 |
+
// Do some checks here...
|
52 |
+
$value = $_POST[ $key ][ $menu_item_db_id ];
|
53 |
+
}
|
54 |
+
else {
|
55 |
+
$value = null;
|
56 |
+
}
|
57 |
}
|
58 |
|
59 |
// Update
|
82 |
$key = sprintf( 'menu-item-%s', $_key );
|
83 |
$id = sprintf( 'edit-%s-%s', $key, $item->ID );
|
84 |
$name = sprintf( '%s[%s]', $key, $item->ID );
|
85 |
+
$role_name = sprintf( '%s%s[]', $key, $item->ID );
|
86 |
$value = get_post_meta( $item->ID, $key, true );
|
87 |
$class = sprintf( 'field-%s', $_key );
|
88 |
?>
|
116 |
<p class="description">
|
117 |
|
118 |
<?php foreach($ultimatemember->query->get_roles() as $role_id => $role) { ?>
|
119 |
+
<label><input type="checkbox" name="<?php echo $role_name; ?>" value="<?php echo $role_id; ?>" <?php if ( ( is_array($value) && in_array($role_id, $value ) ) || ( isset($value) && $role_id == $value ) ) echo 'checked="checked"'; ?> /> <?php echo $role; ?></label>
|
120 |
<?php } ?>
|
121 |
|
122 |
</p>
|
core/um-short-functions.php
CHANGED
@@ -626,15 +626,22 @@ function um_profile_id() {
|
|
626 |
/***
|
627 |
*** @Check value of queried search in text input
|
628 |
***/
|
629 |
-
function um_queried_search_value( $filter ) {
|
630 |
global $ultimatemember;
|
|
|
631 |
if ( isset($_REQUEST['um_search']) ) {
|
632 |
$query = $ultimatemember->permalinks->get_query_array();
|
633 |
-
if ( $query[$filter] != '' ) {
|
634 |
-
|
635 |
}
|
636 |
}
|
637 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
638 |
}
|
639 |
|
640 |
/***
|
@@ -1327,14 +1334,16 @@ function um_fetch_user( $user_id ) {
|
|
1327 |
|
1328 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1329 |
$initial = um_user('last_name');
|
1330 |
-
$f_and_l_initial = um_user('first_name').' '
|
1331 |
}else{
|
1332 |
$f_and_l_initial = um_profile( $data );
|
1333 |
}
|
1334 |
|
1335 |
$f_and_l_initial = $ultimatemember->validation->safe_name_in_url( $f_and_l_initial );
|
1336 |
|
1337 |
-
|
|
|
|
|
1338 |
|
1339 |
break;
|
1340 |
|
@@ -1417,7 +1426,7 @@ function um_fetch_user( $user_id ) {
|
|
1417 |
}
|
1418 |
}
|
1419 |
|
1420 |
-
|
1421 |
|
1422 |
return apply_filters('um_user_display_name_filter', $name, um_user('ID'), ( $attrs == 'html' ) ? 1 : 0 );
|
1423 |
|
@@ -1647,3 +1656,44 @@ function um_fetch_user( $user_id ) {
|
|
1647 |
|
1648 |
return $lang_code;
|
1649 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
626 |
/***
|
627 |
*** @Check value of queried search in text input
|
628 |
***/
|
629 |
+
function um_queried_search_value( $filter, $echo = true ) {
|
630 |
global $ultimatemember;
|
631 |
+
$value = '';
|
632 |
if ( isset($_REQUEST['um_search']) ) {
|
633 |
$query = $ultimatemember->permalinks->get_query_array();
|
634 |
+
if ( $query[ $filter ] != '' ) {
|
635 |
+
$value = stripslashes_deep( $query[ $filter ] );
|
636 |
}
|
637 |
}
|
638 |
+
|
639 |
+
if( $echo ){
|
640 |
+
echo $value;
|
641 |
+
}else{
|
642 |
+
return $value;
|
643 |
+
}
|
644 |
+
|
645 |
}
|
646 |
|
647 |
/***
|
1334 |
|
1335 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1336 |
$initial = um_user('last_name');
|
1337 |
+
$f_and_l_initial = strtolower( um_user('first_name') ).' '. strtoupper( $initial[0]);
|
1338 |
}else{
|
1339 |
$f_and_l_initial = um_profile( $data );
|
1340 |
}
|
1341 |
|
1342 |
$f_and_l_initial = $ultimatemember->validation->safe_name_in_url( $f_and_l_initial );
|
1343 |
|
1344 |
+
$name = ucwords( strtolower( $f_and_l_initial ) );
|
1345 |
+
|
1346 |
+
return $name;
|
1347 |
|
1348 |
break;
|
1349 |
|
1426 |
}
|
1427 |
}
|
1428 |
|
1429 |
+
$name = ucwords( strtolower( $name ) );
|
1430 |
|
1431 |
return apply_filters('um_user_display_name_filter', $name, um_user('ID'), ( $attrs == 'html' ) ? 1 : 0 );
|
1432 |
|
1656 |
|
1657 |
return $lang_code;
|
1658 |
}
|
1659 |
+
|
1660 |
+
/**
|
1661 |
+
* Get current page type
|
1662 |
+
* @return string
|
1663 |
+
*/
|
1664 |
+
function um_get_current_page_type() {
|
1665 |
+
global $wp_query;
|
1666 |
+
$loop = 'notfound';
|
1667 |
+
|
1668 |
+
if ( $wp_query->is_page ) {
|
1669 |
+
$loop = is_front_page() ? 'front' : 'page';
|
1670 |
+
} elseif ( $wp_query->is_home ) {
|
1671 |
+
$loop = 'home';
|
1672 |
+
} elseif ( $wp_query->is_single ) {
|
1673 |
+
$loop = ( $wp_query->is_attachment ) ? 'attachment' : 'single';
|
1674 |
+
} elseif ( $wp_query->is_category ) {
|
1675 |
+
$loop = 'category';
|
1676 |
+
} elseif ( $wp_query->is_tag ) {
|
1677 |
+
$loop = 'tag';
|
1678 |
+
} elseif ( $wp_query->is_tax ) {
|
1679 |
+
$loop = 'tax';
|
1680 |
+
} elseif ( $wp_query->is_archive ) {
|
1681 |
+
if ( $wp_query->is_day ) {
|
1682 |
+
$loop = 'day';
|
1683 |
+
} elseif ( $wp_query->is_month ) {
|
1684 |
+
$loop = 'month';
|
1685 |
+
} elseif ( $wp_query->is_year ) {
|
1686 |
+
$loop = 'year';
|
1687 |
+
} elseif ( $wp_query->is_author ) {
|
1688 |
+
$loop = 'author';
|
1689 |
+
} else {
|
1690 |
+
$loop = 'archive';
|
1691 |
+
}
|
1692 |
+
} elseif ( $wp_query->is_search ) {
|
1693 |
+
$loop = 'search';
|
1694 |
+
} elseif ( $wp_query->is_404 ) {
|
1695 |
+
$loop = 'notfound';
|
1696 |
+
}
|
1697 |
+
|
1698 |
+
return $loop;
|
1699 |
+
}
|
core/um-tracking.php
CHANGED
@@ -144,7 +144,7 @@ class UM_Tracking {
|
|
144 |
|
145 |
echo '<div class="updated um-admin-notice"><p>';
|
146 |
|
147 |
-
echo __( 'Allow Ultimate Member to track plugin usage? Opt-in to tracking and our newsletter and we will immediately e-mail you a 20% discount which you can use
|
148 |
|
149 |
echo '</p>';
|
150 |
|
144 |
|
145 |
echo '<div class="updated um-admin-notice"><p>';
|
146 |
|
147 |
+
echo __( 'Allow Ultimate Member to track plugin usage? Opt-in to tracking and our newsletter and we will immediately e-mail you a 20% discount which you can use to purchase our core extensions bundle. No sensitive data is tracked.', 'ultimatemember' );
|
148 |
|
149 |
echo '</p>';
|
150 |
|
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.50
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
readme.txt
CHANGED
@@ -5,9 +5,9 @@ Contributors: ultimatemember, champsupertramp
|
|
5 |
Donate link:
|
6 |
Tags: access control, author, authors, author profile, comments, community, communities, conditional fields, conditional logic, conditional menus, content protection, custom fields, file uploads, form builder, front-end login, front-end registration, gravatar, hide wp-admin, login, login page, logged-in users, mandrill, member, members, membership, member directory, online users, profile, profiles, profile builder, registration, restriction, restrict content, role creation, role menus, search filters, sign in, sign up, social network, star ratings, toolbar, user, users, user fields, user profile, user-profile, user profiles, user roles
|
7 |
Requires at least: 4.1
|
8 |
-
Tested up to: 4.
|
9 |
|
10 |
-
Stable Tag: 1.3.
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
@@ -149,6 +149,15 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
149 |
|
150 |
== Changelog ==
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
= 1.3.49: April 14, 2016 =
|
153 |
* Fixed: remove core notices from ajax requests
|
154 |
* Fixed: upload form and media path
|
5 |
Donate link:
|
6 |
Tags: access control, author, authors, author profile, comments, community, communities, conditional fields, conditional logic, conditional menus, content protection, custom fields, file uploads, form builder, front-end login, front-end registration, gravatar, hide wp-admin, login, login page, logged-in users, mandrill, member, members, membership, member directory, online users, profile, profiles, profile builder, registration, restriction, restrict content, role creation, role menus, search filters, sign in, sign up, social network, star ratings, toolbar, user, users, user fields, user profile, user-profile, user profiles, user roles
|
7 |
Requires at least: 4.1
|
8 |
+
Tested up to: 4.5
|
9 |
|
10 |
+
Stable Tag: 1.3.50
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
149 |
|
150 |
== Changelog ==
|
151 |
|
152 |
+
= 1.3.50: April 21, 2016 =
|
153 |
+
* Fixed: menu incompatibility issue
|
154 |
+
* Fixed: username validation
|
155 |
+
* Fixed: admin css conflict
|
156 |
+
* Fixed: display name capitalization
|
157 |
+
* Fixed: search member filter and fields
|
158 |
+
* Fixed: member directory big SELECT query
|
159 |
+
* Added: action hook 'um_access_post_type' & 'um_access_post_type_{current_page_type}' for current page type in access settings
|
160 |
+
|
161 |
= 1.3.49: April 14, 2016 =
|
162 |
* Fixed: remove core notices from ajax requests
|
163 |
* Fixed: upload form and media path
|