Make WordPress Core

Opened 9 years ago

Last modified 7 years ago

#31682 new enhancement

reg_passmail message on login.php needs filter

Reported by: thomask's profile thomask Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.1.1
Component: Login and Registration Keywords: has-patch needs-refresh
Focuses: Cc:


reg passwords is hardcoded to the login.php:

<p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p>

So it appears even if you do some other ways of delivering passwords. E.g. i want to first check the registrating person and then send them the password, not immediately, so i need to change this message that would reflect this, and the only option now is to filter global gettext, what is not optimal.

Proposed solution - replace this row with

<p id="reg_passmail"><?php echo apply_filters('reg_passmail',__('A password will be e-mailed to you.')) ?></p>

Attachments (1)

31682.2.diff (970 bytes) - added by iamfriendly 9 years ago.
Added a filter to the message shown for the registration confirmation information

Download all attachments as: .zip

Change History (6)

#1 @iamfriendly
9 years ago

  • Keywords has-patch added

This has now slightly changed, and it's, by default 'Registration confirmation will be emailed to you.'. I've just added a patch which adds a filter, and docs, to allow that message to be changed.

#2 @iamfriendly
9 years ago

Awesome. Patched the wrong directory. I'll submit another patch in a minute, but if someone can delete that first patch, that'd be super.

Version 0, edited 9 years ago by iamfriendly (next)

9 years ago

Added a filter to the message shown for the registration confirmation information

#3 @starapple
7 years ago

  • Type changed from defect (bug) to enhancement

Dear Automatic, could you please commit this?

#4 @iamfriendly
7 years ago

  • Keywords needs-refresh added

#5 @starapple
7 years ago

A stop-gap using javascript, good while the <p> tag id remains "reg_passmail":

add_action('login_footer', 'add_reg_passmsg');
function add_reg_passmsg(){ ?>
<script type="text/javascript">document.getElementById("reg_passmail").innerHTML = "Log in info will be sent via email and a link via text.";
<?php }
Note: See TracTickets for help on using tickets.