[wp-trac] [WordPress Trac] #27617: Introduce a `logout_redirect` filter

WordPress Trac noreply at wordpress.org
Wed Apr 2 00:19:27 UTC 2014


#27617: Introduce a `logout_redirect` filter
------------------------------------+------------------------------
 Reporter:  johnbillion             |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Login and Registration  |     Version:  2.6
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch               |     Focuses:
------------------------------------+------------------------------

Comment (by juliobox):

 Why not, but you already can do this, even if it's a little tricky:

 {{{
 add_filter( 'wp_redirect', 'logout_redirect_filter' );
 function logout_redirect_filter( $location ) {
         if ( isset( $_REQUEST['action'], $_REQUEST['redirect_to'] ) &&
 'logout' == $_REQUEST['action'] ) {
                 $location = home_url( '/my-own-url/' );
         }
         return $location;
 }
 }}}

 Thoughts?

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


More information about the wp-trac mailing list