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

- 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:
Friederich Loheide 2026-09-24 04:30:13 +00:00
parent cc88f145f2
commit 7749ebff9b
10 changed files with 377 additions and 301 deletions

View file

@ -126,7 +126,7 @@ msgstr ""
msgid "Move up"
msgstr ""
#: includes/class-m365-login-admin.php:294 includes/class-m365-login-admin.php:333 includes/class-m365-login-admin.php:359 includes/class-m365-login-admin.php:392 includes/class-m365-login-admin.php:566 includes/class-m365-login-sync.php:2224
#: includes/class-m365-login-admin.php:294 includes/class-m365-login-admin.php:333 includes/class-m365-login-admin.php:359 includes/class-m365-login-admin.php:392 includes/class-m365-login-admin.php:566 includes/class-m365-login-sync.php:2230
msgid "You are not allowed to do this."
msgstr ""
@ -1077,103 +1077,107 @@ msgstr ""
msgid "More options on the Button tab under \"Custom login page\"."
msgstr ""
#: includes/class-m365-login-auth.php:197
#: includes/class-m365-login-auth.php:203
msgid "Password sign-in is disabled on this site. Please use the Microsoft button."
msgstr ""
#: includes/class-m365-login-auth.php:1224
#: includes/class-m365-login-auth.php:235 includes/class-m365-login-auth.php:1336
msgid "Passwords are not used on this site. Please sign in with the Microsoft button."
msgstr ""
#: includes/class-m365-login-auth.php:1286
msgid "Microsoft sign-in is temporarily unavailable. Please contact an administrator."
msgstr ""
#: includes/class-m365-login-auth.php:1231
#: includes/class-m365-login-auth.php:1293
msgid "Password sign-in is temporarily enabled for this browser (30 minutes)."
msgstr ""
#: includes/class-m365-login-auth.php:1252 includes/class-m365-login-graph.php:63
#: includes/class-m365-login-auth.php:1314 includes/class-m365-login-graph.php:63
msgid "Microsoft login is not configured yet."
msgstr ""
#: includes/class-m365-login-auth.php:1253
#: includes/class-m365-login-auth.php:1315
msgid "The login request expired or was invalid. Please try again."
msgstr ""
#: includes/class-m365-login-auth.php:1254
#: includes/class-m365-login-auth.php:1316
msgid "Microsoft sign-in was cancelled."
msgstr ""
#: includes/class-m365-login-auth.php:1255
#: includes/class-m365-login-auth.php:1317
msgid "Microsoft returned an error. Please try again."
msgstr ""
#: includes/class-m365-login-auth.php:1256
#: includes/class-m365-login-auth.php:1318
msgid "Could not complete the sign-in with Microsoft. Please try again or contact an administrator."
msgstr ""
#: includes/class-m365-login-auth.php:1257
#: includes/class-m365-login-auth.php:1319
msgid "The Microsoft sign-in could not be verified."
msgstr ""
#: includes/class-m365-login-auth.php:1258
#: includes/class-m365-login-auth.php:1320
msgid "Your Microsoft account did not provide an e-mail address."
msgstr ""
#: includes/class-m365-login-auth.php:1259
#: includes/class-m365-login-auth.php:1321
msgid "Your e-mail domain is not allowed to sign in here."
msgstr ""
#: includes/class-m365-login-auth.php:1260
#: includes/class-m365-login-auth.php:1322
msgid "No WordPress account exists for your Microsoft e-mail address."
msgstr ""
#: includes/class-m365-login-auth.php:1261
#: includes/class-m365-login-auth.php:1323
msgid "This WordPress account is linked to a different Microsoft account. Please contact an administrator."
msgstr ""
#: includes/class-m365-login-auth.php:1262
#: includes/class-m365-login-auth.php:1324
msgid "You are not allowed to sign in with this account."
msgstr ""
#: includes/class-m365-login-auth.php:1263
#: includes/class-m365-login-auth.php:1325
msgid "Your Microsoft account is not a member of a group that is allowed to sign in here."
msgstr ""
#: includes/class-m365-login-auth.php:1264
#: includes/class-m365-login-auth.php:1326
msgid "Your group membership could not be verified. Please contact an administrator."
msgstr ""
#: includes/class-m365-login-auth.php:1265
#: includes/class-m365-login-auth.php:1327
msgid "Your Microsoft account is a member of a group that is not allowed to sign in here."
msgstr ""
#: includes/class-m365-login-auth.php:1266
#: includes/class-m365-login-auth.php:1328
msgid "The fallback key is not valid."
msgstr ""
#: includes/class-m365-login-auth.php:1267
#: includes/class-m365-login-auth.php:1329
msgid "Too many attempts. Please wait 15 minutes."
msgstr ""
#: includes/class-m365-login-auth.php:1268
#: includes/class-m365-login-auth.php:1330
msgid "Too many sign-in attempts from your connection. Please wait a few minutes and try again."
msgstr ""
#: includes/class-m365-login-auth.php:1269 includes/class-m365-login-sync.php:2132
#: includes/class-m365-login-auth.php:1331 includes/class-m365-login-sync.php:2138
msgid "This account has been deactivated."
msgstr ""
#: includes/class-m365-login-auth.php:1270
#: includes/class-m365-login-auth.php:1332
msgid "For security reasons this administrator account is not linked automatically. Sign in once with your password and click \"Link Microsoft account\" on your profile page or ask an administrator to enter your Microsoft account (user principal name) in your WordPress profile."
msgstr ""
#: includes/class-m365-login-auth.php:1271
#: includes/class-m365-login-auth.php:1333
msgid "The link could not be completed because you are no longer signed in to WordPress. Please sign in and try again."
msgstr ""
#: includes/class-m365-login-auth.php:1272
#: includes/class-m365-login-auth.php:1334
msgid "Your WordPress account is already linked to a different Microsoft account. An administrator can remove the link in your profile."
msgstr ""
#: includes/class-m365-login-auth.php:1273
#: includes/class-m365-login-auth.php:1335
msgid "Guest and external accounts cannot sign in here."
msgstr ""
@ -1397,294 +1401,294 @@ msgid "Microsoft 365 returned no users at all while accounts are linked. Nothing
msgstr ""
#. translators: %d: number of accounts
#: includes/class-m365-login-sync.php:584
#: includes/class-m365-login-sync.php:585
msgid "%d linked account belongs to another (or an unknown) tenant and was not deactivated or deleted. Unlink it by hand if it is no longer needed."
msgid_plural "%d linked accounts belong to another (or an unknown) tenant and were not deactivated or deleted. Unlink them by hand if they are no longer needed."
msgstr[0] ""
msgstr[1] ""
#. translators: 1: number of accounts, 2: limit
#: includes/class-m365-login-sync.php:595
#: includes/class-m365-login-sync.php:596
msgid "Safety stop: %1$d accounts would be deactivated or deleted, more than the limit of %2$d per run. No account was deactivated or deleted. Check the sync groups and the tenant, then run the sync again (the limit can be changed with the m365_login_sync_deprovision_limit filter)."
msgstr ""
#: includes/class-m365-login-sync.php:721 includes/class-m365-login-sync.php:779 includes/class-m365-login-sync.php:1227 includes/class-m365-login-sync.php:2277
#: includes/class-m365-login-sync.php:722 includes/class-m365-login-sync.php:785 includes/class-m365-login-sync.php:1233 includes/class-m365-login-sync.php:2283
msgid "disabled in Microsoft 365"
msgstr ""
#. translators: %s: user principal name
#: includes/class-m365-login-sync.php:732
#: includes/class-m365-login-sync.php:733
msgid "%s: no usable e-mail address, skipped."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:739
#: includes/class-m365-login-sync.php:740
msgid "%s: e-mail domain is not on the allow-list, skipped."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:755
#: includes/class-m365-login-sync.php:761
msgid "%s: the WordPress account with this e-mail address is linked to a different Microsoft account, skipped."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:760
#: includes/class-m365-login-sync.php:766
msgid "%s: privileged WordPress account linked only when the Microsoft user principal name equals its e-mail address or the Microsoft account assigned in its profile, or when the person links it from the profile. Skipped."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:764
#: includes/class-m365-login-sync.php:770
msgid "%s: existing account linked."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:790
#: includes/class-m365-login-sync.php:796
msgid "%s: added to this site."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:799
#: includes/class-m365-login-sync.php:805
msgid "%s: reactivated (active in Microsoft 365 again)."
msgstr ""
#. translators: 1: e-mail address, 2: list of changed fields
#: includes/class-m365-login-sync.php:810
#: includes/class-m365-login-sync.php:816
msgid "%1$s: updated (%2$s)."
msgstr ""
#. translators: 1: e-mail address, 2: role names
#: includes/class-m365-login-sync.php:837
#: includes/class-m365-login-sync.php:843
msgid "%1$s: account created (%2$s)."
msgstr ""
#. translators: 1: e-mail address, 2: error message
#: includes/class-m365-login-sync.php:864
#: includes/class-m365-login-sync.php:870
msgid "%1$s: account could not be created: %2$s"
msgstr ""
#. translators: 1: current e-mail address, 2: e-mail address in Microsoft 365
#: includes/class-m365-login-sync.php:923
#: includes/class-m365-login-sync.php:929
msgid "%1$s: the e-mail address in Microsoft 365 changed to %2$s. It is not changed automatically for privileged accounts update it by hand if intended."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:926
#: includes/class-m365-login-sync.php:932
msgid "%s: e-mail address is used by another WordPress account and was not changed."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:929
#: includes/class-m365-login-sync.php:935
msgid "e-mail"
msgstr ""
#. translators: %s: profile field
#: includes/class-m365-login-sync.php:979
#: includes/class-m365-login-sync.php:985
msgid "%s removed"
msgstr ""
#. translators: 1: e-mail address, 2: error message
#: includes/class-m365-login-sync.php:989
#: includes/class-m365-login-sync.php:995
msgid "%1$s: profile could not be updated: %2$s"
msgstr ""
#. translators: %s: role names
#: includes/class-m365-login-sync.php:1098
#: includes/class-m365-login-sync.php:1104
msgid "roles: %s"
msgstr ""
#. translators: 1: number of accounts, 2: limit
#: includes/class-m365-login-sync.php:1168
#: includes/class-m365-login-sync.php:1174
msgid "Safety stop: %1$d accounts would lose administrative rights, more than the limit of %2$d per run (or all of them). Nothing was demoted, deactivated or deleted. Check the group → role mapping, then run the sync again (filter m365_login_sync_demotion_limit)."
msgstr ""
#: includes/class-m365-login-sync.php:1219 includes/class-m365-login-sync.php:2278
#: includes/class-m365-login-sync.php:1225 includes/class-m365-login-sync.php:2284
msgid "deleted in Microsoft 365"
msgstr ""
#: includes/class-m365-login-sync.php:1230 includes/class-m365-login-sync.php:2279
#: includes/class-m365-login-sync.php:1236 includes/class-m365-login-sync.php:2285
msgid "no longer a member of the sync groups"
msgstr ""
#. translators: 1: e-mail address, 2: reason
#: includes/class-m365-login-sync.php:1262
#: includes/class-m365-login-sync.php:1268
msgid "%1$s: %2$s, but the account is protected (administrator or your own account) and was not changed."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:1406
#: includes/class-m365-login-sync.php:1412
msgid "%s: no valid user to receive the content is selected, so the account is deactivated instead of deleted."
msgstr ""
#. translators: 1: e-mail address, 2: reason
#: includes/class-m365-login-sync.php:1415
#: includes/class-m365-login-sync.php:1421
msgid "%1$s: account deleted (%2$s)."
msgstr ""
#. translators: 1: e-mail address, 2: reason
#: includes/class-m365-login-sync.php:1424
#: includes/class-m365-login-sync.php:1430
msgid "%1$s: account deactivated (%2$s)."
msgstr ""
#: includes/class-m365-login-sync.php:1503
#: includes/class-m365-login-sync.php:1509
msgid "Microsoft Graph refused the request. Grant the application permissions \"User.Read.All\" and \"GroupMember.Read.All\" with admin consent in Entra ID."
msgstr ""
#. translators: %s: error message
#: includes/class-m365-login-sync.php:1506
#: includes/class-m365-login-sync.php:1512
msgid "Microsoft Graph error: %s"
msgstr ""
#: includes/class-m365-login-sync.php:1524
#: includes/class-m365-login-sync.php:1530
msgid "Log truncated."
msgstr ""
#. translators: 1: e-mail address, 2: error message
#: includes/class-m365-login-sync.php:1607
#: includes/class-m365-login-sync.php:1613
msgid "%1$s: profile photo could not be read: %2$s"
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:1631 includes/class-m365-login-sync.php:1674
#: includes/class-m365-login-sync.php:1637 includes/class-m365-login-sync.php:1680
msgid "%s: profile photo updated."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:1650
#: includes/class-m365-login-sync.php:1656
msgid "%s: profile photo could not be downloaded."
msgstr ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:1657
#: includes/class-m365-login-sync.php:1663
msgid "%s: profile photo is not a valid image or could not be saved."
msgstr ""
#. translators: %d: number of photos
#: includes/class-m365-login-sync.php:1680
#: includes/class-m365-login-sync.php:1686
msgid "%d changed profile photo will be downloaded in the next run (download limit per run reached)."
msgid_plural "%d changed profile photos will be downloaded in the next run (download limit per run reached)."
msgstr[0] ""
msgstr[1] ""
#. translators: %s: e-mail address
#: includes/class-m365-login-sync.php:1695
#: includes/class-m365-login-sync.php:1701
msgid "%s: profile photo removed."
msgstr ""
#. translators: %d: number of photos
#: includes/class-m365-login-sync.php:1723
#: includes/class-m365-login-sync.php:1729
msgid "Profile photo sync is off: %d stored photo removed."
msgid_plural "Profile photo sync is off: %d stored photos removed."
msgstr[0] ""
msgstr[1] ""
#: includes/class-m365-login-sync.php:1895 includes/class-m365-login-sync.php:1909
#: includes/class-m365-login-sync.php:1901 includes/class-m365-login-sync.php:1915
msgid "Microsoft 365 (M365 Login)"
msgstr ""
#: includes/class-m365-login-sync.php:1927
#: includes/class-m365-login-sync.php:1933
msgid "Microsoft object ID"
msgstr ""
#: includes/class-m365-login-sync.php:1928
#: includes/class-m365-login-sync.php:1934
msgid "Microsoft tenant ID"
msgstr ""
#: includes/class-m365-login-sync.php:1939
#: includes/class-m365-login-sync.php:1945
msgid "Profile photo"
msgstr ""
#: includes/class-m365-login-sync.php:1943 includes/class-m365-login-sync.php:2294
#: includes/class-m365-login-sync.php:1949 includes/class-m365-login-sync.php:2300
msgid "Last sync"
msgstr ""
#: includes/class-m365-login-sync.php:1957 includes/class-m365-login-sync.php:2161 includes/class-m365-login-sync.php:2308
#: includes/class-m365-login-sync.php:1963 includes/class-m365-login-sync.php:2167 includes/class-m365-login-sync.php:2314
msgid "Microsoft 365"
msgstr ""
#: includes/class-m365-login-sync.php:1998
#: includes/class-m365-login-sync.php:2004
msgid "The link to the Microsoft account and a possible deactivation were kept because they secure the account. The next user sync copies selected profile fields again unless the person is excluded from the sync."
msgstr ""
#: includes/class-m365-login-sync.php:2179
#: includes/class-m365-login-sync.php:2185
msgid "Deactivated"
msgstr ""
#: includes/class-m365-login-sync.php:2182
#: includes/class-m365-login-sync.php:2188
msgid "Imported"
msgstr ""
#: includes/class-m365-login-sync.php:2184 includes/class-m365-login-sync.php:2314
#: includes/class-m365-login-sync.php:2190 includes/class-m365-login-sync.php:2320
msgid "Linked"
msgstr ""
#: includes/class-m365-login-sync.php:2212
#: includes/class-m365-login-sync.php:2218
msgid "Reactivate"
msgstr ""
#: includes/class-m365-login-sync.php:2212
#: includes/class-m365-login-sync.php:2218
msgid "Deactivate"
msgstr ""
#: includes/class-m365-login-sync.php:2241
#: includes/class-m365-login-sync.php:2247
msgid "Your Microsoft account is now linked. From now on you can sign in with the Microsoft button."
msgstr ""
#: includes/class-m365-login-sync.php:2255
#: includes/class-m365-login-sync.php:2261
msgid "The account has been deactivated and signed out everywhere."
msgstr ""
#: includes/class-m365-login-sync.php:2256
#: includes/class-m365-login-sync.php:2262
msgid "The account has been reactivated."
msgstr ""
#. translators: 1: date, 2: reason
#: includes/class-m365-login-sync.php:2283
#: includes/class-m365-login-sync.php:2289
msgid "Deactivated since %1$s (%2$s)"
msgstr ""
#. translators: 1: date, 2: reason
#: includes/class-m365-login-sync.php:2285
#: includes/class-m365-login-sync.php:2291
msgid "manually"
msgstr ""
#. translators: 1: date, 2: reason
#: includes/class-m365-login-sync.php:2287
#: includes/class-m365-login-sync.php:2293
msgid "Status"
msgstr ""
#: includes/class-m365-login-sync.php:2290
#: includes/class-m365-login-sync.php:2296
msgid "Object ID"
msgstr ""
#: includes/class-m365-login-sync.php:2311
#: includes/class-m365-login-sync.php:2317
msgid "Microsoft account"
msgstr ""
#: includes/class-m365-login-sync.php:2316
#: includes/class-m365-login-sync.php:2322
msgid "Not linked"
msgstr ""
#: includes/class-m365-login-sync.php:2319
#: includes/class-m365-login-sync.php:2325
msgid "Link Microsoft account"
msgstr ""
#: includes/class-m365-login-sync.php:2320
#: includes/class-m365-login-sync.php:2326
msgid "You sign in with Microsoft once; afterwards this WordPress account is bound to that Microsoft account, even if its user principal name differs from your e-mail address."
msgstr ""
#: includes/class-m365-login-sync.php:2326
#: includes/class-m365-login-sync.php:2332
msgid "Assigned Microsoft account (UPN)"
msgstr ""
#: includes/class-m365-login-sync.php:2329
#: includes/class-m365-login-sync.php:2335
msgid "Optional. The user principal name of the Microsoft account that belongs to this user. Sign-in and user sync link exactly this account needed for administrators whose user principal name differs from their WordPress e-mail address."
msgstr ""
#: includes/class-m365-login-sync.php:2331
#: includes/class-m365-login-sync.php:2337
msgid "Remove the link to the Microsoft account"
msgstr ""
#: includes/class-m365-login-sync.php:2344
#: includes/class-m365-login-sync.php:2350
msgid "These values are managed by the Microsoft 365 user sync and overwritten on the next run."
msgstr ""