Definition:
function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {}
Retrieve the url to the admin area for a given site.
Parameters
- int $blog_id: (optional) Blog ID. Defaults to current blog.
- string $path: Optional path relative to the admin url.
- 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.
Return values
returns:Admin url link with optional path appended.
Defined filters
- admin_url
apply_filters('admin_url', $url, $path, $blog_id)
Source code
function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) { $url = get_site_url($blog_id, 'wp-admin/', $scheme); if ( !empty($path) && is_string($path) && strpos($path, '..') === false ) $url .= ltrim($path, '/'); return apply_filters('admin_url', $url, $path, $blog_id); }
1124
No comments yet... Be the first to leave a reply!