updated comments

This commit is contained in:
2026-03-11 20:23:28 +01:00
parent c7b5d52197
commit 7f253bc452
4 changed files with 215 additions and 14 deletions

View File

@@ -82,6 +82,22 @@ class Partnerexpo_Core_User_Fields extends Partnerexpo_Core {
if ( empty( $_POST['company'] ) || ! empty( $_POST['company'] ) && trim( $_POST['company'] ) == '' ) {
wp_delete_comment( $id, true );
wp_die( sprintf('<strong>%s</strong>: %s',__( 'Error', 'partnerexpo-core' ),__( 'Cég megadása kötelező!', 'partnerexpo-core' ) ) );
return false;
}
add_comment_meta(
$id,
'company',
sanitize_text_field($_POST['company'])
);
if ( ! empty( $_POST['name'] ) && trim( $_POST['name'] ) != '' ) {
add_comment_meta(
$id,
'name',
sanitize_text_field($_POST['name'])
);
}
return true;
}
}