|
@@ 3117-3133 (lines=17) @@
|
| 3114 |
|
* force_ssl_admin() and is_ssl(). |
| 3115 |
|
* @return string Admin URL link with optional path appended. |
| 3116 |
|
*/ |
| 3117 |
|
function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) { |
| 3118 |
|
$url = get_site_url($blog_id, 'wp-admin/', $scheme); |
| 3119 |
|
|
| 3120 |
|
if ( $path && is_string( $path ) ) |
| 3121 |
|
$url .= ltrim( $path, '/' ); |
| 3122 |
|
|
| 3123 |
|
/** |
| 3124 |
|
* Filters the admin area URL. |
| 3125 |
|
* |
| 3126 |
|
* @since 2.8.0 |
| 3127 |
|
* |
| 3128 |
|
* @param string $url The complete admin area URL including scheme and path. |
| 3129 |
|
* @param string $path Path relative to the admin area URL. Blank string if no path is specified. |
| 3130 |
|
* @param int|null $blog_id Site ID, or null for the current site. |
| 3131 |
|
*/ |
| 3132 |
|
return apply_filters( 'admin_url', $url, $path, $blog_id ); |
| 3133 |
|
} |
| 3134 |
|
|
| 3135 |
|
/** |
| 3136 |
|
* Retrieves the URL to the includes directory. |
|
@@ 3340-3359 (lines=20) @@
|
| 3337 |
|
* and is_ssl(). 'http' or 'https' can be passed to force those schemes. |
| 3338 |
|
* @return string Admin URL link with optional path appended. |
| 3339 |
|
*/ |
| 3340 |
|
function network_admin_url( $path = '', $scheme = 'admin' ) { |
| 3341 |
|
if ( ! is_multisite() ) |
| 3342 |
|
return admin_url( $path, $scheme ); |
| 3343 |
|
|
| 3344 |
|
$url = network_site_url('wp-admin/network/', $scheme); |
| 3345 |
|
|
| 3346 |
|
if ( $path && is_string( $path ) ) |
| 3347 |
|
$url .= ltrim($path, '/'); |
| 3348 |
|
|
| 3349 |
|
/** |
| 3350 |
|
* Filters the network admin URL. |
| 3351 |
|
* |
| 3352 |
|
* @since 3.0.0 |
| 3353 |
|
* |
| 3354 |
|
* @param string $url The complete network admin URL including scheme and path. |
| 3355 |
|
* @param string $path Path relative to the network admin URL. Blank string if |
| 3356 |
|
* no path is specified. |
| 3357 |
|
*/ |
| 3358 |
|
return apply_filters( 'network_admin_url', $url, $path ); |
| 3359 |
|
} |
| 3360 |
|
|
| 3361 |
|
/** |
| 3362 |
|
* Retrieves the URL to the admin area for the current user. |