From 036a36a7e8de04624ed98520ac1a95cfc9151b80 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@11101 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 ced59d14e..c09e31e34 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); }