LoginSlugAvailability
Corex\Config\Security\LoginProtection\LoginSlugAvailability · class · Config layer
Whether a login address is free, as opposed to merely well-formed (spec 077, FR-018). {@see LoginSlug} answers the question a regular expression can answer: is this the right shape, and is it one of the paths WordPress reserves. It is deliberately pure — no get_option, no query — because it runs on plugins_loaded before translations exist and because that purity is why it has held since DECISIONS #140. This is the other half, and it needs the database. A slug can pass every rule in LoginSlug and still be taken: about is a perfectly good slug and a perfectly common page. Nothing in the pattern can see that, and the collision only shows up later as a login that serves somebody’s About page — or a page that has quietly become the login. Kept in a separate class rather than added to LoginSlug on purpose. Merging them would give LoginSlug a database dependency and make it unusable at the moment it is most needed.
Public API
Section titled “Public API”rejectionReason(string $slug): ?string
Section titled “rejectionReason(string $slug): ?string”Why this slug cannot be used, or null when it is free. Only collisions. Shape and reserved-name rejections stay with LoginSlug, so a caller asks both and each answers what it knows.