From 8f15c79ddae657da09aacc1aee0df67df495a991 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 27 Apr 2009 20:00:59 +0000 Subject: [PATCH] Add redirect param to wp_loginout(). Props Denis-de-Bernardy. fixes #9241 git-svn-id: https://develop.svn.wordpress.org/trunk@11101 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/general-template.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index ced59d14ee..c09e31e348 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -136,12 +136,14 @@ function get_search_form() { * * @since 1.5.0 * @uses apply_filters() Calls 'loginout' hook on HTML link content. + * + * @param string $redirect Optional path to redirect to on login/logout. */ -function wp_loginout() { +function wp_loginout($redirect = '') { if ( ! is_user_logged_in() ) - $link = '' . __('Log in') . ''; + $link = '' . __('Log in') . ''; else - $link = '' . __('Log out') . ''; + $link = '' . __('Log out') . ''; echo apply_filters('loginout', $link); }