Make WordPress Core


Ignore:
Timestamp:
10/07/2010 07:34:18 PM (14 years ago)
Author:
ryan
Message:

First pass of user admin. Network admin and screen cleanups. see #14696

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r15701 r15746  
    21312131
    21322132/**
     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*/
     2142function 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/**
    21332152 * Retrieve the url to the admin area for either the current blog or the network depending on context.
    21342153 *
     
    21432162    if ( is_network_admin() )
    21442163        return network_admin_url($path, $scheme);
     2164    elseif ( is_user_admin() )
     2165        return user_admin_url($path, $scheme);
    21452166    else
    21462167        return admin_url($path, $scheme);
Note: See TracChangeset for help on using the changeset viewer.