Version 1.0.23

This commit is contained in:
ultimatemember
2015-01-25 19:59:18 +02:00
parent 2c3cf6ea8c
commit 33617b72c5
24 changed files with 227 additions and 44 deletions
+4
View File
@@ -129,6 +129,10 @@
margin: 0 5px 0 0 !important;
}
.um-admin-btn-toggle p.um-admin-reset-conditions {
margin: 0 0 5px 0 !important;
}
.um-admin-btn-toggle a {
text-decoration: none;
color: #999;
+12
View File
@@ -199,6 +199,18 @@ jQuery(document).ready(function() {
}
});
/**
reset conditions
**/
jQuery(document).on('click', '.um-admin-reset-conditions a', function(){
var content = jQuery(this).parents('.um-admin-btn-content');
content.find('.um-admin-cur-condition').slice(1).remove();
content.find('input[type=text]').val('');
content.find('select').val('');
um_admin_live_update_scripts();
um_admin_modal_responsive();
});
/**
remove a condition
**/
+4 -1
View File
@@ -27,6 +27,9 @@
<div class="um-admin-btn-content">
<p class="um-admin-reset-conditions"><a href="#" class="button button-primary"><?php _e('Reset all rules','ultimatemember'); ?></a></p>
<div class="um-admin-clear"></div>
<?php
if ( isset( $edit_array['conditions'] ) ){
@@ -73,7 +76,7 @@
</div>
<?php } ?>
</div>
</div>
+1 -1
View File
@@ -35,7 +35,7 @@
<div class="um-admin-access-roles">
<h4><?php _e('Select the member roles that can see this content?','ultimatemember'); ?> <?php $this->tooltip( __('If you do not select any role, all members wil be able to view this content','ultimatemember'), 'e'); ?></h4>
<h4><?php _e('Select the member roles that can see this content?','ultimatemember'); ?> <?php $this->tooltip( __('If you do not select any role, all members will be able to view this content','ultimatemember'), 'e'); ?></h4>
<p class="description">
+1 -1
View File
@@ -23,7 +23,7 @@
</select>
</p>
<p><label for="_um_login_max_width"><?php _e('Max. Width (px or %)','ultimatemember'); ?> <?php $this->tooltip('The maximum width of shortcode in pixels or percentage relative to its parent, e.g. 600px or 70%', 'e'); ?></label>
<p><label for="_um_login_max_width"><?php _e('Max. Width (px)','ultimatemember'); ?> <?php $this->tooltip('The maximum width of shortcode in pixels e.g. 600px', 'e'); ?></label>
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_login_max_width', null, um_get_option('login_max_width') ); ?>" name="_um_login_max_width" id="_um_login_max_width" />
</p>
+1 -1
View File
@@ -35,7 +35,7 @@
</select>
</p>
<p><label for="_um_profile_max_width"><?php _e('Max. Width (px or %)','ultimatemember'); ?> <?php $this->tooltip('The maximum width of shortcode in pixels or percentage relative to its parent, e.g. 600px or 70%', 'e'); ?></label>
<p><label for="_um_profile_max_width"><?php _e('Max. Width (px)','ultimatemember'); ?> <?php $this->tooltip('The maximum width of shortcode in pixels e.g. 600px', 'e'); ?></label>
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_profile_max_width', null, um_get_option('profile_max_width') ); ?>" name="_um_profile_max_width" id="_um_profile_max_width" />
</p>
+1 -1
View File
@@ -35,7 +35,7 @@
</select>
</p>
<p><label for="_um_register_max_width"><?php _e('Max. Width (px or %)','ultimatemember'); ?> <?php $this->tooltip( __('The maximum width of shortcode in pixels or percentage relative to its parent, e.g. 600px or 70%','ultimatemember'), 'e'); ?></label>
<p><label for="_um_register_max_width"><?php _e('Max. Width (px)','ultimatemember'); ?> <?php $this->tooltip('The maximum width of shortcode in pixels e.g. 600px', 'e'); ?></label>
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_register_max_width', null, um_get_option('register_max_width') ); ?>" name="_um_register_max_width" id="_um_register_max_width" />
</p>
+27 -6
View File
@@ -25,12 +25,13 @@
.um-profile .um-profile-body {
padding-top: 15px;
padding-bottom: 15px;
max-width: 600px;
margin: auto;
}
.um-profile.um-editing {
padding-bottom: 30px;
padding-bottom: 15px;
}
.um-profile.um-viewing {
@@ -331,21 +332,25 @@ font-weight: normal;
*/
.um-profile-nav {
padding: 10px;
background: #444;
text-align: center;
}
.um-profile-nav-item.active a {
background: #eee !important;
color: #333 !important;
background: #3BA1DA !important;
color: #FFF!important;
}
.um-profile-nav-item a {
color: #fff !important;
color: #fff!important;
font-size: 15px;
font-weight: 600;
padding: 10px 20px;
padding: 7px 20px;
display: block;
float: left;
border-radius: 4px;
margin-left: 10px;
}
.um-profile-nav-item a:hover {
@@ -431,4 +436,20 @@ font-weight: normal;
}
.um-item-meta a {border-bottom: 1px solid #E0E0E0;color: #3BA1DA}
.um-item-meta a:hover {border-bottom-color: #bbb}
.um-item-meta a:hover {border-bottom-color: #bbb}
.um-load-items {
text-align: center;
margin-top: 12px;
padding-top: 30px;
}
.um-load-items.loading {
background: url(../img/loading-dots.gif) no-repeat top center;
}
.um-load-items a {
max-width: 250px;
display: inline-block;
margin: 0 auto;
}
+36 -4
View File
@@ -28,6 +28,29 @@ div.uimob960 .uimob960-hide
/********************************************/
div.uimob340 .um-item-link a {
font-size: 14px;
}
div.uimob340 .um-item-meta span {
font-size: 13px;
}
div.uimob340 .um-load-items a {
width: 100% !important;
max-width: 100% !important;
}
div.uimob340 .um-profile-nav {
padding: 0;
}
div.uimob340 .um-profile-nav-item a {
padding: 1px 12px;
margin-left: 0;
border-radius: 0;
}
div.uimob340 .um-profile-subnav {
padding: 8px 15px;
}
@@ -42,7 +65,7 @@ div.uimob340 .um-profile-subnav a {
div.uimob340 .um-profile-subnav span {
font-size: 12px;
padding: 0px 4px;
padding: 1px 6px;
}
div.uimob340 .um-cover-overlay span.um-cover-overlay-t
@@ -236,9 +259,13 @@ div.uimob340 .um-account-meta {
/********************************************/
div.uimob500 .um-profile-nav-item i {
font-size: 25px;
width: 25px;
div.uimob500 .um-profile-nav {
padding: 6px;
}
div.uimob500 .um-profile-nav-item a {
padding: 1px 12px;
margin-left: 6px;
}
div.uimob500 .um-profile-subnav {
@@ -435,6 +462,11 @@ div.uimob500 .um-account-meta {
for 800px and below
**/
div.uimob800 .um-profile-nav-item a {
padding: 1px 12px;
margin-left: 6px;
}
div.uimob800 .um-profile-nav-item i {
font-size: 25px;
width: 25px;
+5 -5
View File
@@ -102,15 +102,15 @@
.um-col-alt {margin: 0 0 5px 0}
.um-col-alt-b {padding-top: 20px}
.um-col-121 {float: left;width: 48%;min-height: 1px;height: auto;}
.um-col-121 {float: left;width: 48%}
.um-col-122 {float: right;width: 48%;min-height: 1px;height: auto;}
.um-col-122 {float: right;width: 48%}
.um-col-131 {float: left;width: 30%;min-height: 1px;height: auto;}
.um-col-131 {float: left;width: 30%}
.um-col-132 {float: left;width: 30%;margin: 0 5%;min-height: 1px;height: auto;}
.um-col-132 {float: left;width: 30%;margin: 0 5%}
.um-col-133 {float: right;width: 30%;min-height: 1px;height: auto;}
.um-col-133 {float: left;width: 30%}
/*
- Font Icons
+1 -1
View File
File diff suppressed because one or more lines are too long
+8
View File
@@ -35,6 +35,14 @@ print "
}
";
if ( $area_max_width ) {
print "
.um-$form_id.um .um-profile-body {
max-width: $area_max_width;
}
";
}
print "
.um-$form_id.um .um-profile-photo a.um-profile-photo-img {
width: ".$photosize."px;
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+26
View File
@@ -214,6 +214,32 @@ jQuery(document).ready(function() {
return false;
});
jQuery(document).on('click', '.um-ajax-paginate', function(e){
e.preventDefault();
var parent = jQuery(this).parent();
parent.addClass('loading');
var args = jQuery(this).data('args');
var hook = jQuery(this).data('hook');
var container = jQuery(this).parents('.um').find('.um-ajax-items');
jQuery.ajax({
url: ultimatemember_ajax_url,
type: 'post',
data: {
action: 'ultimatemember_ajax_paginate',
hook: hook,
args: args
},
complete: function(){
parent.removeClass('loading');
},
success: function(data){
parent.remove();
container.append( data );
}
});
return false;
});
jQuery(document).on('click', '.um-ajax-action', function(e){
e.preventDefault();
var hook = jQuery(this).data('hook');
+1 -1
View File
File diff suppressed because one or more lines are too long
+20
View File
@@ -111,4 +111,24 @@
break;
}
}
/***
*** @run an ajax pagination on the fly
***/
add_action('wp_ajax_nopriv_ultimatemember_ajax_paginate', 'ultimatemember_ajax_paginate');
add_action('wp_ajax_ultimatemember_ajax_paginate', 'ultimatemember_ajax_paginate');
function ultimatemember_ajax_paginate(){
global $ultimatemember;
extract($_REQUEST);
ob_start();
do_action("um_ajax_load_posts__{$hook}", $args);
$output = ob_get_contents();
ob_end_clean();
die($output);
}
+10 -4
View File
@@ -77,9 +77,11 @@
$words = array_map("rtrim", explode("\n", $words));
foreach( $fields as $key => $array ) {
if ( isset($array['validate']) && in_array( $array['validate'], array('unique_username','unique_email','unique_username_or_email') ) ) {
if ( preg_grep( "/".$args[$key]."/i" , $words ) ) {
$ultimatemember->form->add_error( $key, __('You are not allowed to use this word as your username.') );
if ( isset( $args[$key] ) ) {
if ( isset($array['validate']) && in_array( $array['validate'], array('unique_username','unique_email','unique_username_or_email') ) ) {
if ( preg_grep( "/".$args[$key]."/i" , $words ) ) {
$ultimatemember->form->add_error( $key, __('You are not allowed to use this word as your username.') );
}
}
}
}
@@ -136,7 +138,9 @@
$fields = unserialize( $args['custom_fields'] );
foreach( $fields as $key => $array ) {
if ( isset( $args[$key] ) ) {
if ( isset( $array['required'] ) && $array['required'] == 1 ) {
if ( !isset($args[$key]) || $args[$key] == '' ) {
$ultimatemember->form->add_error($key, sprintf(__('%s is required'), $array['label']) );
@@ -295,4 +299,6 @@
}
}
} // end if ( isset in args array )
}
+10
View File
@@ -815,6 +815,11 @@ class UM_Fields {
if ( !um_can_view_field( $data ) ) return;
if ( !um_can_edit_field( $data ) ) return;
// disable these fields in profile edit only
if ( in_array( $key, array('user_email','username','user_login','user_password') ) && $this->editing == true && $this->set_mode == 'profile' ) {
return;
}
if ( isset( $data['required_opt'] ) ) {
$opt = $data['required_opt'];
if ( um_get_option( $opt[0] ) != $opt[1] ) {
@@ -1805,6 +1810,11 @@ class UM_Fields {
if ( !um_can_view_field( $data ) ) return;
// disable these fields in profile view only
if ( in_array( $key, array('user_password') ) && $this->set_mode == 'profile' ) {
return;
}
if ( !um_field_conditions_are_met( $data ) ) return;
switch( $type ) {
+10 -1
View File
@@ -132,6 +132,15 @@ class UM_Permalinks {
if ( um_get_option('permalink_base') == 'user_login' ) {
$user_in_url = um_user('user_login');
if ( is_email($user_in_url) ) {
$user_in_url = str_replace('@','',$user_in_url);
if( ( $pos = strrpos( $user_in_url , '.' ) ) !== false ) {
$search_length = strlen( '.' );
$user_in_url = substr_replace( $user_in_url , '-' , $pos , $search_length );
}
}
}
if ( um_get_option('permalink_base') == 'user_id' ) {
@@ -152,7 +161,7 @@ class UM_Permalinks {
$profile_url = add_query_arg( 'um_user', $user_in_url, $profile_url );
}
return $profile_url;
}
+23 -14
View File
@@ -64,30 +64,39 @@ class UM_Rewrite {
if ( um_queried_user() && um_is_core_page('user') ) {
if ( um_get_option('permalink_base') == 'user_login' ) {
$user_id = username_exists( um_queried_user() );
if ( $user_id ) {
um_set_requested_user( $user_id );
} else {
exit( wp_redirect( um_get_core_page('user') ) );
// Try nice name
if ( !$user_id ) {
$the_user = get_user_by( 'slug', um_queried_user() );
if ( isset( $the_user->ID ) ){
$user_id = $the_user->ID;
}
}
}
if ( um_get_option('permalink_base') == 'user_id' ) {
$user_id = $ultimatemember->user->user_exists_by_id( um_queried_user() );
if ( $user_id ) {
um_set_requested_user( $user_id );
} else {
exit( wp_redirect( um_get_core_page('user') ) );
}
}
if ( um_get_option('permalink_base') == 'name' ) {
$user_id = $ultimatemember->user->user_exists_by_name( um_queried_user() );
if ( $user_id ) {
um_set_requested_user( $user_id );
} else {
exit( wp_redirect( um_get_core_page('user') ) );
}
}
/** USER EXISTS SET USER AND CONTINUE **/
if ( $user_id ) {
um_set_requested_user( $user_id );
} else {
exit( wp_redirect( um_get_core_page('user') ) );
}
}
+1
View File
@@ -91,6 +91,7 @@ class UM_Setup {
'_um_profile_role' => '0',
'_um_profile_template' => 'profile',
'_um_profile_max_width' => '1000px',
'_um_profile_area_max_width' => '600px',
'_um_profile_align' => 'center',
'_um_profile_icons' => 'label',
'_um_profile_cover_enabled' => 1,
+1 -1
View File
@@ -3,7 +3,7 @@
Plugin Name: Ultimate Member
Plugin URI: http://ultimatemember.com/
Description: Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress
Version: 1.0.21
Version: 1.0.23
Author: Ultimate Member
Author URI: http://ultimatemember.com/
*/
+15 -1
View File
@@ -7,7 +7,7 @@ Tags: access control, community, communities, conditional fields, conditional lo
Requires at least: 4.1
Tested up to: 4.1
Stable Tag: 1.0.21
Stable Tag: 1.0.23
License: GNU Version 2 or Any Later Version
@@ -168,6 +168,20 @@ Yes. The plugin works fine with WordPress network / multisite now. In a recent u
== Changelog ==
= 1.0.23: January 25, 2015 =
* Fixed: important bugfix with profile editing
= 1.0.22: January 25, 2015 =
* New: option to set maximum profile fields area width
* New: ajax functions for future development use
* Tweak: improved profile permalinks for e-mail based usernames
* Tweak: disable user from editing username (If admin put the username field by mistake in profile)
* Tweak: minor css changes
* Fixed: ability to clear conditional logic from fields in backend
* Fixed: corrected spacing issue in a multi-column layout in profile
= 1.0.21: January 24, 2015 =
* New: Added ajax action hook for development use
+9 -1
View File
@@ -761,7 +761,7 @@ $this->sections[] = array(
'id' => 'image_compression',
'type' => 'text',
'title' => __( 'Image Quality' ),
'desc' => __( 'Quality is used to determine quality of image uploads, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default range is 75.' ),
'desc' => __( 'Quality is used to determine quality of image uploads, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default range is 60.' ),
'default' => 60,
'validate' => 'numeric',
),
@@ -1024,6 +1024,14 @@ $this->sections[] = array(
'desc' => 'The maximum width this shortcode can take from the page width',
),
array(
'id' => 'profile_area_max_width',
'type' => 'text',
'title' => __( 'Profile Area Maximum Width' ),
'default' => um_get_metadefault('profile_area_max_width'),
'desc' => 'The maximum width of the profile area inside profile (below profile header)',
),
array(
'id' => 'profile_align',
'type' => 'select',