Redirect to Users Page Instead of Current URL?
-
Hola Amigos,
Is there anyway to modify the code on the footer link, so that when it is clicked, it redirects you to the Users page instead of the Current URL?
public function action_wp_footer() { if ( ! did_action( 'wp_meta' ) && ! is_admin_bar_showing() && $old_user = self::get_old_user() ) { /* Translators: 1: user display name; 2: username; */ $link = sprintf( __( 'Switch back to %1$s (%2$s)', 'user-switching' ), $old_user->display_name, $old_user->user_login ); $url = add_query_arg( array( 'redirect_to' => urlencode( self::current_url() ), ), self::switch_back_url( $old_user ) ); echo '<p id="user_switching_switch_on"><a href="' . esc_url( $url ) . '">' . esc_html( $link ) . '</a></p>'; } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Redirect to Users Page Instead of Current URL?’ is closed to new replies.