Version 1.0.30

This commit is contained in:
ultimatemember
2015-01-29 15:52:13 +02:00
parent 78833fa2e3
commit df37a3164f
17 changed files with 465 additions and 364 deletions
+5 -5
View File
@@ -2,7 +2,7 @@
- General metabox styling
*/
#um-admin-access-control h3 {
#um-admin-access-settings h3 {
padding: 10px 20px 10px 60px;
color: #fff;
background: #3ba1da url(../img/logo-small.png) no-repeat 12px center;
@@ -12,17 +12,17 @@
-moz-osx-font-smoothing: grayscale !important;
}
#um-admin-access-control h4 {margin:10px 0 4px 0!important}
#um-admin-access-settings h4 { margin: 10px 0 4px 0!important}
#um-admin-access-control div.handlediv {
#um-admin-access-settings div.handlediv {
color: #fff !important;
-webkit-font-smoothing: antialiased !important;
-moz-osx-font-smoothing: grayscale !important;
}
#um-admin-access-control p {font-size: 13px}
#um-admin-access-settings p {font-size: 13px}
#um-admin-access-control input[type=text] {font-size: 13px}
#um-admin-access-settings input[type=text] {font-size: 13px}
/*
- Nav Menu
-17
View File
@@ -39,23 +39,6 @@ class UM_Admin_Enqueue {
function admin_head(){
global $current_screen, $post;
$screen_id = $current_screen->id;
if ( strstr($screen_id, 'um_form') ) $highlighted_id = 3;
if ( strstr($screen_id, 'um_role') ) $highlighted_id = 4;
if ( strstr($screen_id, 'um_directory') ) $highlighted_id = 5;
if ( isset($highlighted_id) ) { ?>
<script type="text/javascript">
jQuery(document).ready( function() {
jQuery('#toplevel_page_ultimatemember').addClass('wp-current-submenu wp-has-current-submenu wp-menu-open current');
jQuery('#toplevel_page_ultimatemember a:first').addClass('wp-current-submenu wp-has-current-submenu current');
jQuery('#toplevel_page_ultimatemember').find('li:eq(<?php echo $highlighted_id; ?>)').addClass('current');
});
</script>
<?php
}
if ( $this->is_plugin_post_type() ){
+11 -37
View File
@@ -2,43 +2,8 @@
<div class="">
<?php
/*
<p>
<label class="um-admin-half"><?php _e('Use Infinite Scroll instead of pagination','ultimatemember'); ?></label>
<span class="um-admin-half">
<?php $this->ui_on_off('_um_infinitescroll', 0, true, 1, 'infinite-settings', 'pagination-settings'); ?>
</span>
</p><div class="um-admin-clear"></div>
<p class="infinite-settings um-admin-hide">
<label class="um-admin-half"><?php _e('Number of profiles to show on first load','ultimatemember'); ?> <?php $this->tooltip('Number of member profiles to appear on the first load only'); ?></label>
<span class="um-admin-half">
<input type="text" name="_um_profiles_on_load" id="_um_profiles_on_load" value="<?php echo $ultimatemember->query->get_meta_value('_um_max_users', null, 12 ); ?>" class="small" />
</span>
</p><div class="um-admin-clear"></div>
<p class="infinite-settings um-admin-hide">
<label class="um-admin-half"><?php _e('Number of profiles to show on load more','ultimatemember'); ?> <?php $this->tooltip('Number of member profiles to appear when user loads more profiles'); ?></label>
<span class="um-admin-half">
<input type="text" name="_um_profiles_load_more" id="_um_profiles_load_more" value="<?php echo $ultimatemember->query->get_meta_value('_um_max_users', null, 12 ); ?>" class="small" />
</span>
</p><div class="um-admin-clear"></div>
*/
?>
<p class="pagination-settings">
<label class="um-admin-half"><?php _e('Number of profiles per page','ultimatemember'); ?> <?php $this->tooltip('Number of member profiles to appear on every page'); ?></label>
<label class="um-admin-half"><?php _e('Number of profiles per page','ultimatemember'); ?> <?php $this->tooltip( __('Number of profiles to appear on page for standard users') ); ?></label>
<span class="um-admin-half">
<input type="text" name="_um_profiles_per_page" id="_um_profiles_per_page" value="<?php echo $ultimatemember->query->get_meta_value('_um_profiles_per_page', null, 12); ?>" class="small" />
@@ -47,7 +12,16 @@
</p><div class="um-admin-clear"></div>
<p>
<label class="um-admin-half"><?php _e('Maximum number of profiles','ultimatemember'); ?> <?php $this->tooltip('Use this setting to control the maximum number of profiles to appear in this directory. Leave blank to disable this limit'); ?></label>
<label class="um-admin-half"><?php _e('Number of profiles per page (for Mobiles & Tablets)','ultimatemember'); ?> <?php $this->tooltip( __('Number of profiles to appear on page for mobile users') ); ?></label>
<span class="um-admin-half">
<input type="text" name="_um_profiles_per_page_mobile" id="_um_profiles_per_page_mobile" value="<?php echo $ultimatemember->query->get_meta_value('_um_profiles_per_page_mobile', null, 8); ?>" class="small" />
</span>
</p><div class="um-admin-clear"></div>
<p>
<label class="um-admin-half"><?php _e('Maximum number of profiles','ultimatemember'); ?> <?php $this->tooltip( __('Use this setting to control the maximum number of profiles to appear in this directory. Leave blank to disable this limit','ultimatemember') ); ?></label>
<span class="um-admin-half">
<input type="text" name="_um_max_users" id="_um_max_users" value="<?php echo $ultimatemember->query->get_meta_value('_um_max_users', null, 'na' ); ?>" class="small" />
+12 -3
View File
@@ -73,16 +73,25 @@
</p><div class="um-admin-clear"></div>
<p class="search-options">
<label class="um-admin-half"><?php _e('Results Text','ultimatemember'); ?> <?php $this->tooltip('Customize the search result text . e.g. Found 3,000 Members. Leave this blank to not show result text'); ?></label>
<label class="um-admin-half"><?php _e('Results Text','ultimatemember'); ?> <?php $this->tooltip( __('Customize the search result text . e.g. Found 3,000 Members. Leave this blank to not show result text','ultimatemember') ); ?></label>
<span class="um-admin-half">
<input type="text" name="_um_directory_header" id="_um_directory_header" value="<?php echo $ultimatemember->query->get_meta_value('_um_directory_header', null, __('{total_users} Members','ultimatemember') ); ?>" />
<input type="text" name="_um_directory_header" id="_um_directory_header" value="<?php echo $ultimatemember->query->get_meta_value('_um_directory_header', null, __('{total_users} Members','ultimatemember') ); ?>" />
</span>
</p><div class="um-admin-clear"></div>
<p class="search-options">
<label class="um-admin-half"><?php _e('Custom text If no users were found','ultimatemember'); ?> <?php $this->tooltip('This is the text that is displayed if no users are found during a search'); ?></label>
<label class="um-admin-half"><?php _e('Single Result Text','ultimatemember'); ?> <?php $this->tooltip( __('Same as above but in case of 1 user found only','ultimatemember') ); ?></label>
<span class="um-admin-half">
<input type="text" name="_um_directory_header_single" id="_um_directory_header_single" value="<?php echo $ultimatemember->query->get_meta_value('_um_directory_header_single', null, __('{total_users} Member','ultimatemember') ); ?>" />
</span>
</p><div class="um-admin-clear"></div>
<p class="search-options">
<label class="um-admin-half"><?php _e('Custom text if no users were found','ultimatemember'); ?> <?php $this->tooltip('This is the text that is displayed if no users are found during a search'); ?></label>
<span class="um-admin-half">
<input type="text" name="_um_directory_no_users" id="_um_directory_no_users" value="<?php echo $ultimatemember->query->get_meta_value('_um_directory_no_users', null, __('We are sorry. We cannot find any users who match your search criteria.','ultimatemember') ); ?>" />
+2
View File
@@ -55,6 +55,8 @@ class UM_Admin_API {
if ( um_get_option('members_page' ) || !get_option('um_options') ){
add_submenu_page( $this->slug, __('Member Directories', $this->slug), __('Member Directories', $this->slug), 'manage_options', 'edit.php?post_type=um_directory', '', '' );
}
do_action('um_extend_admin_menu');
}
+8 -8
View File
@@ -162,7 +162,7 @@
<?php echo $output; ?>
<div class="um-col-alt um-col-alt-b"><div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="Update Privacy" class="um-button" /></div><div class="um-clear"></div></div>
<div class="um-col-alt um-col-alt-b"><div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Privacy','ultimatemember'); ?>" class="um-button" /></div><div class="um-clear"></div></div>
<?php
@@ -185,7 +185,7 @@
<?php echo $output; ?>
<div class="um-col-alt um-col-alt-b"><div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="Update Account" class="um-button" /></div><div class="um-clear"></div></div>
<div class="um-col-alt um-col-alt-b"><div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Account','ultimatemember'); ?>" class="um-button" /></div><div class="um-clear"></div></div>
<?php
@@ -209,7 +209,7 @@
<?php echo $output; ?>
<div class="um-col-alt um-col-alt-b"><div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="Update Password" class="um-button" /></div><div class="um-clear"></div></div>
<div class="um-col-alt um-col-alt-b"><div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Password','ultimatemember'); ?>" class="um-button" /></div><div class="um-clear"></div></div>
<?php
@@ -279,19 +279,19 @@
extract( $args );
$tabs[100]['general']['icon'] = 'um-faicon-user';
$tabs[100]['general']['title'] = 'Account';
$tabs[100]['general']['title'] = __('Account','ultimatemember');
$tabs[200]['password']['icon'] = 'um-faicon-asterisk';
$tabs[200]['password']['title'] = 'Change Password';
$tabs[200]['password']['title'] = __('Change Password','ultimatemember');
$tabs[300]['privacy']['icon'] = 'um-faicon-lock';
$tabs[300]['privacy']['title'] = 'Privacy';
$tabs[300]['privacy']['title'] = __('Privacy','ultimatemember');
$tabs[400]['notifications']['icon'] = 'um-icon-ios-bell';
$tabs[400]['notifications']['title'] = 'Notifications';
$tabs[400]['notifications']['title'] = __('Notifications','ultimatemember');
$tabs[500]['delete']['icon'] = 'um-faicon-trash-o';
$tabs[500]['delete']['title'] = 'Delete Account';
$tabs[500]['delete']['title'] = __('Delete Account','ultimatemember');
$ultimatemember->account->tabs = apply_filters('um_account_page_default_tabs_hook', $tabs );
+3 -3
View File
@@ -94,7 +94,7 @@
<div class="um-members-intro">
<div class="um-members-total"><?php echo um_members('header'); ?></div>
<div class="um-members-total"><?php echo ( um_members('total_users') > 1 ) ? um_members('header') : um_members('header_single'); ?></div>
</div>
@@ -227,13 +227,13 @@
$default_size = str_replace( 'px', '', um_get_option('profile_photosize') );
$corner = um_get_option('profile_photocorner');
?>
<div class="um-member-photo radius-<?php echo $corner; ?>"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), $default_size ); ?></a></div>
<div class="um-member-photo radius-<?php echo $corner; ?>"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo um_cap_initials( um_user('display_name') ); ?>"><?php echo get_avatar( um_user('ID'), $default_size ); ?></a></div>
<?php } ?>
<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_cap_initials( um_user('display_name') ); ?></a></div>
<div class="um-member-name"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo um_cap_initials( um_user('display_name') ); ?>"><?php echo um_cap_initials( um_user('display_name') ); ?></a></div>
<?php } ?>
<?php
+2 -2
View File
@@ -244,7 +244,7 @@
<div class="um-profile-photo" data-user_id="<?php echo um_profile_id(); ?>">
<a href="<?php echo um_user_profile_url(); ?>" class="um-profile-photo-img"><?php echo $overlay . get_avatar( um_user('ID'), $default_size ); ?></a>
<a href="<?php echo um_user_profile_url(); ?>" class="um-profile-photo-img" title="<?php echo um_user('display_name'); ?>"><?php echo $overlay . get_avatar( um_user('ID'), $default_size ); ?></a>
<?php
@@ -283,7 +283,7 @@
<div class="um-main-meta">
<?php if ( $args['show_name'] ) { ?>
<div class="um-name"><a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name'); ?></a></div>
<div class="um-name"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo um_user('display_name'); ?>"><?php echo um_user('display_name'); ?></a></div>
<?php } ?>
<div class="um-clear"></div>
</div>
+14 -4
View File
@@ -1920,10 +1920,20 @@ class UM_Fields {
// start output here
$this->get_fields = $this->get_fields();
if ( um_is_myprofile() ) {
$output .= '<p class="um-profile-note"><i class="um-faicon-frown-o"></i><span>' . sprintf(__('Your profile is looking a little empty. Why not <a href="%s">add</a> some information!','ultimatemember'), add_query_arg('um_action','edit') ) . '</span></p>';
} else {
$output .= '<p class="um-profile-note"><i class="um-faicon-frown-o"></i><span>' . __('This user has not added any information to their profile yet.','ultimatemember') . '</span></p>';
if ( um_get_option('profile_empty_text') ) {
$emo = um_get_option('profile_empty_text_emo');
if ( $emo ) {
$emo = '<i class="um-faicon-frown-o"></i>';
} else {
$emo = false;
}
if ( um_is_myprofile() ) {
$output .= '<p class="um-profile-note">' . $emo .'<span>' . sprintf(__('Your profile is looking a little empty. Why not <a href="%s">add</a> some information!','ultimatemember'), add_query_arg('um_action','edit') ) . '</span></p>';
} else {
$output .= '<p class="um-profile-note">'. $emo . '<span>' . __('This user has not added any information to their profile yet.','ultimatemember') . '</span></p>';
}
}
if ( !empty( $this->get_fields ) ) {
+2 -2
View File
@@ -108,12 +108,12 @@
if ( strpos($value, 'http://') !== 0 ) {
$value = 'http://' . $value;
}
$value = '<a href="'. $value .'" target="'.$data['url_target'].'" ' . $url_rel . '>'.$alt.'</a>';
$value = '<a href="'. $value .'" title="'.$alt.'" target="'.$data['url_target'].'" ' . $url_rel . '>'.$alt.'</a>';
}
if ( !is_array( $value ) ) {
if ( is_email( $value ) )
$value = '<a href="mailto:'. $value.'">'.$value.'</a>';
$value = '<a href="mailto:'. $value.'" title="'.$value.'">'.$value.'</a>';
} else {
$value = implode(', ', $value);
}
+1 -1
View File
@@ -177,7 +177,7 @@
***/
add_filter('um_prepare_user_results_array', 'um_prepare_user_results_array', 50, 2);
function um_prepare_user_results_array($result){
if ( empty( $result['users_per_page'] ) ) {
$result['no_users'] = 1;
} else {
+9 -6
View File
@@ -109,18 +109,20 @@ class UM_Members {
*** @Generate a loop of results
***/
function get_members($args){
global $ultimatemember;
extract($args);
$query_args = array();
$query_args = apply_filters( 'um_prepare_user_query_args', $query_args, $args );
$users = new WP_User_Query( $query_args );
/**
Getting the final array
**/
// number of profiles for mobile
if ( $ultimatemember->mobile->isMobile() && isset( $profiles_per_page_mobile ) )
$profiles_per_page = $profiles_per_page_mobile;
$array['users'] = $users->results;
$array['total_users'] = (isset( $max_users ) && $max_users && $max_users <= $users->total_users ) ? $max_users : $users->total_users;
@@ -130,7 +132,8 @@ class UM_Members {
$array['total_pages'] = ceil( $array['total_users'] / $profiles_per_page );
$array['header'] = $this->convert_tags( $header, $array );
$array['header_single'] = $this->convert_tags( $header_single, $array );
$array['users_per_page'] = array_slice($array['users'], ( ( $profiles_per_page * $array['page'] ) - $profiles_per_page ), $profiles_per_page );
for( $i = $array['page']; $i <= $array['page'] + 2; $i++ ) {
+5 -1
View File
@@ -45,8 +45,10 @@ class UM_Setup {
'_um_cover_photos' => '1',
'_um_show_name' => '1',
'_um_directory_header' => __('{total_users} Members','ultimatemember'),
'_um_directory_header_single' => __('{total_users} Member','ultimatemember'),
'_um_directory_no_users' => __('We are sorry. We cannot find any users who match your search criteria.','ultimatemember'),
'_um_profiles_per_page' => '12',
'_um_profiles_per_page' => 12,
'_um_profiles_per_page_mobile' => 6,
'_um_core' => 'members',
);
@@ -88,6 +90,8 @@ class UM_Setup {
'_um_profile_show_bio' => 1,
'_um_profile_bio_maxchars' => 180,
'_um_profile_header_menu' => 'bc',
'_um_profile_empty_text' => 1,
'_um_profile_empty_text_emo' => 1,
'_um_profile_role' => '0',
'_um_profile_template' => 'profile',
'_um_profile_max_width' => '1000px',
+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.29
Version: 1.0.30
Author: Ultimate Member
Author URI: http://ultimatemember.com/
*/
File diff suppressed because it is too large Load Diff
+14 -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.29
Stable Tag: 1.0.30
License: GNU Version 2 or Any Later Version
@@ -170,6 +170,19 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
== Changelog ==
= 1.0.30: January 29, 2015 =
* New: added option to control number of profiles to display in members directory for mobile devices
* New: new admin action hook 'um_extend_admin_menu' to extend plugin administration menu
* New: Improved plugin accessbility e.g add alt text to links and images so people with disabilities can use screen readers
* New: added option to show/hide the message that appears if profile is empty (includes emoticon show/hide)
* Tweak: new translatable strings
* Tweak: added option to customize single-result text for members directory
* Tweak: removed unnecessary code from member directory backend
* Tweak: removed unnecessary js from admin head
* Fixed: Account page is now translatable
* Fixed: content restriction widget css in backend
= 1.0.29: January 28, 2015 =
* New: added feature to show user display name in menu (e.g. Welcome, {display_name})
+17
View File
@@ -1265,6 +1265,23 @@ $this->sections[] = array(
),
),
array(
'id' => 'profile_empty_text',
'type' => 'switch',
'title' => __( 'Show a custom message if profile is empty' ),
'default' => um_get_metadefault('profile_empty_text'),
'desc' => 'Switch on/off the custom message that appears when the profile is empty',
),
array(
'id' => 'profile_empty_text_emo',
'type' => 'switch',
'title' => __( 'Show the emoticon' ),
'default' => um_get_metadefault('profile_empty_text_emo'),
'desc' => 'Switch on/off the emoticon (sad face) that appears above the message',
'required' => array( 'profile_empty_text', '=', 1 ),
),
)
);