mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Version 1.0.36
This commit is contained in:
@@ -232,7 +232,6 @@ p.um-notice.err {
|
||||
margin: 0 0 0 8px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.um-tip i {
|
||||
@@ -241,7 +240,6 @@ p.um-notice.err {
|
||||
line-height: 22px;
|
||||
display: block;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.um-tip-text {
|
||||
@@ -661,4 +659,17 @@ div.um-photo a {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
div.um-photo img {max-height: 300px; max-width: 100%;}
|
||||
div.um-photo img {max-height: 300px; max-width: 100%;}
|
||||
|
||||
/*
|
||||
- other form styles
|
||||
*/
|
||||
|
||||
span.um-req {
|
||||
margin: 0 0 0 8px;
|
||||
font-size: xx-large;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
top: 10px;
|
||||
}
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -188,6 +188,15 @@ print "
|
||||
";
|
||||
}
|
||||
|
||||
if ( $form_asterisk_color ) {
|
||||
print "
|
||||
.um-$form_id.um span.um-req
|
||||
{
|
||||
color: $form_asterisk_color !important;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
if ( $form_field_label ) {
|
||||
print "
|
||||
.um-$form_id.um .um-field-label {
|
||||
|
||||
@@ -25,6 +25,6 @@ jQuery(document).ready(function() {
|
||||
um_conditional();
|
||||
|
||||
});
|
||||
jQuery('.um-field input[type=radio], .um-field input[type=checkbox]').trigger('change');
|
||||
jQuery('.um-field select, .um-field input[type=radio], .um-field input[type=checkbox]').trigger('change');
|
||||
|
||||
});
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -25,7 +25,7 @@
|
||||
$ultimatemember->user->update_profile( $changes );
|
||||
|
||||
// delete account
|
||||
if ( $_POST['single_user_password'] && isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account') ) {
|
||||
if ( $_POST['single_user_password'] && isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account','ultimatemember') ) {
|
||||
if ( current_user_can('delete_users') || um_user('can_delete_profile') ) {
|
||||
if ( !um_user('super_admin') ) {
|
||||
$ultimatemember->user->delete();
|
||||
@@ -94,7 +94,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account') ) {
|
||||
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account','ultimatemember') ) {
|
||||
if ( strlen(trim( $_POST['single_user_password'] ) ) == 0 ) {
|
||||
$ultimatemember->form->add_error('single_user_password', 'You must enter your password');
|
||||
} else {
|
||||
@@ -139,7 +139,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="<?php _e('Delete 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('Delete Account','ultimatemember'); ?>" class="um-button" /></div><div class="um-clear"></div></div>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
@@ -129,13 +129,13 @@
|
||||
<div class="um-members-pagi uimob340-hide uimob500-hide">
|
||||
|
||||
<?php if ( um_members('page') != 1 ) { ?>
|
||||
<a href="<?php echo $ultimatemember->permalinks->add_query( 'members_page', 1 ); ?>" class="pagi pagi-arrow um-tip-n" title="First Page"><i class="um-faicon-angle-double-left"></i></a>
|
||||
<a href="<?php echo $ultimatemember->permalinks->add_query( 'members_page', 1 ); ?>" class="pagi pagi-arrow um-tip-n" title="<?php _e('First Page','ultimatemember'); ?>"><i class="um-faicon-angle-double-left"></i></a>
|
||||
<?php } else { ?>
|
||||
<span class="pagi pagi-arrow disabled"><i class="um-faicon-angle-double-left"></i></span>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( um_members('page') > 1 ) { ?>
|
||||
<a href="<?php echo $ultimatemember->permalinks->add_query( 'members_page', um_members('page') - 1 ); ?>" class="pagi pagi-arrow um-tip-n" title="Previous"><i class="um-faicon-angle-left"></i></a>
|
||||
<a href="<?php echo $ultimatemember->permalinks->add_query( 'members_page', um_members('page') - 1 ); ?>" class="pagi pagi-arrow um-tip-n" title="<?php _e('Previous','ultimatemember'); ?>"><i class="um-faicon-angle-left"></i></a>
|
||||
<?php } else { ?>
|
||||
<span class="pagi pagi-arrow disabled"><i class="um-faicon-angle-left"></i></span>
|
||||
<?php } ?>
|
||||
@@ -153,13 +153,13 @@
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( um_members('page') != um_members('total_pages') ) { ?>
|
||||
<a href="<?php echo $ultimatemember->permalinks->add_query( 'members_page', um_members('page') + 1 ); ?>" class="pagi pagi-arrow um-tip-n" title="Next"><i class="um-faicon-angle-right"></i></a>
|
||||
<a href="<?php echo $ultimatemember->permalinks->add_query( 'members_page', um_members('page') + 1 ); ?>" class="pagi pagi-arrow um-tip-n" title="<?php _e('Next','ultimatemember'); ?>"><i class="um-faicon-angle-right"></i></a>
|
||||
<?php } else { ?>
|
||||
<span class="pagi pagi-arrow disabled"><i class="um-faicon-angle-right"></i></span>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( um_members('page') != um_members('total_pages') ) { ?>
|
||||
<a href="<?php echo $ultimatemember->permalinks->add_query( 'members_page', um_members('total_pages') ); ?>" class="pagi pagi-arrow um-tip-n" title="Last Page"><i class="um-faicon-angle-double-right"></i></a>
|
||||
<a href="<?php echo $ultimatemember->permalinks->add_query( 'members_page', um_members('total_pages') ); ?>" class="pagi pagi-arrow um-tip-n" title="<?php _e('Last Page','ultimatemember'); ?>"><i class="um-faicon-angle-double-right"></i></a>
|
||||
<?php } else { ?>
|
||||
<span class="pagi pagi-arrow disabled"><i class="um-faicon-angle-double-right"></i></span>
|
||||
<?php } ?>
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
|
||||
<?php if ( $ultimatemember->fields->viewing == true && um_user('description') && $args['show_bio'] ) { ?>
|
||||
|
||||
<div class="um-meta-text"><?php echo um_user('description'); ?></div>
|
||||
<div class="um-meta-text"><?php echo um_filtered_value('description'); ?></div>
|
||||
|
||||
<?php } else if ( $ultimatemember->fields->editing == true && $args['show_bio'] ) { ?>
|
||||
|
||||
|
||||
+10
-9
@@ -259,6 +259,7 @@ class UM_Fields {
|
||||
$label = apply_filters("um_view_label_{$key}", $label );
|
||||
} else {
|
||||
$label = apply_filters("um_edit_label_{$key}", $label );
|
||||
$label = apply_filters("um_edit_label_all_fields", $label, $data );
|
||||
}
|
||||
|
||||
$output .= '<label for="'.$key.$ultimatemember->form->form_suffix.'">'.$label.'</label>';
|
||||
@@ -502,8 +503,8 @@ class UM_Fields {
|
||||
|
||||
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] . '"';
|
||||
foreach( $array['conditions'] as $cond_id => $cond ) {
|
||||
$array['conditional'] .= ' data-cond-'.$cond_id.'-action="'. $cond[0] . '" data-cond-'.$cond_id.'-field="'. $cond[1] . '" data-cond-'.$cond_id.'-operator="'. $cond[2] . '" data-cond-'.$cond_id.'-value="'. $cond[3] . '"';
|
||||
}
|
||||
|
||||
$array['classes'] .= ' um-is-conditional';
|
||||
@@ -911,7 +912,7 @@ class UM_Fields {
|
||||
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="'.$key.'">';
|
||||
|
||||
if ( isset( $data['label'] ) ) {
|
||||
$output .= $this->field_label( __('Current Password'), $key, $data);
|
||||
$output .= $this->field_label( __('Current Password','ultimatemember'), $key, $data);
|
||||
}
|
||||
|
||||
$output .= '<div class="um-field-area">';
|
||||
@@ -940,7 +941,7 @@ class UM_Fields {
|
||||
|
||||
if ( $this->set_mode == 'account' && um_is_core_page('account') || $this->set_mode == 'password' && um_is_core_page('password-reset') ) {
|
||||
|
||||
$output .= $this->field_label( 'New Password', $key, $data);
|
||||
$output .= $this->field_label( __('New Password','ultimatemember'), $key, $data);
|
||||
|
||||
} else if ( isset( $data['label'] ) ) {
|
||||
|
||||
@@ -972,7 +973,7 @@ class UM_Fields {
|
||||
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="'.$key.'">';
|
||||
|
||||
if ( isset( $data['label'] ) ) {
|
||||
$output .= $this->field_label( sprintf( __('Confirm New %s'), $data['label'] ), $key, $data);
|
||||
$output .= $this->field_label( sprintf(__('Confirm New %s','ultimatemember'), $data['label'] ), $key, $data);
|
||||
}
|
||||
|
||||
$output .= '<div class="um-field-area">';
|
||||
@@ -1547,14 +1548,14 @@ class UM_Fields {
|
||||
|
||||
/* HTML */
|
||||
case 'block':
|
||||
$output .= '<div class="um-field ' . $classes . '">
|
||||
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="'.$key.'">
|
||||
<div class="um-field-block">'.$content.'</div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
/* Shortcode */
|
||||
case 'shortcode':
|
||||
$output .= '<div class="um-field ' . $classes . '">
|
||||
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="'.$key.'">
|
||||
<div class="um-field-shortcode">'.do_shortcode($content).'</div>
|
||||
</div>';
|
||||
break;
|
||||
@@ -1841,14 +1842,14 @@ class UM_Fields {
|
||||
|
||||
/* HTML */
|
||||
case 'block':
|
||||
$output .= '<div class="um-field ' . $classes . '">
|
||||
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="'.$key.'">
|
||||
<div class="um-field-block">'.$content.'</div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
/* Shortcode */
|
||||
case 'shortcode':
|
||||
$output .= '<div class="um-field ' . $classes . '">
|
||||
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="'.$key.'">
|
||||
<div class="um-field-shortcode">'.do_shortcode($content).'</div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
<?php
|
||||
|
||||
/***
|
||||
*** @Dates
|
||||
*** @field is required?
|
||||
***/
|
||||
add_filter('um_edit_label_all_fields', 'um_edit_label_all_fields', 10, 2);
|
||||
function um_edit_label_all_fields( $label, $data ) {
|
||||
|
||||
$asterisk = um_get_option('form_asterisk');
|
||||
if ( $asterisk && isset( $data['required'] ) && $data['required'] == 1 )
|
||||
$label = $label . '<span class="um-req" title="'.__('Required','ultimatemember').'">*</span>';
|
||||
|
||||
return $label;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @change birth date label in view
|
||||
***/
|
||||
add_filter('um_view_label_birth_date', 'um_view_label_birth_date');
|
||||
function um_view_label_birth_date( $label ) {
|
||||
@@ -10,7 +23,39 @@
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Time
|
||||
*** @urls in description
|
||||
***/
|
||||
add_filter('um_profile_field_filter_hook__description', 'um_profile_field_filter_hook__description', 99, 2);
|
||||
function um_profile_field_filter_hook__description( $value, $data ) {
|
||||
global $ultimatemember;
|
||||
|
||||
$value = preg_replace(
|
||||
array(
|
||||
'/(?(?=<a[^>]*>.+<\/a>)
|
||||
(?:<a[^>]*>.+<\/a>)
|
||||
|
|
||||
([^="\']?)((?:https?|ftp|bf2|):\/\/[^<> \n\r]+)
|
||||
)/iex',
|
||||
'/<a([^>]*)target="?[^"\']+"?/i',
|
||||
'/<a([^>]+)>/i',
|
||||
'/(^|\s)(www.[^<> \n\r]+)/iex',
|
||||
'/(([_A-Za-z0-9-]+)(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-]+)
|
||||
(\\.[A-Za-z0-9-]+)*)/iex'
|
||||
),
|
||||
array(
|
||||
"stripslashes((strlen('\\2')>0?'\\1<a rel=\"nofollow\" href=\"\\2\">\\2</a>\\3':'\\0'))",
|
||||
'<a\\1',
|
||||
'<a\\1 target="_blank">',
|
||||
"stripslashes((strlen('\\2')>0?'\\1<a rel=\"nofollow\" href=\"http://\\2\">\\2</a>\\3':'\\0'))",
|
||||
"stripslashes((strlen('\\2')>0?'<a rel=\"nofollow\" href=\"mailto:\\0\">\\0</a>':'\\0'))"
|
||||
),
|
||||
$value
|
||||
);
|
||||
return $value;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @time
|
||||
***/
|
||||
add_filter('um_profile_field_filter_hook__time', 'um_profile_field_filter_hook__time', 99, 2);
|
||||
function um_profile_field_filter_hook__time( $value, $data ) {
|
||||
@@ -23,7 +68,7 @@
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Dates
|
||||
*** @date
|
||||
***/
|
||||
add_filter('um_profile_field_filter_hook__date', 'um_profile_field_filter_hook__date', 99, 2);
|
||||
function um_profile_field_filter_hook__date( $value, $data ) {
|
||||
@@ -39,7 +84,7 @@
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Images
|
||||
*** @file
|
||||
***/
|
||||
add_filter('um_profile_field_filter_hook__file', 'um_profile_field_filter_hook__file', 99, 2);
|
||||
function um_profile_field_filter_hook__file( $value, $data ) {
|
||||
@@ -65,7 +110,7 @@
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Files
|
||||
*** @image
|
||||
***/
|
||||
add_filter('um_profile_field_filter_hook__image', 'um_profile_field_filter_hook__image', 99, 2);
|
||||
function um_profile_field_filter_hook__image( $value, $data ) {
|
||||
@@ -83,11 +128,11 @@
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Global
|
||||
*** @global
|
||||
***/
|
||||
add_filter('um_profile_field_filter_hook__', 'um_profile_field_filter_hook__', 99, 2);
|
||||
function um_profile_field_filter_hook__( $value, $data ) {
|
||||
|
||||
|
||||
if ( isset( $data['validate'] ) && $data['validate'] != '' && strstr( $data['validate'], 'url' ) ) {
|
||||
$alt = ( isset( $data['url_text'] ) && !empty( $data['url_text'] ) ) ? $data['url_text'] : $value;
|
||||
$url_rel = ( isset( $data['url_rel'] ) ) ? 'rel="nofollow"' : '';
|
||||
@@ -122,6 +167,7 @@
|
||||
$value = str_replace('http://https://','https://',$value);
|
||||
|
||||
return $value;
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
@@ -6,9 +6,15 @@
|
||||
add_filter( 'wp_nav_menu_items', 'um_add_custom_message_to_menu', 10, 2 );
|
||||
function um_add_custom_message_to_menu( $items, $args ) {
|
||||
global $ultimatemember;
|
||||
|
||||
// this feature required logged in user
|
||||
if ( !is_user_logged_in() )
|
||||
return $items;
|
||||
|
||||
um_fetch_user( get_current_user_id() );
|
||||
$items = $ultimatemember->shortcodes->convert_user_tags( $items );
|
||||
um_reset_user();
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
|
||||
+24
-2
@@ -8,6 +8,8 @@ class UM_Rewrite {
|
||||
|
||||
add_action('init', array(&$this, 'rewrite_rules') );
|
||||
|
||||
add_action('template_redirect', array(&$this, 'redirect_author_page'), 9999 );
|
||||
|
||||
add_action('template_redirect', array(&$this, 'locate_user_profile'), 9999 );
|
||||
|
||||
}
|
||||
@@ -54,12 +56,26 @@ class UM_Rewrite {
|
||||
'top'
|
||||
);
|
||||
|
||||
flush_rewrite_rules();
|
||||
if ( !get_option('um_flush_rules') ) {
|
||||
flush_rewrite_rules(true);
|
||||
update_option('um_flush_rules', true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @author page to user profile redirect
|
||||
***/
|
||||
function redirect_author_page() {
|
||||
if ( um_get_option('author_redirect') && is_author() ) {
|
||||
$id = get_query_var( 'author' );
|
||||
um_fetch_user( $id );
|
||||
exit( wp_redirect( um_user_profile_url() ) );
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
*** @locate/display a profile
|
||||
***/
|
||||
@@ -99,11 +115,17 @@ class UM_Rewrite {
|
||||
um_set_requested_user( $user_id );
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
exit( wp_redirect( um_get_core_page('user') ) );
|
||||
|
||||
}
|
||||
|
||||
} else if ( um_is_core_page('user') ) { // just base64_decode
|
||||
|
||||
if ( is_user_logged_in() ) { // just redirect to their profile
|
||||
exit( wp_redirect( um_user_profile_url() ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6
-4
@@ -63,6 +63,7 @@ class UM_Setup {
|
||||
'_um_form_bg_color',
|
||||
'_um_form_placeholder',
|
||||
'_um_form_icon_color',
|
||||
'_um_form_asterisk_color',
|
||||
'_um_form_field_label',
|
||||
'_um_form_text_color',
|
||||
'_um_active_color',
|
||||
@@ -77,6 +78,7 @@ class UM_Setup {
|
||||
'_um_form_text_color' => '#666',
|
||||
'_um_form_field_label' => '#555',
|
||||
'_um_form_icon_color' => '#aaa',
|
||||
'_um_form_asterisk_color' => '#aaa',
|
||||
'_um_form_bg_color' => '#fff',
|
||||
'_um_form_placeholder' => '#aaa',
|
||||
'_um_form_border' => '2px solid #ddd',
|
||||
@@ -123,12 +125,12 @@ class UM_Setup {
|
||||
'_um_register_max_width' => '450px',
|
||||
'_um_register_align' => 'center',
|
||||
'_um_register_icons' => 'label',
|
||||
'_um_register_primary_btn_word' => 'Register',
|
||||
'_um_register_primary_btn_word' => __('Register','ultimatemember'),
|
||||
'_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_word' => 'Login',
|
||||
'_um_register_secondary_btn_word' => __('Login','ultimatemember'),
|
||||
'_um_register_secondary_btn_color' => '#eee',
|
||||
'_um_register_secondary_btn_hover' => '#e5e5e5',
|
||||
'_um_register_secondary_btn_text' => '#666',
|
||||
@@ -136,13 +138,13 @@ class UM_Setup {
|
||||
'_um_login_max_width' => '450px',
|
||||
'_um_login_align' => 'center',
|
||||
'_um_login_icons' => 'label',
|
||||
'_um_login_primary_btn_word' => 'Login',
|
||||
'_um_login_primary_btn_word' => __('Login','ultimatemember'),
|
||||
'_um_login_primary_btn_color' => '#3ba1da',
|
||||
'_um_login_primary_btn_hover' => '#44b0ec',
|
||||
'_um_login_primary_btn_text' => '#fff',
|
||||
'_um_login_forgot_pass_link' => 1,
|
||||
'_um_login_secondary_btn' => 1,
|
||||
'_um_login_secondary_btn_word' => 'Register',
|
||||
'_um_login_secondary_btn_word' => __('Register','ultimatemember'),
|
||||
'_um_login_secondary_btn_color' => '#eee',
|
||||
'_um_login_secondary_btn_hover' => '#e5e5e5',
|
||||
'_um_login_secondary_btn_text' => '#666',
|
||||
|
||||
@@ -127,13 +127,14 @@
|
||||
***/
|
||||
function um_filtered_value( $key, $data = false ) {
|
||||
global $ultimatemember;
|
||||
|
||||
$value = um_user( $key );
|
||||
|
||||
if ( !$data ){
|
||||
$data = $ultimatemember->builtin->get_specific_field( $key );
|
||||
if ( !$data ) {
|
||||
$data = $ultimatemember->builtin->get_specific_field( $key );
|
||||
}
|
||||
|
||||
$type = (isset($data['type']))?$data['type']:'';
|
||||
$type = ( isset($data['type']) ) ? $data['type'] : '';
|
||||
|
||||
$value = apply_filters("um_profile_field_filter_hook__", $value, $data );
|
||||
$value = apply_filters("um_profile_field_filter_hook__{$key}", $value, $data );
|
||||
|
||||
@@ -230,12 +230,6 @@ class UM_Shortcodes {
|
||||
$str = preg_replace('/'.$pattern.'/', um_user($usermeta) , $str );
|
||||
}
|
||||
|
||||
if ( get_option('permalink_structure') ) {
|
||||
$str = str_replace( untrailingslashit( um_get_core_page('user') ), untrailingslashit( um_user_profile_url() ), $str );
|
||||
} else {
|
||||
$str = str_replace( um_get_core_page('user'), um_user_profile_url(), $str );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
-4
@@ -103,8 +103,10 @@ class UM_User_posts {
|
||||
global $wpdb;
|
||||
if ( !$user_id )
|
||||
$user_id = um_user('ID');
|
||||
|
||||
$where = get_posts_by_author_sql( $post_type, true, $user_id );
|
||||
$count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" );
|
||||
|
||||
return apply_filters('um_pretty_number_formatting', $count);
|
||||
}
|
||||
|
||||
@@ -115,10 +117,14 @@ class UM_User_posts {
|
||||
global $wpdb;
|
||||
if ( !$user_id )
|
||||
$user_id = um_user('ID');
|
||||
$count = $wpdb->get_var('
|
||||
SELECT COUNT(comment_ID)
|
||||
FROM ' . $wpdb->comments. '
|
||||
WHERE user_id = "' . $user_id . '"');
|
||||
|
||||
$count = $wpdb->get_var(
|
||||
'SELECT COUNT(comment_ID) FROM ' . $wpdb->comments. '
|
||||
WHERE user_id = ' . $user_id . '
|
||||
AND comment_approved = "1"
|
||||
AND comment_type IN ("comment", "")'
|
||||
);
|
||||
|
||||
return apply_filters('um_pretty_number_formatting', $count);
|
||||
}
|
||||
|
||||
|
||||
@@ -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.35
|
||||
Version: 1.0.36
|
||||
Author: Ultimate Member
|
||||
Author URI: http://ultimatemember.com/
|
||||
*/
|
||||
|
||||
+346
-276
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+15
-1
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
|
||||
Requires at least: 4.1
|
||||
Tested up to: 4.1
|
||||
|
||||
Stable Tag: 1.0.35
|
||||
Stable Tag: 1.0.36
|
||||
|
||||
License: GNU Version 2 or Any Later Version
|
||||
|
||||
@@ -175,6 +175,20 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.0.36: February 1, 2015 =
|
||||
|
||||
* New: URLs in user description are automatically converted to hyperlinks
|
||||
* New: added option to redirect author archive to their UM profile automatically
|
||||
* New: added option to show asterisk next to required fields (optional)
|
||||
* New: Turkish language file (40% completed)
|
||||
* Tweak: updated language file with missing sentences and words
|
||||
* Tweak: auto redirect user/ base to user profile (e.g. user/username/)
|
||||
* Fixed: issue with wrong comments count on user profile menu
|
||||
* Fixed: issue with display name tags in nav menu
|
||||
* Fixed: issue with conditional logic for select/multi-select fields
|
||||
* Fixed: issue with conditional logic for content blocks and shortcode fields
|
||||
* Fixed: conflict with Pods wordpress plugin
|
||||
|
||||
= 1.0.35: January 31, 2015 =
|
||||
|
||||
* Tweak: exif module is not required anymore and does not stop photo uploads (exif is highly recommended)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<?php if ( isset($modified_args) && count($loop) >= 10 ) { ?>
|
||||
|
||||
<div class="um-load-items">
|
||||
<a href="#" class="um-ajax-paginate um-button" data-hook="um_load_comments" data-args="<?php echo $modified_args; ?>"><?php _e('load more comments','um-bbpress'); ?></a>
|
||||
<a href="#" class="um-ajax-paginate um-button" data-hook="um_load_comments" data-args="<?php echo $modified_args; ?>"><?php _e('load more comments','ultimatemember'); ?></a>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
@@ -11,7 +11,7 @@
|
||||
<?php if ( count($loop) >= 10 ) { ?>
|
||||
|
||||
<div class="um-load-items">
|
||||
<a href="#" class="um-ajax-paginate um-button" data-hook="um_load_comments" data-args="comment,10,10,<?php echo um_user('user_email'); ?>"><?php _e('load more comments','um-bbpress'); ?></a>
|
||||
<a href="#" class="um-ajax-paginate um-button" data-hook="um_load_comments" data-args="comment,10,10,<?php echo um_user('user_email'); ?>"><?php _e('load more comments','ultimatemember'); ?></a>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
@@ -20,6 +20,6 @@
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<?php ( um_is_myprofile() ) ? _e('You have not made any comments.') : _e('This user has not made any comments.'); ?>
|
||||
<?php ( um_is_myprofile() ) ? _e('You have not made any comments.','ultimatemember') : _e('This user has not made any comments.','ultimatemember'); ?>
|
||||
|
||||
<?php } ?>
|
||||
@@ -14,7 +14,7 @@
|
||||
<?php if ( isset($modified_args) && $loop->have_posts() && $loop->found_posts >= 10 ) { ?>
|
||||
|
||||
<div class="um-load-items">
|
||||
<a href="#" class="um-ajax-paginate um-button" data-hook="um_load_posts" data-args="<?php echo $modified_args; ?>"><?php _e('load more posts','um-bbpress'); ?></a>
|
||||
<a href="#" class="um-ajax-paginate um-button" data-hook="um_load_posts" data-args="<?php echo $modified_args; ?>"><?php _e('load more posts','ultimatemember'); ?></a>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
@@ -11,7 +11,7 @@
|
||||
<?php if ( $loop->found_posts >= 10 ) { ?>
|
||||
|
||||
<div class="um-load-items">
|
||||
<a href="#" class="um-ajax-paginate um-button" data-hook="um_load_posts" data-args="post,10,10,<?php echo um_user('ID'); ?>"><?php _e('load more posts','um-bbpress'); ?></a>
|
||||
<a href="#" class="um-ajax-paginate um-button" data-hook="um_load_posts" data-args="post,10,10,<?php echo um_user('ID'); ?>"><?php _e('load more posts','ultimatemember'); ?></a>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
@@ -20,6 +20,6 @@
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<?php ( um_is_myprofile() ) ? _e('You have not created any posts.') : _e('This user has not created any posts.'); ?>
|
||||
<?php ( um_is_myprofile() ) ? _e('You have not created any posts.','ultimatemember') : _e('This user has not created any posts.','ultimatemember'); ?>
|
||||
|
||||
<?php } ?>
|
||||
+25
-12
@@ -68,14 +68,20 @@ $this->sections[] = array(
|
||||
'required' => array( 'display_name', '=', 'field' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'author_redirect',
|
||||
'type' => 'switch',
|
||||
'title' => __( 'Automatically redirect author page to their profile?' ),
|
||||
'default' => 1,
|
||||
'desc' => __('If enabled, author pages will automatically redirect to the user\'s profile page'),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'members_page',
|
||||
'type' => 'switch',
|
||||
'title' => __( 'Members Directory' ),
|
||||
'default' => 1,
|
||||
'desc' => 'Control whether to enable or disable member directories on this site',
|
||||
'on' => __('Enable'),
|
||||
'off' => __('Disable'),
|
||||
),
|
||||
|
||||
array(
|
||||
@@ -106,8 +112,6 @@ $this->sections[] = array(
|
||||
'title' => __( 'Password Account Tab' ),
|
||||
'default' => 1,
|
||||
'desc' => 'Enable/disable the Password account tab in account page',
|
||||
'on' => 'Enabled',
|
||||
'off' => 'Disabled',
|
||||
),
|
||||
|
||||
array(
|
||||
@@ -116,8 +120,6 @@ $this->sections[] = array(
|
||||
'title' => __( 'Privacy Account Tab' ),
|
||||
'default' => 1,
|
||||
'desc' => 'Enable/disable the Privacy account tab in account page',
|
||||
'on' => 'Enabled',
|
||||
'off' => 'Disabled',
|
||||
),
|
||||
|
||||
array(
|
||||
@@ -126,8 +128,6 @@ $this->sections[] = array(
|
||||
'title' => __( 'Notifications Account Tab' ),
|
||||
'default' => 1,
|
||||
'desc' => 'Enable/disable the Notifications account tab in account page',
|
||||
'on' => 'Enabled',
|
||||
'off' => 'Disabled',
|
||||
),
|
||||
|
||||
array(
|
||||
@@ -136,8 +136,6 @@ $this->sections[] = array(
|
||||
'title' => __( 'Delete Account Tab' ),
|
||||
'default' => 1,
|
||||
'desc' => 'Enable/disable the Delete account tab in account page',
|
||||
'on' => 'Enabled',
|
||||
'off' => 'Disabled',
|
||||
),
|
||||
|
||||
array(
|
||||
@@ -1038,6 +1036,23 @@ $this->sections[] = array(
|
||||
'transparent' => false,
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'form_asterisk',
|
||||
'type' => 'switch',
|
||||
'title' => __( 'Show an asterisk for required fields' ),
|
||||
'default' => 0,
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'form_asterisk_color',
|
||||
'type' => 'color',
|
||||
'default' => um_get_metadefault('form_asterisk_color'),
|
||||
'title' => __( 'Field Required Asterisk Color' ),
|
||||
'validate' => 'color',
|
||||
'transparent' => false,
|
||||
'required' => array( 'form_asterisk', '=', '1' ),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
@@ -1337,8 +1352,6 @@ $tab_options[] = array(
|
||||
'type' => 'switch',
|
||||
'title' => sprintf(__('%s Tab','ultimatemember'), $tab ),
|
||||
'default' => 1,
|
||||
'on' => __('Enabled'),
|
||||
'off' => __('Disabled'),
|
||||
'required' => array( 'profile_menu', '=', 1 ),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user