WordPress.org

Forums

[resolved] Function to change a label in a core WordPress File (2 posts)

  1. valuser
    Member
    Posted 2 years ago #

    I would like to change
    'label_username' => __( 'Username' ) on line 258 of wp-includes/general-template.php
    to
    'label_username' => __( 'Username or Email' )

    Changing core files is not recommended

    Any help to code a function to achieve this would really be appreciated.

  2. valuser
    Member
    Posted 2 years ago #

    This works

    function wpse60605_change_username_label( $defaults ){
        $defaults['label_username'] = __( 'Username or Email' );
        return $defaults;
    }
    add_filter( 'login_form_defaults', 'wpse60605_change_username_label' );

    was contributed by Joshua Abenazer at http://wordpress.stackexchange.com/questions/60605/function-to-change-a-label-username-in-a-core-wordpress-file-wp-includes-gene

Topic Closed

This topic has been closed to new replies.

About this Topic