Skip to content

Commit

Permalink
add link to reg form error
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Tesoro committed May 29, 2018
1 parent 97e3092 commit 28b4b86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion includes/wpum-forms/class-wpum-form-registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,10 @@ public function submit( $atts ) {

} else {

$admin_url = admin_url( 'users.php?page=wpum-registration-forms#/' );

WPUM()->templates
->set_template_data( [ 'message' => esc_html__( 'The registration form cannot be used because either a username or email field is required to process registrations. Please edit the form and add at least the email field.', 'wp-user-manager' ) ] )
->set_template_data( [ 'message' => __( 'The registration form cannot be used because either a username or email field is required to process registrations. Please edit the form and add at least the email field.', 'wp-user-manager' ) . ' ' . '<a href="' . esc_url_raw( $admin_url ) . '">' . $admin_url . '</a>' ] )
->get_template_part( 'messages/general', 'error' );

}
Expand Down
2 changes: 1 addition & 1 deletion templates/messages/general-error.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@

?>
<div class="wpum-message error">
<p><?php echo esc_html( $data->message ); ?></p>
<p><?php echo $data->message; ?></p>
</div>

0 comments on commit 28b4b86

Please sign in to comment.