Version 1.0.19

This commit is contained in:
ultimatemember
2015-01-23 19:03:29 +02:00
parent e9be3908fd
commit 63820a8ad8
16 changed files with 143 additions and 16 deletions
+1 -1
View File
@@ -46,7 +46,7 @@
<?php if ( $k == '' ) { ?>
<p><a href="#" class="um-admin-new-condition button um-admin-tipsy-n" title="Add new condition"><i class="um-icon-plus" style="margin-right:0!important"></i></a></p>
<?php } else { ?>
<p><a href="#" class="um-admin-remove-condition button um-admin-tipsy-n" title="Remove condition"><i class="um-icon-remove" style="margin-right:0!important"></i></a></p>
<p><a href="#" class="um-admin-remove-condition button um-admin-tipsy-n" title="Remove condition"><i class="um-icon-close" style="margin-right:0!important"></i></a></p>
<?php } ?>
<div class="um-admin-clear"></div>
@@ -16,4 +16,8 @@
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_css_img_bordercolor', null, 'na'); ?>" class="um-admin-colorpicker" name="_um_css_img_bordercolor" id="_um_css_img_bordercolor" />
</p>
<p><label for="_um_css_card_thickness"><?php _e('Profile card border thickness','ultimatemember'); ?></label>
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_css_card_thickness', null, '1px'); ?>" name="_um_css_card_thickness" id="_um_css_card_thickness" />
</p>
</div>
+9
View File
@@ -88,6 +88,15 @@
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_login_secondary_btn_text', null, um_get_option('secondary_btn_text') ); ?>" class="um-admin-colorpicker" name="_um_login_secondary_btn_text" id="_um_login_secondary_btn_text" data-default-color="<?php echo um_get_option('secondary_btn_text'); ?>" />
</p>
<p>
<label><?php _e('Show Forgot Password Link?','ultimatemember'); ?></label>
<span>
<?php $this->ui_on_off('_um_login_forgot_pass_link', um_get_option('login_forgot_pass_link') ); ?>
</span>
</p><div class="um-admin-clear"></div>
</div>
</div>
+8
View File
@@ -9,6 +9,14 @@ print ".um-$form_id .um-member {
}
if ( isset( $css_card_thickness ) ) {
print ".um-$form_id .um-member {
border-width: $css_card_thickness !important;
}";
}
if ($css_profile_card_text) {
print ".um-$form_id .um-member-card * {
+6 -1
View File
@@ -13,13 +13,18 @@ jQuery(document).ready(function() {
live_field = jQuery(this).parents('.um-field').data('key');
live_value = jQuery(this).val();
if ( jQuery(this).is(':checkbox') ) {
live_value = jQuery(this).parents('.um-field').find('input:checked').val();
}
if ( jQuery(this).is(':radio') ) {
live_value = jQuery(this).parents('.um-field').find('input[type=radio]:checked').val();
}
um_conditional();
});
jQuery('.um-field input[type=radio], .um-field input[type=checkbox]').trigger('change');
});
+1 -2
View File
File diff suppressed because one or more lines are too long
+6 -1
View File
@@ -196,7 +196,12 @@
*** @Display a forgot password link
***/
add_action('um_after_login_fields', 'um_after_login_submit', 1001);
function um_after_login_submit(){ ?>
function um_after_login_submit( $args ){
global $ultimatemember;
if ( $args['forgot_pass_link'] == 0 ) return;
?>
<div class="um-col-alt-b">
<a href="<?php echo um_get_core_page('password-reset'); ?>" class="um-link-alt"><?php _e('Forgot your password?','ultimatemember'); ?></a>
+1 -1
View File
@@ -233,7 +233,7 @@
<div class="um-member-card <?php if (!$profile_photo) { echo 'no-photo'; } ?>">
<?php if ( $show_name ) { ?>
<div class="um-member-name"><a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name'); ?></a></div>
<div class="um-member-name"><a href="<?php echo um_user_profile_url(); ?>"><?php echo um_cap_initials( um_user('display_name') ); ?></a></div>
<?php } ?>
<?php
+10 -2
View File
@@ -78,7 +78,13 @@ class UM_Fields {
if ( $args['type'] == 'row' ) {
if ( isset( $fields[$id] ) ){
$args = array_merge( $fields[$id], $args );
$old_args = $fields[$id];
foreach( $old_args as $k => $v ) {
if (!in_array($k, array('sub_rows','cols')) ) {
unset($old_args[$k]);
}
}
$args = array_merge( $old_args, $args );
}
}
@@ -517,7 +523,7 @@ class UM_Fields {
if (!isset($array['validate'])) $array['validate'] = null;
if (!isset($array['default'])) $array['default'] = null;
if ( isset( $array['conditions'] ) && is_array( $array['conditions'] ) ) {
if ( isset( $array['conditions'] ) && is_array( $array['conditions'] ) && !$this->viewing ) {
$array['conditional'] = '';
foreach( $array['conditions'] as $key => $cond ) {
$array['conditional'] .= ' data-cond-'.$key.'-action="'. $cond[0] . '" data-cond-'.$key.'-field="'. $cond[1] . '" data-cond-'.$key.'-operator="'. $cond[2] . '" data-cond-'.$key.'-value="'. $cond[3] . '"';
@@ -1799,6 +1805,8 @@ class UM_Fields {
if ( !um_can_view_field( $data ) ) return;
if ( !um_field_conditions_are_met( $data ) ) return;
switch( $type ) {
/* Default */
+2
View File
@@ -21,8 +21,10 @@ class UM_Permalinks {
***/
function get_query_array() {
$parts = parse_url( $this->get_current_url() );
if ( isset( $parts['query'] ) ){
parse_str($parts['query'], $query);
return $query;
}
}
/***
+3 -2
View File
@@ -122,7 +122,7 @@ class UM_Setup {
'_um_register_primary_btn_color' => '#3ba1da',
'_um_register_primary_btn_hover' => '#44b0ec',
'_um_register_primary_btn_text' => '#fff',
'_um_register_secondary_btn' => '1',
'_um_register_secondary_btn' => 1,
'_um_register_secondary_btn_word' => 'Login',
'_um_register_secondary_btn_color' => '#eee',
'_um_register_secondary_btn_hover' => '#e5e5e5',
@@ -135,7 +135,8 @@ class UM_Setup {
'_um_login_primary_btn_color' => '#3ba1da',
'_um_login_primary_btn_hover' => '#44b0ec',
'_um_login_primary_btn_text' => '#fff',
'_um_login_secondary_btn' => '1',
'_um_login_forgot_pass_link' => 1,
'_um_login_secondary_btn' => 1,
'_um_login_secondary_btn_word' => 'Register',
'_um_login_secondary_btn_color' => '#eee',
'_um_login_secondary_btn_hover' => '#e5e5e5',
+60
View File
@@ -1,5 +1,57 @@
<?php
/***
*** @If conditions are met return true;
***/
function um_field_conditions_are_met( $data ) {
if ( !isset( $data['conditions'] ) ) return true;
$state = 1;
foreach( $data['conditions'] as $k => $arr ) {
if ( $arr[0] == 'show' ) {
$state = 1;
$val = $arr[3];
$op = $arr[2];
$field = um_profile($arr[1]);
switch( $op ) {
case 'equals to': if ( $field != $val ) $state = 0; break;
case 'not equals': if ( $field == $val ) $state = 0; break;
case 'empty': if ( $field ) $state = 0; break;
case 'not empty': if ( !$field ) $state = 0; break;
case 'greater than': if ( $field <= $val ) $state = 0; break;
case 'less than': if ( $field >= $val ) $state = 0; break;
case 'contains': if ( !strstr( $field, $val ) ) $state = 0; break;
}
}
if ( $arr[0] == 'hide' ) {
$state = 0;
$val = $arr[3];
$op = $arr[2];
$field = um_profile($arr[1]);
switch( $op ) {
case 'equals to': if ( $field != $val ) $state = 1; break;
case 'not equals': if ( $field == $val ) $state = 1; break;
case 'empty': if ( $field ) $state = 1; break;
case 'not empty': if ( !$field ) $state = 1; break;
case 'greater than': if ( $field <= $val ) $state = 1; break;
case 'less than': if ( $field >= $val ) $state = 1; break;
case 'contains': if ( !strstr( $field, $val ) ) $state = 1; break;
}
}
}
if ( $state )
return true;
return false;
}
/***
*** @Exit and redirect to home
***/
@@ -7,6 +59,14 @@
exit( wp_redirect( home_url() ) );
}
/***
*** @Capitalize first initial
***/
function um_cap_initials( $name ) {
$name = str_replace('\' ', '\'', ucwords(str_replace('\'', '\' ', strtolower($name))));
return $name;
}
/***
*** @Get submitted user information
***/
+2
View File
@@ -74,6 +74,8 @@ class UM_Validation {
*** @is phone number
***/
function is_phone_number( $string ){
if ( !$string )
return true;
if ( !preg_match( $this->regex_phone_number, $string) )
return false;
return true;
+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.18
Version: 1.0.19
Author: Ultimate Member
Author URI: http://ultimatemember.com/
*/
+21 -5
View File
@@ -7,7 +7,7 @@ Tags: members, member, membership, community, communities, profile, profiles, re
Requires at least: 4.1
Tested up to: 4.1
Stable Tag: 1.0.18
Stable Tag: 1.0.19
License: GNU Version 2 or Any Later Version
@@ -26,7 +26,8 @@ Features of the plugin include:
* Front-end user registration
* Front-end user login
* Front-end user profiles
* Custom profile fields
* Custom form fields
* Conditional logic for form fields
* Drag and drop form builder
* User account page
* Custom user roles
@@ -50,10 +51,14 @@ Allow users to login directly from your site and avoid the ugly WordPress login
Ultimate Member gives every user of your site a beautiful user profile where they can edit their information. You can create unique profiles for each user role and decide what information to show on the profiles.
**Custom profile fields**
**Custom form fields**
With our custom profile fields, Ultimate Member allows you to gather any information you like from user's when they register or when they fill in their profiles. The plugin comes with a full range of field types including: text box, textarea, dropdown, multi-select, radio, checkbox, url, password, image upload, file upload, date picker, time picker and star ratings.
**Conditional logic for form fields**
You can create advanced register, login and profile forms by applying conditional logic to any fields you like. This allows you to show or hide fields depending on a users actions when they fill in a form.
**Drag and drop form builder**
Our advanced drag and drop form builder makes it extremely easy to build unique registration, login and profile forms for your site. The form builder allows for up to three columns and multiple rows which enables you to create distinct sections to the forms.
@@ -78,7 +83,7 @@ The plugin provides a range of customizable text only email templates which are
With Ultimate Member you can restrict content on a global on per page/post basis. You can restrict pages/posts so everyone can see the page/post; only logged out users can see the page/post or only logged in users can see the page/post (you can also restrict it to certain user roles). You can also set redirect urls for when people who are not allowed to access the page/post
**Conditional Menus**
**Conditional menus**
The plugin provides a range of customizable text only email templates which are triggered depending on certain events (e.g welcome email, account activation, account deleted etc). Each email type can be turned on/off. The plugin also offers a range of optional admin notification emails so you can find out when a new user registers or if new user needs reviewed.
@@ -94,7 +99,7 @@ The plugin is very SEO friendly and provides customizable dynamic page titles an
Ultimate Member is developer friendly and includes hundreds of actions and filters for developers to customize the plugin. If you are wanting to integrate with Ultimate Member you can view codex here.
**Future Plans for Ultimate Member**
**Future plans for Ultimate Member**
We have big plans for Ultimate Member and we will be working extremely hard to create the best community plugin ever. In the near future we will be releasing extensions on our site that will allow you to add extra features and extend the functionality of Ultimate Member. If you'd like to find out when the first extensions will be ready you can follow us on [Twitter](https://twitter.com/umplugin), like us on [Facebook](https://www.facebook.com/pages/Ultimate-Member/1413909622233054) or view our [Trello roadmap](https://trello.com/b/30quaczv/ultimate-member).
@@ -163,6 +168,17 @@ Yes. The plugin works fine with WordPress network / multisite now. In a recent u
== Changelog ==
= 1.0.19: January 23, 2015 =
* New: Border thickness option for members directory
* New: Option to show/hide forgot password link on login form
* Tweak: Capital initials on members directory
* Fixed: Issue with row styling in form builder
* Fixed: Conditional logic bug fixes
* Fixed: Icon for conditional rules in backend
* Fixed: php warning in debug mode
* Fixed: Mobile/phone number validation fixed
= 1.0.18: January 23, 2015 =
* Fixed: Issue with drag and drop form builder
+8
View File
@@ -1386,6 +1386,14 @@ $this->sections[] = array(
'required' => array( 'login_secondary_btn', '=', 1 ),
),
array(
'id' => 'login_forgot_pass_link',
'type' => 'switch',
'title' => __( 'Login Forgot Password Link' ),
'default' => 1,
'desc' => 'Switch on/off the forgot password link in login form',
),
)
);