WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/16/2010 09:31:42 AM (10 years ago)
Author:
nacin
Message:

Make network_admin_url() return admin_url() when not multisite like its home and site counterparts. Kill the now redundant maybe_network_admin_url() function. fixes #15840.

File:
1 edited

Legend:

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

    r16977 r16994  
    22242224*/
    22252225function network_admin_url( $path = '', $scheme = 'admin' ) {
     2226    if ( ! is_multisite() )
     2227        return admin_url( $path, $scheme );
     2228
    22262229    $url = network_site_url('wp-admin/network/', $scheme);
    22272230
     
    22682271    else
    22692272        return admin_url($path, $scheme);
    2270 }
    2271 
    2272 /**
    2273  * Retrieve the url to the admin area for either the current blog or the network
    2274  * depending on whether multisite is enabled.
    2275  *
    2276  * @since 3.1.0
    2277  *
    2278  * @param string $path Optional path relative to the admin url
    2279  * @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.
    2280  * @return string Admin url link with optional path appended
    2281 */
    2282 function maybe_network_admin_url( $path = '', $scheme = 'admin' ) {
    2283     if ( is_multisite() )
    2284         return network_admin_url( $path, $scheme );
    2285     else
    2286         return admin_url( $path, $scheme );
    22872273}
    22882274
Note: See TracChangeset for help on using the changeset viewer.