- fixed form duplicate and PHP notice about empty mode;

- fixed first install and login/registration forms custom fields;
This commit is contained in:
Mykyta Synelnikov
2024-04-24 17:50:52 +03:00
parent 005dabad1b
commit 1409de3eb4
3 changed files with 142 additions and 17 deletions
+4 -14
View File
@@ -97,13 +97,8 @@ KEY meta_value_indx (um_value(191))
$form_id = wp_insert_post( $form );
foreach ( UM()->config()->core_form_meta[ $id ] as $key => $value ) {
if ( '_um_custom_fields' === $key ) {
$array = maybe_unserialize( $value );
update_post_meta( $form_id, $key, $array );
} else {
update_post_meta( $form_id, $key, $value );
}
foreach ( UM()->config()->core_form_meta[ $id ] as $meta_key => $meta_value ) {
update_post_meta( $form_id, $meta_key, $meta_value );
}
$core_forms[ $id ] = $form_id;
@@ -132,13 +127,8 @@ KEY meta_value_indx (um_value(191))
$form_id = wp_insert_post( $form );
foreach ( UM()->config()->core_directory_meta[ $id ] as $key => $value ) {
if ( '_um_custom_fields' === $key ) {
$array = maybe_unserialize( $value );
update_post_meta( $form_id, $key, $array );
} else {
update_post_meta( $form_id, $key, $value );
}
foreach ( UM()->config()->core_directory_meta[ $id ] as $meta_key => $meta_value ) {
update_post_meta( $form_id, $meta_key, $meta_value );
}
$core_directories[ $id ] = $form_id;