Sign-In Page
What it helps you do
Give every client a sign-in page that looks like their brand instead of WordPress. There's nothing to set up and no setting to look after: the page builds itself from what the site already has.
What the page uses
| On the page | Where it comes from |
|---|---|
| The pattern on the left | Primary, Secondary and Accent in Customize → Colors |
| Square or round shapes | Corner radius in Customize → Buttons. Under 12 px gets square shapes, and 12 px or more gets round ones |
| The corners of the button and fields | Corner radius again. Fields and notices stop at 10 px |
| The greeting | The Headings font in Customize → Typography, with the weight and capitals of your H1 |
| The logo, top right | The header logo and reverse logo in Customize → Logo |
The pattern is seeded by the site's domain, so each site keeps its own, and it changes only when the palette, the corner radius or the domain does. A colour still on the theme's default is left out. If Primary is still the default, the page uses near-black instead of the default blue.
If the site has no logo, its name shows as text in the heading font. A logo loads at the size it shows, from the media library's resized copies, the way the site header does; an SVG loads as it is.
Light and dark
The panel starts dark when white text reads well on Primary, using Primary as its colour. Otherwise it starts light. Anyone can switch with Dark or Light at the bottom of the panel. The choice is remembered in that browser, for that site, and isn't tied to an account. Nobody is signed in yet, so it doesn't follow the top bar's light and dark switch in the admin.
The page picks the logo for each panel by measuring it, soon after a logo changes or the first time someone opens the page:
- On dark: the reverse logo, if it really is a light version. A reverse logo that's the same file as the main logo, that's a JPEG or that measures dark isn't used. Then a light main logo shows as it is, and any other logo sits on a small white chip.
- On light: the main logo. A main logo that's too pale to read sits on a small chip in the dark panel's colour.
A photo instead of the pattern
If a site's people would rather see themselves there, choose a Sign-In Photo under Customize → Settings → General. It fills the left side in place of the pattern, cropped to the middle, and becomes the band across the top on phones, so a wide photo works best. Everything else stays the same: the greeting, the form, the logo and the Light and Dark switch. Clear the photo to get the pattern back. Every site starts without one.
What stays the same
The form is WordPress's own, so password managers, autofill, Two Factor and captcha plugins work as they always have. Error messages keep WordPress's wording. The session-expired pop-up and the Customizer's sign-in show the form alone.
For developers
Besides Sign-In Photo there are no settings, but there are two filters:
ds_login_palettechanges the colours: an array withprimary,secondaryandaccent.ds_login_posterchanges the markup of the pattern, so a site can use something else there. It gets the photo's markup too when one is set.