mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-14 04:06:36 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember
This commit is contained in:
@@ -7,7 +7,7 @@ Ultimate Member is the #1 user profile & membership plugin for WordPress. The pl
|
||||
|
||||
| Latest Version |Requires at least|Stable Tag|
|
||||
| :------------: |:------------:|:------------:|
|
||||
| 2.0.9 | WordPress 4.9 or higher| 2.0.9 |
|
||||
| 2.0.10 | WordPress 4.9 or higher| 2.0.10 |
|
||||
|
||||
|
||||
Features of the plugin include:
|
||||
@@ -48,7 +48,7 @@ GNU Version 2 or Any Later Version
|
||||
|
||||
Releases
|
||||
====================
|
||||
[Official Release Version: 2.0.9](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.9).
|
||||
[Official Release Version: 2.0.10](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.10).
|
||||
|
||||
[Official Release Version: 1.3.88](https://github.com/ultimatemember/ultimatemember/releases).
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -540,7 +540,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
ob_start(); ?>
|
||||
|
||||
<p>
|
||||
<?php printf( __( '<strong>%s version %s</strong> needs to be updated for correct working.<br />It is necessary to update the structure of the database and options that are associated with <strong>%s %s</strong>.<br />Please visit <a href="%s">"Upgrade"</a> page and run the upgrade process.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, ultimatemember_version, $url ); ?>
|
||||
<?php printf( __( '<strong>%s version %s</strong> needs to be updated to work correctly.<br />It is necessary to update the structure of the database and options that are associated with <strong>%s %s</strong>.<br />Please visit <a href="%s">"Upgrade"</a> page and run the upgrade process.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, ultimatemember_version, $url ); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
function um_upgrade_styles2010() {
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'styles.php';
|
||||
wp_send_json_success( array( 'message' => __( 'Styles was upgraded successfully', 'ultimate-member' ) ) );
|
||||
}
|
||||
|
||||
|
||||
function um_upgrade_cache2010() {
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
UM()->user()->remove_cache_all_users();
|
||||
|
||||
update_option( 'um_last_version_upgrade', '2.0.10' );
|
||||
|
||||
wp_send_json_success( array( 'message' => __( 'Users cache was cleared successfully', 'ultimate-member' ) ) );
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'styles2010' => 'styles2010',
|
||||
'cache2010' => 'cache2010',
|
||||
);
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<?php ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery( document ).ready( function() {
|
||||
//upgrade styles
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Styles...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_styles2010'
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
um_add_upgrade_log( response.data.message );
|
||||
um_clear_cache2010();
|
||||
} else {
|
||||
um_wrong_ajax();
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
um_something_wrong();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//clear users cache
|
||||
function um_clear_cache2010() {
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Clear Users Cache...', 'ultimate-member' ) ) ?>' );
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_cache2010'
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
um_add_upgrade_log( response.data.message );
|
||||
//switch to the next package
|
||||
um_run_upgrade();
|
||||
} else {
|
||||
um_wrong_ajax();
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
um_something_wrong();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
$css = '';
|
||||
$custom_css = UM()->options()->get( 'custom_css' );
|
||||
$enable_css = UM()->options()->get( 'enable_custom_css' );
|
||||
|
||||
if ( ! empty( $enable_css ) && ! empty( $custom_css ) ) {
|
||||
$css .= $custom_css;
|
||||
}
|
||||
|
||||
$forms_query = new WP_Query;
|
||||
$registration_forms = $forms_query->query( array(
|
||||
'post_type' => 'um_form',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => '_um_mode',
|
||||
'value' => 'register'
|
||||
),
|
||||
),
|
||||
'posts_per_page' => -1,
|
||||
'fields' => 'ids'
|
||||
) );
|
||||
|
||||
$forms_query = new WP_Query;
|
||||
$login_forms = $forms_query->query( array(
|
||||
'post_type' => 'um_form',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => '_um_mode',
|
||||
'value' => 'login'
|
||||
)
|
||||
),
|
||||
'posts_per_page' => -1,
|
||||
'fields' => 'ids'
|
||||
) );
|
||||
|
||||
$forms_query = new WP_Query;
|
||||
$profile_forms = $forms_query->query( array(
|
||||
'post_type' => 'um_form',
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => '_um_mode',
|
||||
'value' => 'profile'
|
||||
)
|
||||
),
|
||||
'posts_per_page' => -1,
|
||||
'fields' => 'ids'
|
||||
) );
|
||||
|
||||
|
||||
foreach ( $registration_forms as $form_id ) {
|
||||
$register_custom_css = get_post_meta( $form_id, '_um_register_custom_css', true );
|
||||
if ( ! empty( $register_custom_css ) ) {
|
||||
$css .= '
|
||||
/* registration form ID=' . $form_id . ' */
|
||||
' . $register_custom_css;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ( $login_forms as $form_id ) {
|
||||
$login_custom_css = get_post_meta( $form_id, '_um_login_custom_css', true );
|
||||
if ( ! empty( $login_custom_css ) ) {
|
||||
$css .= '
|
||||
/* login form ID=' . $form_id . ' */
|
||||
' . $login_custom_css;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ( $profile_forms as $form_id ) {
|
||||
$profile_custom_css = get_post_meta( $form_id, '_um_profile_custom_css', true );
|
||||
if ( ! empty( $profile_custom_css ) ) {
|
||||
$css .= '
|
||||
/* profile form ID=' . $form_id . ' */
|
||||
' . $profile_custom_css;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( ! empty( $css ) ) {
|
||||
$uploads = wp_upload_dir();
|
||||
$upload_dir = $uploads['basedir'] . DIRECTORY_SEPARATOR . 'ultimatemember' . DIRECTORY_SEPARATOR;
|
||||
if ( file_exists( $upload_dir. 'um_old_settings.css' ) ) {
|
||||
$css_doc_file = fopen( $upload_dir. 'um_old_settings.css', 'a' );
|
||||
fwrite( $css_doc_file, "\r\n" . $css );
|
||||
fclose( $css_doc_file );
|
||||
}
|
||||
}
|
||||
@@ -524,8 +524,9 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
*/
|
||||
function get_post_privacy_settings( $post ) {
|
||||
//if logged in administrator all pages are visible
|
||||
if ( current_user_can( 'administrator' ) )
|
||||
if ( current_user_can( 'administrator' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//exlude from privacy UM default pages (except Members list and User(Profile) page)
|
||||
if ( ! empty( $post->post_type ) && $post->post_type == 'page' ) {
|
||||
@@ -541,7 +542,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
$restriction = get_post_meta( $post->ID, 'um_content_restriction', true );
|
||||
|
||||
if ( ! empty( $restriction['_um_custom_access_settings'] ) ) {
|
||||
if ( ! isset( $restriction['_um_accessible'] ) || '0' == $restriction['_um_accessible'] )
|
||||
if ( ! isset( $restriction['_um_accessible'] ) )
|
||||
return false;
|
||||
else
|
||||
return $restriction;
|
||||
@@ -624,6 +625,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
|
||||
//post is private
|
||||
if ( '0' == $restriction['_um_accessible'] ) {
|
||||
$this->singular_page = true;
|
||||
$filtered_posts[] = $post;
|
||||
continue;
|
||||
} elseif ( '1' == $restriction['_um_accessible'] ) {
|
||||
|
||||
@@ -506,13 +506,20 @@ if ( ! class_exists( 'um\core\Roles_Capabilities' ) ) {
|
||||
* @return mixed|void
|
||||
*/
|
||||
function role_data( $roleID ) {
|
||||
if ( strpos( $roleID, 'um_' ) === 0 )
|
||||
$roleID = substr( $roleID, 3 );
|
||||
if ( strpos( $roleID, 'um_' ) === 0 ) {
|
||||
$role_data = get_option( "um_role_{$roleID}_meta" );
|
||||
|
||||
$role_data = get_option( "um_role_{$roleID}_meta" );
|
||||
if ( ! $role_data ) {
|
||||
$roleID = substr( $roleID, 3 );
|
||||
$role_data = get_option( "um_role_{$roleID}_meta" );
|
||||
}
|
||||
} else {
|
||||
$role_data = get_option( "um_role_{$roleID}_meta" );
|
||||
}
|
||||
|
||||
if ( ! $role_data )
|
||||
if ( ! $role_data ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$temp = array();
|
||||
foreach ( $role_data as $key=>$value ) {
|
||||
|
||||
@@ -510,8 +510,11 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
||||
|
||||
extract($args, EXTR_SKIP);
|
||||
|
||||
if ( 'register' == $mode && is_user_logged_in() ) {
|
||||
return __( 'You are already registered', 'ultimate-member' );
|
||||
//not display on admin preview
|
||||
if ( empty( $_POST['act_id'] ) || $_POST['act_id'] != 'um_admin_preview_form' ) {
|
||||
if ( 'register' == $mode && is_user_logged_in() ) {
|
||||
return __( 'You are already registered', 'ultimate-member' );
|
||||
}
|
||||
}
|
||||
|
||||
// for profiles only
|
||||
|
||||
@@ -376,7 +376,7 @@ add_action( 'um_account_page_hidden_fields', 'um_account_page_hidden_fields' );
|
||||
* Before delete account tab content
|
||||
*/
|
||||
function um_before_account_delete() {
|
||||
echo wpautop( UM()->options()->get( 'delete_account_text' ) );
|
||||
echo wpautop( htmlspecialchars( UM()->options()->get( 'delete_account_text' ) ) );
|
||||
}
|
||||
add_action( 'um_before_account_delete', 'um_before_account_delete' );
|
||||
|
||||
|
||||
@@ -601,7 +601,7 @@ function um_profile_header_cover_area( $args ) {
|
||||
|
||||
echo $overlay; ?>
|
||||
|
||||
<div class="um-cover-e">
|
||||
<div class="um-cover-e" data-ratio="<?php echo $args['cover_ratio']; ?>">
|
||||
|
||||
<?php if (um_profile( 'cover_photo' )) { ?>
|
||||
|
||||
|
||||
+17
-1
@@ -6,7 +6,7 @@ Donate link:
|
||||
Tags: community, member, membership, user-profile, user-registration
|
||||
Requires at least: 4.1
|
||||
Tested up to: 4.9
|
||||
Stable tag: 2.0.9
|
||||
Stable tag: 2.0.10
|
||||
License: GNU Version 2 or Any Later Version
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
@@ -129,6 +129,22 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
||||
|
||||
= 2.0.11: April 19, 2018 =
|
||||
|
||||
* Bugfixes:
|
||||
- Fixed profile form JS
|
||||
|
||||
= 2.0.10: April 17, 2018 =
|
||||
|
||||
* Bugfixes:
|
||||
- Fixed Profile Form field privacy
|
||||
- Fixed conditional menu logic for 2 different nav menu hooks
|
||||
- Fixed registration form preview on wp-admin screen
|
||||
- Restored old CSS settings to "um_old_settings.css"
|
||||
- Clean user's cache
|
||||
|
||||
= 2.0.9: April 15, 2018 =
|
||||
|
||||
* Bugfixes:
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
continue;
|
||||
?>
|
||||
|
||||
<div class="um-member-tagline um-member-tagline-<?php echo $key;?>"><?php echo $value; ?></div>
|
||||
<div class="um-member-tagline um-member-tagline-<?php echo $key;?>"><?php _e( $value, 'ultimate-member'); ?></div>
|
||||
|
||||
<?php
|
||||
} // end if
|
||||
@@ -124,7 +124,7 @@
|
||||
if ( ! $value )
|
||||
continue; ?>
|
||||
|
||||
<div class="um-member-metaline um-member-metaline-<?php echo $key; ?>"><span><strong><?php echo UM()->fields()->get_label( $key ); ?>:</strong> <?php echo $value; ?></span></div>
|
||||
<div class="um-member-metaline um-member-metaline-<?php echo $key; ?>"><span><strong><?php echo UM()->fields()->get_label( $key ); ?>:</strong> <?php _e( $value, 'ultimate-member'); ?></span></div>
|
||||
|
||||
<?php }
|
||||
}
|
||||
|
||||
+1
-1
@@ -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: 2.0.9
|
||||
Version: 2.0.11
|
||||
Author: Ultimate Member
|
||||
Author URI: http://ultimatemember.com/
|
||||
Text Domain: ultimate-member
|
||||
|
||||
Reference in New Issue
Block a user