Update 1.2.93

This commit is contained in:
ultimatemember
2015-05-05 18:06:39 +03:00
parent 77cde02dd8
commit 722367a11c
30 changed files with 340 additions and 96 deletions
+28
View File
@@ -1,3 +1,31 @@
.um-admin-notice {
border-color: #3ba1da !important;
color: #555;
}
.um-admin-notice a.button-primary {
background-color: #3ba1da !important;
border-color: #3ba1da !important;
}
.um-admin-notice a.button-primary:hover {
background-color: #2295d8 !important;
border-color: #2295d8 !important;
}
.um-admin-notice a.button-secondary {opacity: 0.7}
.um-admin-notice a.button-secondary:hover {opacity: 0.9}
.um-admin-notice a {text-decoration: none;color: #3ba1da}
.um-admin-notice a:hover {color: #44b0ec}
.um-filter {
padding: 12px;
border-color: #ddd !important;
margin: 20px 0 0 0 !important;
font-size: 14px;
line-height: 24px;
}
/*
- General metabox styling
*/
+9 -16
View File
@@ -23,12 +23,15 @@
background: #3ba1da url(../img/logo_small.png) no-repeat center 0px !important;
}
.um-about-wrap a.button-primary {
height: 46px;
line-height: 46px;
padding: 0 20px !important;
font-size: 14px;
border: none;
.um-about-wrap .ultimatemember-actions a.button-primary,
.um-about-wrap .ultimatemember-actions a.button {
vertical-align: top;
margin: 0 5px 0 0;
}
.changelog a.button-primary {
height: 40px;
line-height: 38px;
}
.um-about-wrap a {text-decoration: none}
@@ -93,16 +96,6 @@ body.um-admin-modal-open {
top: 1px;
}
.um-admin a.button-primary,
.um-admin input.button-primary {
background: #3ba1da;
box-shadow: none !important;
border-radius: 2px;
color: #fff;
}
.um-admin a.button-primary:hover,
.um-admin input.button-primary:hover {background: #44b0ec;}
/*
- Form Inputs
*/
+7
View File
@@ -4,9 +4,16 @@
*** @when role is saved
***/
function um_admin_delete_role_cache($post_id, $post){
global $ultimatemember;
if(get_post_type( $post_id ) == 'um_role'){
$slug = $post->post_name;
delete_option("um_cached_role_{$slug}");
// need to remove cache of all users
$users = get_users( array( 'fields' => array( 'ID' ), 'meta_key' => 'role', 'meta_value' => $slug ) );
foreach( $users as $user ) {
$ultimatemember->user->remove_cache( $user->ID );
}
}
}
add_action('save_post', 'um_admin_delete_role_cache', 1111, 2);
+48
View File
@@ -15,6 +15,52 @@ class UM_Admin_Dashboard {
add_action( 'admin_head', array( $this, 'menu_order_count' ) );
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1000 );
add_action( 'wp_ajax_ultimatemember_rated', array( $this, 'ultimatemember_rated' ) );
add_action( 'wp_ajax_nopriv_ultimatemember_rated', array( $this, 'ultimatemember_rated' ) );
}
/**
* Change the admin footer text on UM admin pages
*/
public function admin_footer_text( $footer_text ) {
$current_screen = get_current_screen();
// Add the dashboard pages
$um_pages[] = 'toplevel_page_ultimatemember';
$um_pages[] = 'admin_page_ultimatemember-about';
$um_pages[] = 'ultimate-member_page_um_options';
$um_pages[] = 'edit-um_form';
$um_pages[] = 'edit-um_role';
$um_pages[] = 'edit-um_directory';
$um_pages[] = 'ultimate-member_page_ultimatemember-extensions';
if ( isset( $current_screen->id ) && in_array( $current_screen->id, $um_pages ) ) {
// Change the footer text
if ( ! get_option( 'um_admin_footer_text_rated' ) ) {
$footer_text = sprintf( __( 'If you like Ultimate Member please consider leaving a %s&#9733;&#9733;&#9733;&#9733;&#9733;%s review. It will help us to grow the plugin and make it more popular. Thank you.', 'ultimatemember' ), '<a href="https://wordpress.org/support/view/plugin-reviews/ultimate-member?filter=5#postform" target="_blank" class="um-admin-rating-link" data-rated="' . __( 'Thanks :)', 'ultimatemember' ) . '">', '</a>' );
$footer_text .= "<script type='text/javascript'>
jQuery('a.um-admin-rating-link').click(function() {
jQuery.post( '" . admin_url( 'admin-ajax.php', 'relative' ) . "', { action: 'ultimatemember_rated' } );
jQuery(this).parent().text( jQuery(this).data( 'rated' ) );
});
</script>";
}
}
return $footer_text;
}
/**
* When user clicks the review link in backend
*/
function ultimatemember_rated() {
update_option('um_admin_footer_text_rated', 1 );
die();
}
/**
@@ -52,6 +98,8 @@ class UM_Admin_Dashboard {
public function menu_order_count() {
global $menu, $submenu;
if ( !current_user_can( 'list_users' ) ) return;
$count = $this->get_pending_users_count();
foreach( $menu as $key => $menu_item ) {
+5 -1
View File
@@ -172,7 +172,7 @@ class UM_Admin_Enqueue {
wp_register_style('um_admin_columns', um_url . 'admin/assets/css/um-admin-columns.css' );
wp_enqueue_style('um_admin_columns');
wp_register_style('um_admin_misc', um_url . 'admin/assets/css/um-admin-misc.css' );
wp_enqueue_style('um_admin_misc');
@@ -277,6 +277,10 @@ class UM_Admin_Enqueue {
wp_enqueue_style('um_admin_rtl');
}
} else {
$this->load_global_css();
}
}
+5
View File
@@ -83,6 +83,11 @@
<h2>Ultimate Member - Extensions</h2>
<div class="wp-filter um-admin-notice um-filter">
<div class="alignleft"><strong>Core Extensions Bundle</strong> Check out our extensions bundle which includes all extensions at a significant discount.</div>
<div class="alignright"><a href="https://ultimatemember.com/core-extensions-bundle/" class="button button-primary" target="_blank">View our Extensions Bundle</a></div>
</div>
<div class="wp-filter">
<ul class="filter-links">
<li><a href='?page=ultimatemember-extensions&filter=premium' class='<?php if ( !isset($_REQUEST['filter']) || isset( $_REQUEST['filter'] ) && $_REQUEST['filter'] == 'premium' ) { echo 'current'; } ?>'>Premium</a></li>
+2 -4
View File
@@ -1,9 +1,9 @@
<?php global $ultimatemember; include_once um_path . 'admin/templates/welcome/about_header.php'; ?>
<div class="changelog headline-feature dfw">
<div class="changelog feature-list">
<h2>Introducing Ultimate Member</h2>
<div class="feature-section">
<div class="feature-section headline-feature">
<h3><em>Create beautiful community websites with WordPress!</em></h3>
@@ -14,8 +14,6 @@
</div>
</div>
<hr />
<div class="changelog feature-list">
<h2>Key Features</h2>
+1 -2
View File
@@ -1,5 +1,4 @@
<hr />
<div class="return-to-dashboard">
<a href="<?php echo admin_url('admin.php?page=ultimatemember'); ?>">Go to Plugin Dashboard &rarr;</a>
+19 -1
View File
@@ -1,10 +1,28 @@
<?php
// Random tweet - must be kept to 102 chars to "fit"
$tweets = array(
'The easiest way to create powerful online communities and beautiful user profiles with #WordPress'
);
shuffle( $tweets );
?>
<div class="wrap about-wrap um-about-wrap">
<h1>Welcome to Ultimate Member</h1>
<div class="about-text">Thank you for installing! Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress.</div>
<div class="about-text"><?php _e('Thank you for installing! Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress.','ultimatemember'); ?></div>
<div class="wp-badge um-badge">Version <?php echo ultimatemember_version; ?></div>
<p class="um-admin-notice ultimatemember-actions">
<a href="<?php echo admin_url('admin.php?page=um_options'); ?>" class="button button-primary"><?php _e('Settings','ultimatemember'); ?></a>
<a href="https://ultimatemember.com/docs/" class="button button-secondary" target="_blank"><?php _e('Docs','ultimatemember'); ?></a>
<a href="https://ultimatemember.com/forums/" class="button button-secondary" target="_blank"><?php _e('Support','ultimatemember'); ?></a>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://ultimatemember.com/" data-text="<?php echo esc_attr( $tweets[0] ); ?>" data-via="umplugin" data-size="large">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
<h2 class="nav-tab-wrapper">
+3 -7
View File
@@ -1,7 +1,7 @@
<?php global $ultimatemember; include_once um_path . 'admin/templates/welcome/about_header.php'; ?>
<div class="changelog headline-feature dfw">
<div class="changelog feature-list">
<h2>Getting Started</h2>
<div class="feature-section">
@@ -9,8 +9,6 @@
</div>
</div>
<hr />
<div class="changelog feature-list">
@@ -50,15 +48,13 @@
</div>
<hr />
<div class="changelog headline-feature dfw">
<div class="changelog feature-list">
<h2>Need more help?</h2>
<div class="feature-section">
<p>If you want to learn more about Ultimate Member youll need to register on our website where you will be able to interact and get help from other Ultimate Member users via our community forum and also be able to access other useful resources including the plugins documentation.</p>
<p style="text-align:center"><a href="https://ultimatemember.com/forums/" target="_blank" class="button button-primary">Join the Ultimate Member Community</a></p>
<p class="um-admin-notice" style="text-align:center"><a href="https://ultimatemember.com/forums/" target="_blank" class="button button-primary">Join the Ultimate Member Community</a></p>
</div>
</div>
+41
View File
@@ -1531,3 +1531,44 @@
.um-faicon-meanpath:before {
content: "\f20c";
}
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
}
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
}
}
@-o-keyframes spin {
0% {
-o-transform: rotate(0deg);
}
100% {
-o-transform: rotate(359deg);
}
}
@-ms-keyframes spin {
0% {
-ms-transform: rotate(0deg);
}
100% {
-ms-transform: rotate(359deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
.tipsy { padding: 5px; position: absolute; z-index: 9999999999; }
.tipsy { padding: 5px; position: absolute; z-index: 9999999999!important; }
.tipsy-inner {
font-size: 13px !important;
+2 -2
View File
File diff suppressed because one or more lines are too long
+13 -6
View File
@@ -757,6 +757,7 @@ function prepare_Modal() {
jQuery('body').append('<div class="um-popup-overlay"></div>');
jQuery('body').append('<div class="um-popup"></div>');
jQuery('.um-popup').addClass('loading');
jQuery("body,html").css({ overflow: 'hidden' });
}
}
@@ -764,6 +765,7 @@ function remove_Modal() {
if ( jQuery('.um-popup-overlay').length ) {
jQuery('.um-popup').empty().remove();
jQuery('.um-popup-overlay').empty().remove();
jQuery("body,html").css({ overflow: 'inherit' });
}
}
@@ -781,11 +783,16 @@ function responsive_Modal() {
ag_height = 350;
}
jQuery('.um-popup-autogrow').css({
'height': ag_height + 'px'
});
jQuery('.um-popup-autogrow').mCustomScrollbar({
theme:"dark-3"
}).mCustomScrollbar("scrollTo", "bottom",{ scrollInertia:0});
if ( jQuery('.um-popup-autogrow').length ) {
jQuery('.um-popup-autogrow').css({'height': ag_height + 'px'});
jQuery('.um-popup-autogrow').mCustomScrollbar({ theme:"dark-3", mouseWheelPixels:500 }).mCustomScrollbar("scrollTo", "bottom",{ scrollInertia:0} );
} else if ( jQuery('.um-popup-autogrow2').length ) {
jQuery('.um-popup-autogrow2').css({'max-height': ag_height + 'px'});
jQuery('.um-popup-autogrow2').mCustomScrollbar({ theme:"dark-3", mouseWheelPixels:500 });
}
}
}
+4 -4
View File
@@ -30,8 +30,8 @@ jQuery(document).ready(function() {
jQuery('.um-tip-e').tipsy({gravity: 'e', opacity: 1, live: 'a.live', offset: 3, delayIn: 500 });
jQuery('.um-tip-s').tipsy({gravity: 's', opacity: 1, live: 'a.live', offset: 3, delayIn: 500 });
jQuery(document).on('change', '.um-field input[type=radio]', function(){
var field = jQuery(this).parents('.um-field');
jQuery(document).on('change', '.um-field-area input[type=radio]', function(){
var field = jQuery(this).parents('.um-field-area');
var this_field = jQuery(this).parents('label');
field.find('.um-field-radio').removeClass('active');
field.find('.um-field-radio').find('i').removeClass().addClass('um-icon-android-radio-button-off');
@@ -39,9 +39,9 @@ jQuery(document).ready(function() {
this_field.find('i').removeClass().addClass('um-icon-android-radio-button-on');
});
jQuery(document).on('change', '.um-field input[type=checkbox]', function(){
jQuery(document).on('change', '.um-field-area input[type=checkbox]', function(){
var field = jQuery(this).parents('.um-field');
var field = jQuery(this).parents('.um-field-area');
var this_field = jQuery(this).parents('label');
if ( this_field.hasClass('active') ) {
this_field.removeClass('active');
+2 -2
View File
File diff suppressed because one or more lines are too long
+2
View File
@@ -45,6 +45,8 @@
do_action('um_post_account_update');
do_action('um_after_user_account_updated', get_current_user_id() );
$tab = ( get_query_var('um_tab') ) ? get_query_var('um_tab') : 'general';
$url = $ultimatemember->account->tab_link( $tab );
+1 -3
View File
@@ -196,9 +196,7 @@
}
if ( isset( $array['html'] ) && $array['html'] == 0 ) {
if ( $args[$key] != htmlspecialchars($args[$key]) ) {
$ultimatemember->form->add_error($key, __('You can not use HTML tags here','ultimatemember') );
}
$args[$key] = strip_tags( $args[$key] );
}
if ( isset( $array['force_good_pass'] ) && $array['force_good_pass'] == 1 ) {
+6 -1
View File
@@ -106,6 +106,9 @@
}
if ( isset( $args['form_id'] ) && $args['form_id'] == $ultimatemember->shortcodes->core_login_form() && $ultimatemember->form->errors )
exit( wp_redirect( um_get_core_page('login') ) );
}
/***
@@ -159,7 +162,9 @@
function um_submit_form_login($args){
global $ultimatemember;
if ( !isset($ultimatemember->form->errors) ) do_action( 'um_user_login', $args );
if ( !isset($ultimatemember->form->errors) ) {
do_action( 'um_user_login', $args );
}
do_action('um_user_login_extra_hook', $args );
+1 -1
View File
@@ -112,7 +112,7 @@
}
do_action('um_after_user_upload', um_user('ID') );
do_action('um_after_user_updated', um_user('ID') );
do_action('um_user_after_updating_profile', $to_update );
if ( !isset( $args['is_signup'] ) ) {
+5 -3
View File
@@ -45,8 +45,8 @@
$value = preg_replace('$(https?://[a-z0-9_./?=&#-]+)(?![^<>]*>)$i', ' <a href="$1" target="_blank">$1</a> ', $value." ");
$value = preg_replace('$(www\.[a-z0-9_./?=&#-]+)(?![^<>]*>)$i', '<a target="_blank" href="http://$1">$1</a> ', $value." ");
$value = wpautop($value);
return $value;
}
@@ -128,7 +128,7 @@
***/
add_filter('um_profile_field_filter_hook__', 'um_profile_field_filter_hook__', 99, 2);
function um_profile_field_filter_hook__( $value, $data ) {
global $ultimatemember;
if ( !$value ) return '';
if ( ( isset( $data['validate'] ) && $data['validate'] != '' && strstr( $data['validate'], 'url' ) ) || ( isset( $data['type'] ) && $data['type'] == 'url' ) ) {
@@ -165,7 +165,9 @@
$value = str_replace('https://https://','https://',$value);
$value = str_replace('http://https://','https://',$value);
$value = $ultimatemember->shortcodes->emotize( $value );
return $value;
}
+3 -3
View File
@@ -55,7 +55,7 @@ class UM_Form {
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
if ( $http_post && !is_admin() && isset( $_POST['form_id'] ) && is_numeric($_POST['form_id']) ) {
$this->form_id = $_POST['form_id'];
$this->form_status = get_post_status( $this->form_id );
@@ -72,9 +72,9 @@ class UM_Form {
$this->post_form = array_merge( $this->form_data, $this->post_form );
if ( $_POST[ $ultimatemember->honeypot ] != '' )
if ( isset( $_POST[ $ultimatemember->honeypot ] ) && $_POST[ $ultimatemember->honeypot ] != '' )
wp_die('Hello, spam bot!');
if ( !in_array( $this->form_data['mode'], array('login') ) ) {
$form_timestamp = trim($_POST['timestamp']);
+2 -2
View File
@@ -1084,9 +1084,9 @@ function um_user( $data, $attrs = null ) {
} else {
$avatar_uri = um_get_default_avatar_uri();
}
$avatar_uri = apply_filters('um_user_avatar_url_filter', $avatar_uri, um_user('ID') );
if ( $avatar_uri )
return '<img src="' . $avatar_uri . '" class="gravatar avatar avatar-'.$attrs.' um-avatar" width="'.$attrs.'" height="'.$attrs.'" alt="" />';
+78
View File
@@ -11,9 +11,79 @@ class UM_Shortcodes {
add_shortcode('ultimatemember', array(&$this, 'ultimatemember'), 1);
add_filter( 'body_class', array(&$this, 'body_class'), 0 );
$this->emoji[':)'] = 'https://s.w.org/images/core/emoji/72x72/1f604.png';
$this->emoji[':smiley:'] = 'https://s.w.org/images/core/emoji/72x72/1f603.png';
$this->emoji[':D'] = 'https://s.w.org/images/core/emoji/72x72/1f600.png';
$this->emoji[':$'] = 'https://s.w.org/images/core/emoji/72x72/1f60a.png';
$this->emoji[':relaxed:'] = 'https://s.w.org/images/core/emoji/72x72/263a.png';
$this->emoji[';)'] = 'https://s.w.org/images/core/emoji/72x72/1f609.png';
$this->emoji[':heart_eyes:'] = 'https://s.w.org/images/core/emoji/72x72/1f60d.png';
$this->emoji[':kissing_heart:'] = 'https://s.w.org/images/core/emoji/72x72/1f618.png';
$this->emoji[':kissing_closed_eyes:'] = 'https://s.w.org/images/core/emoji/72x72/1f61a.png';
$this->emoji[':kissing:'] = 'https://s.w.org/images/core/emoji/72x72/1f617.png';
$this->emoji[':kissing_smiling_eyes:'] = 'https://s.w.org/images/core/emoji/72x72/1f619.png';
$this->emoji[';P'] = 'https://s.w.org/images/core/emoji/72x72/1f61c.png';
$this->emoji[':P'] = 'https://s.w.org/images/core/emoji/72x72/1f61b.png';
$this->emoji[':stuck_out_tongue_closed_eyes:'] = 'https://s.w.org/images/core/emoji/72x72/1f61d.png';
$this->emoji[':flushed:'] = 'https://s.w.org/images/core/emoji/72x72/1f633.png';
$this->emoji[':grin:'] = 'https://s.w.org/images/core/emoji/72x72/1f601.png';
$this->emoji[':pensive:'] = 'https://s.w.org/images/core/emoji/72x72/1f614.png';
$this->emoji[':relieved:'] = 'https://s.w.org/images/core/emoji/72x72/1f60c.png';
$this->emoji[':unamused'] = 'https://s.w.org/images/core/emoji/72x72/1f612.png';
$this->emoji[':('] = 'https://s.w.org/images/core/emoji/72x72/1f61e.png';
$this->emoji[':persevere:'] = 'https://s.w.org/images/core/emoji/72x72/1f623.png';
$this->emoji[":'("] = 'https://s.w.org/images/core/emoji/72x72/1f622.png';
$this->emoji[':joy:'] = 'https://s.w.org/images/core/emoji/72x72/1f602.png';
$this->emoji[':sob:'] = 'https://s.w.org/images/core/emoji/72x72/1f62d.png';
$this->emoji[':sleepy:'] = 'https://s.w.org/images/core/emoji/72x72/1f62a.png';
$this->emoji[':disappointed_relieved:'] = 'https://s.w.org/images/core/emoji/72x72/1f625.png';
$this->emoji[':cold_sweat:'] = 'https://s.w.org/images/core/emoji/72x72/1f630.png';
$this->emoji[':sweat_smile:'] = 'https://s.w.org/images/core/emoji/72x72/1f605.png';
$this->emoji[':sweat:'] = 'https://s.w.org/images/core/emoji/72x72/1f613.png';
$this->emoji[':weary:'] = 'https://s.w.org/images/core/emoji/72x72/1f629.png';
$this->emoji[':tired_face:'] = 'https://s.w.org/images/core/emoji/72x72/1f62b.png';
$this->emoji[':fearful:'] = 'https://s.w.org/images/core/emoji/72x72/1f628.png';
$this->emoji[':scream:'] = 'https://s.w.org/images/core/emoji/72x72/1f631.png';
$this->emoji[':angry:'] = 'https://s.w.org/images/core/emoji/72x72/1f620.png';
$this->emoji[':rage:'] = 'https://s.w.org/images/core/emoji/72x72/1f621.png';
$this->emoji[':triumph'] = 'https://s.w.org/images/core/emoji/72x72/1f624.png';
$this->emoji[':confounded:'] = 'https://s.w.org/images/core/emoji/72x72/1f616.png';
$this->emoji[':laughing:'] = 'https://s.w.org/images/core/emoji/72x72/1f606.png';
$this->emoji[':yum:'] = 'https://s.w.org/images/core/emoji/72x72/1f60b.png';
$this->emoji[':mask:'] = 'https://s.w.org/images/core/emoji/72x72/1f637.png';
$this->emoji[':cool:'] = 'https://s.w.org/images/core/emoji/72x72/1f60e.png';
$this->emoji[':sleeping:'] = 'https://s.w.org/images/core/emoji/72x72/1f634.png';
$this->emoji[':dizzy_face:'] = 'https://s.w.org/images/core/emoji/72x72/1f635.png';
$this->emoji[':astonished:'] = 'https://s.w.org/images/core/emoji/72x72/1f632.png';
$this->emoji[':worried:'] = 'https://s.w.org/images/core/emoji/72x72/1f61f.png';
$this->emoji[':frowning:'] = 'https://s.w.org/images/core/emoji/72x72/1f626.png';
$this->emoji[':anguished:'] = 'https://s.w.org/images/core/emoji/72x72/1f627.png';
$this->emoji[':smiling_imp:'] = 'https://s.w.org/images/core/emoji/72x72/1f608.png';
$this->emoji[':imp:'] = 'https://s.w.org/images/core/emoji/72x72/1f47f.png';
$this->emoji[':open_mouth:'] = 'https://s.w.org/images/core/emoji/72x72/1f62e.png';
$this->emoji[':grimacing:'] = 'https://s.w.org/images/core/emoji/72x72/1f62c.png';
$this->emoji[':neutral_face:'] = 'https://s.w.org/images/core/emoji/72x72/1f610.png';
$this->emoji[':confused:'] = 'https://s.w.org/images/core/emoji/72x72/1f615.png';
$this->emoji[':hushed:'] = 'https://s.w.org/images/core/emoji/72x72/1f62f.png';
$this->emoji[':no_mouth:'] = 'https://s.w.org/images/core/emoji/72x72/1f636.png';
$this->emoji[':innocent:'] = 'https://s.w.org/images/core/emoji/72x72/1f607.png';
$this->emoji[':smirk:'] = 'https://s.w.org/images/core/emoji/72x72/1f60f.png';
$this->emoji[':expressionless:'] = 'https://s.w.org/images/core/emoji/72x72/1f611.png';
}
/***
*** @emoji support
***/
function emotize( $content ) {
$content = stripslashes( $content );
foreach( $this->emoji as $code => $val ) {
$content = str_replace( $code, '<img src="'.$val.'" alt="'.$code.'" title="'.$code.'" class="emoji" />', $content );
}
return $content;
}
/***
*** @extend body classes
***/
@@ -38,6 +108,14 @@ class UM_Shortcodes {
return $classes;
}
/***
*** @Retrieve core login form
***/
function core_login_form() {
$forms = get_posts( array( 'post_type' => 'um_form', 'posts_per_page' => 1, 'meta_key' => '_um_core', 'meta_value' => 'login' ) );
return $forms[0]->ID;
}
/***
*** @load a compatible template
***/
+1 -1
View File
@@ -142,7 +142,7 @@ class UM_Tracking {
$optin_url = esc_url( add_query_arg( 'um_adm_action', 'opt_into_tracking' ) );
$optout_url = esc_url( add_query_arg( 'um_adm_action', 'opt_out_of_tracking' ) );
echo '<div class="updated" style="border-color: #3ba1da;"><p>';
echo '<div class="updated um-admin-notice"><p>';
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 on any of our extensions. No sensitive data is tracked.', 'ultimatemember' );
+38 -1
View File
@@ -35,7 +35,13 @@ class UM_User {
add_action('um_delete_user_hook', array(&$this, 'remove_cached_queue') );
add_action('um_new_user_registration_plain', array(&$this, 'remove_cached_queue') );
add_action('um_after_user_status_is_changed_hook', array(&$this, 'remove_cached_queue') );
// When user cache should be cleared
add_action('um_after_user_updated', array(&$this, 'remove_cache') );
add_action('um_after_user_account_updated', array(&$this, 'remove_cache') );
add_action('personal_options_update', array(&$this, 'remove_cache') );
add_action('edit_user_profile_update', array(&$this, 'remove_cache') );
}
/***
@@ -63,6 +69,20 @@ class UM_User {
return $new;
}
function get_cached_data( $user_id ) {
$find_user = get_option("um_cache_userdata_{$user_id}");
if ( $find_user )
return $find_user;
}
function setup_cache( $user_id, $profile ) {
update_option( "um_cache_userdata_{$user_id}", $profile );
}
function remove_cache( $user_id ) {
delete_option( "um_cache_userdata_{$user_id}" );
}
/**
* @function set()
*
@@ -94,6 +114,18 @@ class UM_User {
unset( $this->profile );
}
if ($user_id) {
$this->id = $user_id;
} elseif (is_user_logged_in() && $clean == false ){
$this->id = get_current_user_id();
} else {
$this->id = 0;
}
if ( $this->get_cached_data( $this->id ) ) {
$this->profile = $this->get_cached_data( $this->id );
} else {
if ($user_id) {
$this->id = $user_id;
@@ -173,9 +205,14 @@ class UM_User {
// clean profile
$this->clean();
// Setup cache
$this->setup_cache( $this->id, $this->profile );
}
}
}
/***
+2 -2
View File
@@ -3,7 +3,7 @@
Plugin Name: Ultimate Member
Plugin URI: http://ultimatemember.com/
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
Version: 1.2.92
Version: 1.2.93
Author: Ultimate Member
Author URI: http://ultimatemember.com/
*/
@@ -29,7 +29,7 @@ Author URI: http://ultimatemember.com/
*** @Display a welcome page
***/
function ultimatemember_activation_hook( $plugin ) {
if( $plugin == um_plugin && get_option('um_version') != ultimatemember_version ) {
update_option('um_version', ultimatemember_version );
+9 -1
View File
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
Requires at least: 4.1
Tested up to: 4.2.1
Stable Tag: 1.2.92
Stable Tag: 1.2.93
License: GNU Version 2 or Any Later Version
@@ -141,6 +141,14 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
== Changelog ==
= 1.2.93: May 5, 2015 =
* New: user profiles are cached to speed up load time
* New: emoji support added to bio / user descriptions
* Fixed: issues with bio field HTML
* Fixed: WP-admin PHP warning
* Fixed: bug with localization of en_US.po file
= 1.2.92: May 2, 2015 =
* New: Important: Introduces the Ultimate Member RESTful API
+1 -31
View File
@@ -249,36 +249,6 @@ $this->sections[] = array(
'required' => array( 'accessible', '=', 2 ),
),
array(
'id' => 'exclude_from_main_loop',
'type' => 'switch',
'title' => __( 'Exclude restricted pages from main loop','ultimatemember' ),
'default' => 1,
'desc' => __('Whether to exclude restricted pages from main loop','ultimatemember'),
'on' => __('Yes','ultimatemember'),
'off' => __('No','ultimatemember'),
),
array(
'id' => 'exclude_from_search_loop',
'type' => 'switch',
'title' => __( 'Exclude restricted pages from search loop','ultimatemember' ),
'default' => 1,
'desc' => __('Whether to exclude restricted pages from search results','ultimatemember'),
'on' => __('Yes','ultimatemember'),
'off' => __('No','ultimatemember'),
),
array(
'id' => 'exclude_from_archive_loop',
'type' => 'switch',
'title' => __( 'Exclude restricted pages from archive loop','ultimatemember' ),
'default' => 1,
'desc' => __('Whether to exclude restricted pages from archives','ultimatemember'),
'on' => __('Yes','ultimatemember'),
'off' => __('No','ultimatemember'),
),
array(
'id' => 'wpadmin_login',
'type' => 'switch',
@@ -1784,7 +1754,7 @@ $this->sections[] = array(
'title' => __('Import & Export Settings','ultimatemember'),
'full_width' => true,
),
array(
'id' => 'advanced_denied_roles',
'type' => 'text',
+1 -1
View File
@@ -169,7 +169,7 @@ class UM_API {
$this->options = get_option('um_options');
$domain = 'ultimatemember';
$locale = get_option('WPLANG');
$locale = ( get_option('WPLANG') ) ? get_option('WPLANG') : 'en_US';
load_textdomain($domain, WP_LANG_DIR . '/plugins/' .$domain.'-'.$locale.'.mo');
}