Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#29657 closed enhancement (worksforme)

Apply Filters in Login Form Usename Field Label

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

Description

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
12 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 12 years ago by SergeyBiryukov (previous) (diff)

#2 @manishkrag
12 years ago

  • Resolutionworksforme
  • Status newclosed

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

#3 @SergeyBiryukov
12 years ago

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