mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-14 04:06:36 +09:00
- fixed account form;
This commit is contained in:
@@ -1458,11 +1458,12 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification -- already verified here
|
||||
$sorting = sanitize_text_field( $_POST['sorting'] );
|
||||
$sorting_fields = maybe_serialize( $directory_data['sorting_fields'] );
|
||||
|
||||
foreach ( $sorting_fields as $field ) {
|
||||
if ( isset( $field[ $sorting ] ) ) {
|
||||
$custom_sort_type = ! empty( $field['type'] ) ? $meta_query->get_cast_for_type( $field['type'] ) : 'CHAR';
|
||||
$custom_sort_order = $field['order'];
|
||||
if ( ! empty( $sorting_fields ) && is_array( $sorting_fields ) ) {
|
||||
foreach ( $sorting_fields as $field ) {
|
||||
if ( isset( $field[ $sorting ] ) ) {
|
||||
$custom_sort_type = ! empty( $field['type'] ) ? $meta_query->get_cast_for_type( $field['type'] ) : 'CHAR';
|
||||
$custom_sort_order = $field['order'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2151,7 +2151,7 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
||||
*/
|
||||
$changes = apply_filters( 'um_before_update_profile', $changes, $args['ID'] );
|
||||
foreach ( $changes as $key => $value ) {
|
||||
if ( $this->is_metakey_banned( $key, 'submission' ) ) {
|
||||
if ( $this->is_metakey_banned( $key, ( 'account' !== $context ) ? 'submission' : '' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user