mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- code review;
- updated readme;
This commit is contained in:
@@ -44,7 +44,7 @@ GNU Version 2 or Any Later Version
|
||||
|
||||
### IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSION 2.6.7 PATCHES SECURITY PRIVILEGE ESCALATION VULNERABILITY. PLEASE SEE [THIS ARTICLE](https://docs.ultimatemember.com/article/1866-security-incident-update-and-recommended-actions) FOR MORE INFORMATION
|
||||
|
||||
[Official Release Version: 2.8.5](https://github.com/ultimatemember/ultimatemember/releases/tag/2.8.5).
|
||||
[Official Release Version: 2.8.6](https://github.com/ultimatemember/ultimatemember/releases/tag/2.8.6).
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
== Changelog ==
|
||||
|
||||
= 2.8.6 April xx, 2024 =
|
||||
|
||||
* Enhancements:
|
||||
|
||||
- Added: Member Directory > Admin Filtering supports datepicker and timepicker filter-types with only "From" or "To" filled value
|
||||
- Added: Ability to customize modal templates upload-single.php and view-photo.php
|
||||
|
||||
* Bugfixes:
|
||||
|
||||
- Fixed: Using HTML in the block restriction message. Replaced escaper to wp_kses sanitize while saving
|
||||
- Fixed: Getting user capabilities without role
|
||||
- Fixed: YouTube validation when field value is empty
|
||||
- Fixed: Social URLs sanitizing where user can put his social username (e.g. Instagram, Facebook)
|
||||
|
||||
= 2.8.5: April 9, 2024 =
|
||||
|
||||
* Enhancements:
|
||||
|
||||
@@ -569,13 +569,13 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ( $default_value === false ) {
|
||||
if ( false === $default_value ) {
|
||||
$default_filters = array();
|
||||
if ( ! empty( $directory_data['search_filters'] ) ) {
|
||||
$default_filters = maybe_unserialize( $directory_data['search_filters'] );
|
||||
}
|
||||
|
||||
if ( ! empty( $default_filters[ $filter ] ) && $this->filter_types[ $filter ] != 'select' ) {
|
||||
if ( ! empty( $default_filters[ $filter ] ) && 'select' !== $this->filter_types[ $filter ] ) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -907,6 +907,7 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
|
||||
switch ( $attrs['format'] ) {
|
||||
case 'g:i a':
|
||||
default:
|
||||
$js_format = 'h:i a';
|
||||
break;
|
||||
case 'g:i A':
|
||||
@@ -917,8 +918,8 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
$default_value_min = $range[0];
|
||||
$default_value_max = $range[1];
|
||||
$default_value_min = '';
|
||||
$default_value_max = '';
|
||||
if ( ! empty( $default_value[0] ) ) {
|
||||
$default_value_min = $default_value[0];
|
||||
}
|
||||
@@ -1134,38 +1135,29 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function timepicker_filters_range( $filter ) {
|
||||
protected function timepicker_filters_range( $filter ) {
|
||||
global $wpdb;
|
||||
$meta = $wpdb->get_col(
|
||||
$wpdb->prepare(
|
||||
"SELECT DISTINCT meta_value
|
||||
FROM {$wpdb->usermeta}
|
||||
WHERE meta_key = %s
|
||||
ORDER BY meta_value DESC",
|
||||
$filter
|
||||
)
|
||||
);
|
||||
|
||||
switch ( $filter ) {
|
||||
|
||||
default: {
|
||||
|
||||
global $wpdb;
|
||||
$meta = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT meta_value
|
||||
FROM {$wpdb->usermeta}
|
||||
WHERE meta_key = %s
|
||||
ORDER BY meta_value DESC", $filter ) );
|
||||
|
||||
$meta = array_filter( $meta );
|
||||
|
||||
if ( empty( $meta ) || count( $meta ) === 1 ) {
|
||||
$range = false;
|
||||
} elseif ( ! empty( $meta ) ) {
|
||||
$range = array( min( $meta ), max( $meta ) );
|
||||
}
|
||||
|
||||
|
||||
$range = apply_filters( "um_member_directory_filter_{$filter}_timepicker", $range );
|
||||
|
||||
break;
|
||||
}
|
||||
$meta = array_filter( $meta );
|
||||
|
||||
if ( empty( $meta ) || count( $meta ) === 1 ) {
|
||||
$range = false;
|
||||
} elseif ( ! empty( $meta ) ) {
|
||||
$range = array( min( $meta ), max( $meta ) );
|
||||
}
|
||||
|
||||
return $range;
|
||||
return apply_filters( "um_member_directory_filter_{$filter}_timepicker", $range );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $borndate
|
||||
*
|
||||
|
||||
@@ -170,8 +170,16 @@ IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSI
|
||||
|
||||
**Enhancements**
|
||||
|
||||
* Added: Member Directory > Admin Filtering supports datepicker and timepicker filter-types with only "From" or "To" filled value
|
||||
* Added: Ability to customize modal templates upload-single.php and view-photo.php
|
||||
|
||||
**Bugfixes**
|
||||
|
||||
* Fixed: Using HTML in the block restriction message. Replaced escaper to wp_kses sanitize while saving
|
||||
* Fixed: Getting user capabilities without role
|
||||
* Fixed: YouTube validation when field value is empty
|
||||
* Fixed: Social URLs sanitizing where user can put his social username (e.g. Instagram, Facebook)
|
||||
|
||||
= 2.8.5 2024-04-09 =
|
||||
|
||||
**Enhancements**
|
||||
|
||||
Reference in New Issue
Block a user