- code formatting;

- small changes for #790;
This commit is contained in:
nikitasinelnikov
2021-04-05 19:06:44 +03:00
parent 8f1c2f0ce5
commit b2bb2c13eb
4 changed files with 14 additions and 14 deletions
+7 -7
View File
@@ -256,14 +256,14 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
do_action( 'um_delete_custom_field', $id, $args );
update_option( 'um_fields', $fields );
}
global $wpdb;
$forms = $wpdb->get_col("SELECT ID FROM {$wpdb->posts} WHERE post_type = 'um_form'");
foreach ( $forms as $form_id ) {
$form_fields = get_post_meta( $form_id, '_um_custom_fields', true );
unset( $form_fields[ $id ] );
update_post_meta( $form_id, '_um_custom_fields', $form_fields );
global $wpdb;
$forms = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'um_form'" );
foreach ( $forms as $form_id ) {
$form_fields = get_post_meta( $form_id, '_um_custom_fields', true );
unset( $form_fields[ $id ] );
update_post_meta( $form_id, '_um_custom_fields', $form_fields );
}
}
}