mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 05:33:36 +09:00
- code review;
- updated readme changelog;
This commit is contained in:
@@ -264,44 +264,48 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
unset( $form_fields[ $id ] );
|
||||
update_post_meta( $form_id, '_um_custom_fields', $form_fields );
|
||||
}
|
||||
|
||||
$directories = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'um_directory'" );
|
||||
foreach ( $directories as $directory_id ) {
|
||||
// Frontend filters
|
||||
$directory_search_fields = get_post_meta( $directory_id, '_um_search_fields', true );
|
||||
$key = array_search( $id, $directory_search_fields );
|
||||
unset( $directory_search_fields[ $key ] );
|
||||
$directory_search_fields = array_values( array_diff( $directory_search_fields, array( $id ) ) );
|
||||
update_post_meta( $directory_id, '_um_search_fields', $directory_search_fields );
|
||||
|
||||
// Admin filtering
|
||||
$directory_search_filters = get_post_meta( $directory_id, '_um_search_filters', true );
|
||||
unset( $directory_search_filters[ $id ] );
|
||||
update_post_meta( $directory_id, '_um_search_filters', $directory_search_filters );
|
||||
|
||||
$directory_custom_fields = get_post_meta( $directory_id, '_um_custom_fields', true );
|
||||
$key = array_search( $id, $directory_custom_fields );
|
||||
unset( $directory_custom_fields[ $key ] );
|
||||
update_post_meta( $directory_id, '_um_custom_fields', $directory_custom_fields );
|
||||
|
||||
// display in tagline
|
||||
$directory_reveal_fields = get_post_meta( $directory_id, '_um_reveal_fields', true );
|
||||
$key = array_search( $id, $directory_reveal_fields );
|
||||
unset( $directory_reveal_fields[ $key ] );
|
||||
$directory_reveal_fields = array_values( array_diff( $directory_reveal_fields, array( $id ) ) );
|
||||
update_post_meta( $directory_id, '_um_reveal_fields', $directory_reveal_fields );
|
||||
|
||||
// extra user information section
|
||||
$directory_tagline_fields = get_post_meta( $directory_id, '_um_tagline_fields', true );
|
||||
$key = array_search( $id, $directory_tagline_fields );
|
||||
unset( $directory_tagline_fields[ $key ] );
|
||||
$directory_tagline_fields = array_values( array_diff( $directory_tagline_fields, array( $id ) ) );
|
||||
update_post_meta( $directory_id, '_um_tagline_fields', $directory_tagline_fields );
|
||||
|
||||
// Custom fields selected in "Choose field(s) to enable in sorting"
|
||||
$directory_sorting_fields = get_post_meta( $directory_id, '_um_sorting_fields', true );
|
||||
foreach ( $directory_sorting_fields as $key => $sorting_fields ) {
|
||||
if ( array_key_exists( $id, $sorting_fields ) ) {
|
||||
foreach ( $directory_sorting_fields as $key => $sorting_data ) {
|
||||
if ( is_array( $sorting_data ) && array_key_exists( $id, $sorting_data ) ) {
|
||||
unset( $directory_sorting_fields[ $key ] );
|
||||
}
|
||||
}
|
||||
$directory_sorting_fields = array_values( $directory_sorting_fields );
|
||||
update_post_meta( $directory_id, '_um_sorting_fields', $directory_sorting_fields );
|
||||
|
||||
// If "Default sort users by" = "Other (Custom Field)" is selected when delete this custom field and set default sorting
|
||||
$directory_sortby_custom = get_post_meta( $directory_id, '_um_sortby_custom', true );
|
||||
if ( $directory_sortby_custom == $id ) {
|
||||
delete_post_meta( $directory_id, '_um_sortby_custom', $id );
|
||||
delete_post_meta( $directory_id, '_um_sortby_custom_label' );
|
||||
if ( $directory_sortby_custom === $id ) {
|
||||
$directory_sortby = get_post_meta( $directory_id, '_um_sortby', true );
|
||||
if ( 'other' === $directory_sortby ) {
|
||||
update_post_meta( $directory_id, '_um_sortby', 'user_registered_desc' );
|
||||
}
|
||||
update_post_meta( $directory_id, '_um_sortby_custom', '' );
|
||||
update_post_meta( $directory_id, '_um_sortby_custom_label', '' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -159,11 +159,19 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
||||
|
||||
* Bugfixes:
|
||||
|
||||
- Added: WhatsApp, Telegram, Discord, Viber messengers predefined fields.
|
||||
- Added: Callback for deleting the custom field data from member direcroty settings when this custom field has been deleted in Form Builder.
|
||||
- Added: 'um_account_active_tab_inited' JS hook.
|
||||
- Fixed: "Clear All" button for the filters with "&" symbol in the label.
|
||||
- Fixed: Uninstall process when delete UM data. Avoid the issue when 3rd-party pages that had been selected as UM page are removed on UM uninstall.
|
||||
- Fixed: Header meta for the Twitter Card. If the user has twitter field filled then <meta name="twitter:site"> will be filled by this value.
|
||||
- Fixed: Member directory a slider filter's label displaying. It uses the filed label for now.
|
||||
- Fixed: SkypeID field validation. Also all SkypeID fields on your forms changed type from `url` to `text`. SkypeID supports nicknames or https://join.skype.com/{hash} links.
|
||||
- Fixed: Some typos in the fields' labels.
|
||||
- Fixed: "false" display name in the member directory. It displays empty for now if the user hasn't display name.
|
||||
- Fixed: `UM()->clean_array()` function.
|
||||
- Fixed: LinkedIn field URL. Added ability to display the organization URL.
|
||||
- Fixed: Canonical link of the user profile if WPML plugin is active.
|
||||
|
||||
= 2.2.5: September 22, 2021 =
|
||||
|
||||
|
||||
Reference in New Issue
Block a user