updated comments
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user