fixed company on the registration form
This commit is contained in:
@@ -59,4 +59,21 @@ class Partnerexpo_Core_User_Fields extends Partnerexpo_Core {
|
||||
update_user_meta( $user_id, 'company', sanitize_text_field( $_POST[ 'company' ] ?? '' ) );
|
||||
}
|
||||
}
|
||||
|
||||
function registration_form() {
|
||||
?>
|
||||
<p>
|
||||
<label for="company"><?php _e( 'Cég neve', 'partnerexpo-core' ) ?><br />
|
||||
<input type="text" name="company" id="company" class="input" value="" size="25" /></label>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
function registration_errors( $errors, $sanitized_user_login, $user_email ) {
|
||||
if ( empty( $_POST['company'] ) || ! empty( $_POST['company'] ) && trim( $_POST['company'] ) == '' ) {
|
||||
$errors->add( 'company_error', sprintf('<strong>%s</strong>: %s',__( 'Error', 'partnerexpo-core' ),__( 'Cég megadása kötelező!', 'partnerexpo-core' ) ) );
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user