Changing the “Logged in as _____. Log out?” URL
-
Hello!
I’d like to change the “Logged in as x. Log out?” URL. I only want to change the “Logged in as x.” to take me to /account/ page instead of /wp-admin/profile.php.
I found the string in core WordPress files, but I want to add code to functions.php instead of changing the core file, which will be lost when an update comes.
This is the code I found in core files. What would I have to change in this code to add it to functions.php?
/* translators: %s: Login URL. */ __( 'You must be <a href="%s">logged in</a> to post a comment.' ), /** This filter is documented in wp-includes/link-template.php */ wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) ) ) ), 'logged_in_as' => sprintf( '<p class="logged-in-as">%s%s</p>', sprintf( /* translators: 1: Edit user link, 2: Accessibility text, 3: User name, 4: Logout URL. */ __( '<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>' ), get_edit_user_link(), /* translators: %s: User name. */ esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ), $user_identity, /** This filter is documented in wp-includes/link-template.php */ wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) ) ), $required_text ),
Is there an easier way to do it?
Kind regards
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Changing the “Logged in as _____. Log out?” URL’ is closed to new replies.