Changeset 27260 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 02/25/2014 05:07:22 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r27235 r27260 2344 2344 * @since 3.1.0 2345 2345 * 2346 * @param int $user_id User ID2346 * @param int $user_id Optional. User ID. Defaults to current user. 2347 2347 * @param string $path Optional path relative to the dashboard. Use only paths known to both blog and user admins. 2348 2348 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes. 2349 2349 * @return string Dashboard url link with optional path appended. 2350 2350 */ 2351 function get_dashboard_url( $user_id , $path = '', $scheme = 'admin' ) {2352 $user_id = (int) $user_id;2351 function get_dashboard_url( $user_id = 0, $path = '', $scheme = 'admin' ) { 2352 $user_id = $user_id ? (int) $user_id : get_current_user_id(); 2353 2353 2354 2354 $blogs = get_blogs_of_user( $user_id ); … … 2378 2378 * @since 3.1.0 2379 2379 * 2380 * @param int $user User ID 2381 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes. 2380 * @param int $user_id Optional. User ID. Defaults to current user. 2381 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 2382 * 'http' or 'https' can be passed to force those schemes. 2382 2383 * @return string Dashboard url link with optional path appended. 2383 2384 */ 2384 function get_edit_profile_url( $user , $scheme = 'admin' ) {2385 $user = (int) $user;2385 function get_edit_profile_url( $user_id = 0, $scheme = 'admin' ) { 2386 $user_id = $user_id ? (int) $user : get_current_user_id(); 2386 2387 2387 2388 if ( is_user_admin() ) … … 2390 2391 $url = network_admin_url( 'profile.php', $scheme ); 2391 2392 else 2392 $url = get_dashboard_url( $user , 'profile.php', $scheme );2393 2394 return apply_filters( 'edit_profile_url', $url, $user , $scheme);2393 $url = get_dashboard_url( $user_id, 'profile.php', $scheme ); 2394 2395 return apply_filters( 'edit_profile_url', $url, $user_id, $scheme); 2395 2396 } 2396 2397
Note: See TracChangeset
for help on using the changeset viewer.