Remove the login box frame and hide "Lost your password?" reliably
Some checks are pending
CI / PHP lint (7.4) (pull_request) Waiting to run
CI / PHP lint (8.0) (pull_request) Waiting to run
CI / PHP lint (8.1) (pull_request) Waiting to run
CI / PHP lint (8.2) (pull_request) Waiting to run
CI / PHP lint (8.3) (pull_request) Waiting to run
CI / PHP lint (8.4) (pull_request) Waiting to run
CI / WordPress Coding Standards (pull_request) Waiting to run
CI / WordPress.org Plugin Check (pull_request) Waiting to run
Some checks are pending
CI / PHP lint (7.4) (pull_request) Waiting to run
CI / PHP lint (8.0) (pull_request) Waiting to run
CI / PHP lint (8.1) (pull_request) Waiting to run
CI / PHP lint (8.2) (pull_request) Waiting to run
CI / PHP lint (8.3) (pull_request) Waiting to run
CI / PHP lint (8.4) (pull_request) Waiting to run
CI / WordPress Coding Standards (pull_request) Waiting to run
CI / WordPress.org Plugin Check (pull_request) Waiting to run
- No border or shadow around the login box on wp-login.php (form and Microsoft block, also in button-only mode); the white area stays. - Button-only mode: the "Lost your password?" link is removed through lost_password_html_link instead of CSS only, the lostpassword, retrievepassword, rp and resetpass screens redirect to the login page and allow_password_reset refuses resets – all unless the fallback link is active. - The login stylesheet is also loaded when only the form is hidden (e.g. broken connection); before, the link and form showed there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cc88f145f2
commit
7749ebff9b
10 changed files with 377 additions and 301 deletions
|
|
@ -212,6 +212,9 @@ class M365_Login_Button {
|
|||
* @return string[]
|
||||
*/
|
||||
public function body_class( $classes ) {
|
||||
if ( $this->should_render() ) {
|
||||
$classes[] = 'm365-login-page';
|
||||
}
|
||||
if ( $this->form_hidden() ) {
|
||||
$classes[] = 'm365-button-only';
|
||||
}
|
||||
|
|
@ -222,7 +225,8 @@ class M365_Login_Button {
|
|||
* Enqueues login styles and the small positioning script.
|
||||
*/
|
||||
public function enqueue() {
|
||||
if ( ! $this->should_render() ) {
|
||||
// Also when only the form is hidden (e.g. broken connection): the stylesheet hides the password form and links.
|
||||
if ( ! $this->should_render() && ! $this->form_hidden() ) {
|
||||
return;
|
||||
}
|
||||
wp_enqueue_style( 'm365-login', M365_LOGIN_URL . 'assets/css/login.css', array(), M365_LOGIN_VERSION );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue