user_dashboard_url filter-hookWP 3.1.0

Filters the dashboard URL for a user.

Usage

add_filter( 'user_dashboard_url', 'wp_kama_user_dashboard_url_filter', 10, 4 );

/**
 * Function for `user_dashboard_url` filter-hook.
 * 
 * @param string $url     The complete URL including scheme and path.
 * @param int    $user_id The user ID.
 * @param string $path    Path relative to the URL. Blank string if no path is specified.
 * @param string $scheme  Scheme to give the URL context. Accepts 'http', 'https', 'login', 'login_post', 'admin', 'relative' or null.
 *
 * @return string
 */
function wp_kama_user_dashboard_url_filter( $url, $user_id, $path, $scheme ){

	// filter...
	return $url;
}
$url(string)
The complete URL including scheme and path.
$user_id(int)
The user ID.
$path(string)
Path relative to the URL. Blank string if no path is specified.
$scheme(string)
Scheme to give the URL context. Accepts 'http', 'https', 'login', 'login_post', 'admin', 'relative' or null.

Changelog

Since 3.1.0 Introduced.

Where the hook is called

get_dashboard_url()
user_dashboard_url
wp-includes/link-template.php 3986
return apply_filters( 'user_dashboard_url', $url, $user_id, $path, $scheme );

Where the hook is used in WordPress

Usage not found.