Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#29657 closed enhancement (worksforme)

Apply Filters in Login Form Usename Field Label

Reported by: manishkrag Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Login and Registration Keywords:
Focuses: administration Cc:


I have worked on several WP project and almost in every project my clients requirement was to change the label of login form username field. But as it is hard coded in wp-login.php file it is not possible to do this change without
modifying the same file.

So I think it would be great if you guys can add a filter there.

In such cases we have to do the same changes in WP user profile edit form and registration form as well.

Change History (3)

#1 @SergeyBiryukov
7 years ago

You can change any string via gettext filter:

function change_username_label_29657( $text, $original_text, $domain ) {
	if ( 'Username' === $original_text && 'default' === $domain ) {
		$text = 'Your username';

	return $text;
add_filter( 'gettext', 'change_username_label_29657', 10, 3 );
Last edited 7 years ago by SergeyBiryukov (previous) (diff)

#2 @manishkrag
7 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Just checked 10n.php flie.
It is awesome.

#3 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.