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