SiteUrls final class
Minn\Runtime\SiteUrls · public/minn/src/Minn/Runtime/SiteUrls.php · 140 lines
The site's own addresses as WordPress builds them: the home and site addresses, the admin's, wp-includes', the sign-in and sign-out pages' (each with its scheme settled and its filter run), whether the request came over HTTPS, the switch that forces the admin onto it, and the trailing slash the permalink structure asks for.
Used by 23 (show)
Constants and properties
| private | static ?bool $adminForced |
Public
| static | secure(): bool# | Whether this request came over HTTPS (is_ssl): the engine's request when there is one, else the server variables. |
| static | forceSslAdmin(mixed $force = NULL): bool# | Whether the admin is forced onto HTTPS (force_ssl_admin, FORCE_SSL_ADMIN); given a value, it sets the switch and answers what it was. |
| static | withScheme(mixed $url, mixed $scheme = NULL): string# | An address in a scheme (set_url_scheme): http, https or relative when asked for; https for the admin, sign-in and RPC ones over HTTPS or with the admin forced; otherwise the request's. Then set_url_scheme. |
| static | home(mixed $path = '', mixed $scheme = NULL, mixed $blogId = NULL): string# | The home address with a path (get_home_url, home_url): in the request's scheme unless http, https or relative is asked for. |
| static | site(mixed $path = '', mixed $scheme = NULL, mixed $blogId = NULL): string# | The site (WordPress) address with a path (get_site_url, site_url). |
| static | admin(mixed $path = '', mixed $scheme = 'admin', mixed $blogId = NULL): string# | An address in the admin (get_admin_url, admin_url). |
| static | selfAdmin(mixed $path = '', mixed $scheme = 'admin'): string# | An address in the current admin (self_admin_url): the site's admin on a single site. |
| static | content(mixed $path = ''): mixed# | An address in wp-content (content_url). |
| static | customize(mixed $stylesheet = ''): string# | The Customizer's address, a theme to preview named (wp_customize_url), escaped. |
| static | includes(mixed $path = '', mixed $scheme = NULL): string# | An address in wp-includes (includes_url). |
| static | login(mixed $redirect = '', mixed $forceReauth = false): string# | The sign-in page (wp_login_url), told where to go after and whether to ask again, as login_url leaves it. |
| static | logout(mixed $redirect = ''): string# | The sign-out address (wp_logout_url), its nonce after the action and where to go after, as logout_url leaves it. |
| static | trailing(mixed $url, mixed $type = ''): string# | An address ending as the permalink structure asks (user_trailingslashit): with a slash when the rewrite object (or the structure) uses them, without one otherwise; then user_trailingslashit. |
Internals 2
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
Nothing matches.