Fix empty uneditable fields

This commit is contained in:
jonfalcon
2016-01-24 14:46:14 -08:00
parent ebc2fc7e0b
commit 7912bdaa67
+2
View File
@@ -69,6 +69,8 @@
if ( isset( $fields ) && is_array( $fields ) ) {
foreach( $fields as $key => $array ) {
if( !um_user_can( 'can_edit_everyone' ) && !$fields[$key]['editable'] ) continue;
if ( $fields[$key]['type'] == 'multiselect' || $fields[$key]['type'] == 'checkbox' && !isset($args['submitted'][$key]) ) {
delete_user_meta( um_user('ID'), $key );
}