[wp-trac] [WordPress Trac] #34356: I should be able to change the Login/Logout text in wp_loginout()

WordPress Trac noreply at wordpress.org
Tue Oct 20 00:44:52 UTC 2015


#34356: I should be able to change the Login/Logout text in wp_loginout()
------------------------------------+------------------------------
 Reporter:  aubreypwd               |       Owner:
     Type:  enhancement             |      Status:  closed
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Login and Registration  |     Version:  trunk
 Severity:  normal                  |  Resolution:  invalid
 Keywords:  has-patch close         |     Focuses:
------------------------------------+------------------------------
Changes (by aubreypwd):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Closing, valid points. @johnbillion, "Sign-in" in this particular case.

 Was able to use:

 {{{#!php

 function my_login_menu_customize( $link ) {

         if ( ! is_user_logged_in() ) {
                 return sprintf( '<a href="%s">%s</a>', wp_login_url(), __(
 'Sign-in' ) );
         } else {
                 return sprintf( '<a href="%s">%s</a>', wp_logout_url(),
 __( 'Sign-out' ) );
         }

         return $link;
 }
 add_filter( 'loginout', 'my_login_menu_customize' );

 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34356#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list