apply_filters( ‘admin_url’, string $url, string $path, int|null $blog_id, string|null $scheme )

In this article

Filters the admin area URL.

Parameters

$urlstring
The complete admin area URL including scheme and path.
$pathstring
Path relative to the admin area URL. Blank string if no path is specified.
$blog_idint|null
Site ID, or null for the current site.
$schemestring|null
The scheme to use. Accepts 'http', 'https', 'admin', or null. Default 'admin', which obeys force_ssl_admin() and is_ssl() .

Source

return apply_filters( 'admin_url', $url, $path, $blog_id, $scheme );

Changelog

VersionDescription
5.8.0The $scheme parameter was added.
2.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.