Changeset 15746 for trunk/wp-includes/link-template.php
- Timestamp:
- 10/07/2010 07:34:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r15701 r15746 2131 2131 2132 2132 /** 2133 * Retrieve the url to the admin area for the current user. 2134 * 2135 * @package WordPress 2136 * @since 3.0.0 2137 * 2138 * @param string $path Optional path relative to the admin url 2139 * @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. 2140 * @return string Admin url link with optional path appended 2141 */ 2142 function user_admin_url( $path = '', $scheme = 'admin' ) { 2143 $url = network_site_url('wp-admin/user/', $scheme); 2144 2145 if ( !empty($path) && is_string($path) && strpos($path, '..') === false ) 2146 $url .= ltrim($path, '/'); 2147 2148 return apply_filters('user_admin_url', $url, $path); 2149 } 2150 2151 /** 2133 2152 * Retrieve the url to the admin area for either the current blog or the network depending on context. 2134 2153 * … … 2143 2162 if ( is_network_admin() ) 2144 2163 return network_admin_url($path, $scheme); 2164 elseif ( is_user_admin() ) 2165 return user_admin_url($path, $scheme); 2145 2166 else 2146 2167 return admin_url($path, $scheme);
Note: See TracChangeset
for help on using the changeset viewer.