mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- 2.0.22 release prepare
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.21 | WordPress 4.9 or higher| 2.0.21 |
|
||||
| 2.0.22 | WordPress 4.9 or higher| 2.0.22 |
|
||||
|
||||
|
||||
Features of the plugin include:
|
||||
@@ -48,7 +48,7 @@ GNU Version 2 or Any Later Version
|
||||
|
||||
Releases
|
||||
====================
|
||||
[Official Release Version: 2.0.21](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.21).
|
||||
[Official Release Version: 2.0.22](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.22).
|
||||
|
||||
[Official Release Version: 1.3.88](https://github.com/ultimatemember/ultimatemember/releases).
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#um-metaboxes-general h2 sup {
|
||||
#um-metaboxes-general h1 sup {
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
font-weight: 400;
|
||||
|
||||
@@ -362,7 +362,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
||||
|
||||
<div id="um-metaboxes-general" class="wrap">
|
||||
|
||||
<h2>Ultimate Member <sup><?php echo ultimatemember_version; ?></sup></h2>
|
||||
<h1>Ultimate Member <sup><?php echo ultimatemember_version; ?></sup></h1>
|
||||
|
||||
<?php wp_nonce_field( 'um-metaboxes-general' ); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
<?php
|
||||
function um_upgrade_get_users2022() {
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
$result = count_users();
|
||||
|
||||
wp_send_json_success( array( 'count' => $result['total_users'], 'message' => __( 'Users are ready for upgrade', 'ultimate-member' ) ) );
|
||||
}
|
||||
|
||||
|
||||
function um_upgrade_usermeta2022() {
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
if ( ! empty( $_POST['page'] ) && ! empty( $_POST['pages'] ) ) {
|
||||
$users_per_page = 50;
|
||||
|
||||
$from = ( $_POST['page'] * $users_per_page ) - $users_per_page + 1;
|
||||
$to = $_POST['page'] * $users_per_page;
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$all_metafields = UM()->builtin()->all_user_fields;
|
||||
|
||||
/**
|
||||
* UM hook
|
||||
*
|
||||
* @type filter
|
||||
* @title um_admin_custom_search_filters
|
||||
* @description Custom Search Filters
|
||||
* @input_vars
|
||||
* [{"var":"$custom_search","type":"array","desc":"Filters"}]
|
||||
* @change_log
|
||||
* ["Since: 2.0"]
|
||||
* @usage
|
||||
* <?php add_filter( 'um_admin_custom_search_filters', 'function_name', 10, 1 ); ?>
|
||||
* @example
|
||||
* <?php
|
||||
* add_filter( 'um_admin_custom_search_filters', 'my_admin_custom_search_filters', 10, 1 );
|
||||
* function my_upload_file_name( $custom_search ) {
|
||||
* // your code here
|
||||
* return $custom_search;
|
||||
* }
|
||||
* ?>
|
||||
*/
|
||||
$custom_search = apply_filters( 'um_admin_custom_search_filters', array() );
|
||||
$searchable_fields = UM()->builtin()->all_user_fields( 'date,time,url' );
|
||||
$searchable_fields = $searchable_fields + $custom_search;
|
||||
|
||||
unset( $searchable_fields['user_registered'] );
|
||||
unset( $searchable_fields['role_select'] );
|
||||
unset( $searchable_fields['role_radio'] );
|
||||
unset( $searchable_fields[0] );
|
||||
|
||||
$searchable_fields = array_keys( $searchable_fields );
|
||||
|
||||
foreach ( $all_metafields as $key => $field_data ) {
|
||||
if ( ! in_array( $key, $searchable_fields ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$users = get_users( array(
|
||||
'offset' => $from,
|
||||
'number' => $users_per_page,
|
||||
'fields' => 'ids',
|
||||
) );
|
||||
|
||||
$values = $wpdb->get_results( $wpdb->prepare(
|
||||
"SELECT user_id, meta_value as val
|
||||
FROM {$wpdb->usermeta}
|
||||
WHERE meta_key = %s AND
|
||||
meta_value IS NOT NULL AND
|
||||
user_id IN('" . implode( "','", $users ) . "')",
|
||||
$key
|
||||
), ARRAY_A );
|
||||
|
||||
if ( empty( $values ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ( $values as $meta ) {
|
||||
if ( in_array( $field_data['type'], array( 'radio', 'multiselect', 'select', 'checkbox' ) ) ) {
|
||||
if ( ! is_serialized( $meta['val'] ) ) {
|
||||
$backup = get_user_meta( $meta['user_id'], $field_data['metakey'], true );
|
||||
update_user_meta( $meta['user_id'], $field_data['metakey'] . '_backup', $backup );
|
||||
|
||||
$array = array( $meta['val'] );
|
||||
$metavalue = serialize( $array );
|
||||
update_user_meta( $meta['user_id'], $field_data['metakey'], $metavalue );
|
||||
}
|
||||
} else {
|
||||
if ( is_serialized( $meta['val'] ) ) {
|
||||
$backup = get_user_meta( $meta['user_id'], $field_data['metakey'], true );
|
||||
update_user_meta( $meta['user_id'], $field_data['metakey'] . '_backup', $backup );
|
||||
|
||||
$maybe_array = maybe_unserialize( $meta['val'] );
|
||||
$metavalue = $maybe_array[0];
|
||||
update_user_meta( $meta['user_id'], $field_data['metakey'], $metavalue );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $_POST['page'] == $_POST['pages'] ) {
|
||||
update_option( 'um_last_version_upgrade', '2.0.22-alpha1' );
|
||||
}
|
||||
|
||||
wp_send_json_success( array( 'message' => sprintf( __( 'Users from %s to %s was upgraded successfully...', 'ultimate-member' ), $from, $to ) ) );
|
||||
} else {
|
||||
wp_send_json_error();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'get_users2022' => 'get_users2022',
|
||||
'usermeta2022' => 'usermeta2022',
|
||||
);
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery( document ).ready( function() {
|
||||
var users;
|
||||
var users_per_page = 50;
|
||||
|
||||
var current_page = 1;
|
||||
//upgrade styles
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Usermeta...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_get_users2022'
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
|
||||
um_add_upgrade_log( response.data.message );
|
||||
|
||||
users = Math.ceil( response.data.count / users_per_page );
|
||||
|
||||
update_users_per_page();
|
||||
|
||||
} else {
|
||||
um_wrong_ajax();
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
um_something_wrong();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function update_users_per_page() {
|
||||
if ( current_page <= users ) {
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_usermeta2022',
|
||||
page: current_page,
|
||||
pages: users
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
um_add_upgrade_log( response.data.message );
|
||||
current_page++;
|
||||
update_users_per_page();
|
||||
} else {
|
||||
um_wrong_ajax();
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
um_something_wrong();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//switch to the next package
|
||||
um_run_upgrade();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
+13
-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.21
|
||||
Stable tag: 2.0.22
|
||||
License: GNU Version 2 or Any Later Version
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
@@ -131,6 +131,18 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
||||
|
||||
= 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.22: August 6, 2018 =
|
||||
|
||||
* Bugfixes:
|
||||
- Fixed callback functions in member directory search
|
||||
- Fixed Profile Privacy Settings for different languages
|
||||
- Fixed security vulnerabilities (File/Image uploader)
|
||||
- Fixed security vulnerabilities (HTML arguments)
|
||||
- Fixed search in members directory for some cases, when metadata format isn't correct
|
||||
- Fixed some cases in conditional logic
|
||||
- Fixed WP Capabilities list for Gravity Forms
|
||||
- Fixed view profile capabilities
|
||||
|
||||
= 2.0.21: July 9, 2018 =
|
||||
|
||||
* Bugfixes:
|
||||
|
||||
+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.22-alpha1
|
||||
Version: 2.0.22
|
||||
Author: Ultimate Member
|
||||
Author URI: http://ultimatemember.com/
|
||||
Text Domain: ultimate-member
|
||||
|
||||
Reference in New Issue
Block a user