Commit Graph

159 Commits

Author SHA1 Message Date
Andrea Fercia
0ff03b3290 Login and Registration: Add a "Show password" button on the login page.
The ability for users to see the password they're typing improves usability and accessibility of the login users flow.

- brings the login screen in line with the same feature already used in the New User, Edit User, and Reset Password pages
- improves association of labels and input fields by using explicit association with `for` / `id` attributes
- slightly increases the "Remember me" label font size

Props johnbillion, Iceable, audrasjb, joyously, adamsilverstein, boemedia, DrewAPicture, shadyvb, birgire, peterwilsoncc, pento, anevins, davidbaumwald, whyisjake, afercia.
Fixes #42888.


git-svn-id: https://develop.svn.wordpress.org/trunk@46256 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 18:05:16 +00:00
ocean90
cb076cab0d I18N: Remove HTML tags from translatable string in wp-login.php.
See #46349.

git-svn-id: https://develop.svn.wordpress.org/trunk@46229 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 15:53:02 +00:00
Andrew Ozz
66ef5ec15b Remove left-over debug code after [46203].
See #46349.

git-svn-id: https://develop.svn.wordpress.org/trunk@46204 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 19:26:33 +00:00
Andrew Ozz
388e7fe7f4 Admin email verification:
- Fix wording of the HTML title.
- Add hidden `(opens in a new tab)` to links that need it.
- Add the `screen-reader-text` CSS class to login.css.
- Add another translator comment.

Props afercia.
See #46349.


git-svn-id: https://develop.svn.wordpress.org/trunk@46203 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 18:50:19 +00:00
Jonathan Desrosiers
dd330aee33 Login and Registration: Detect JavaScript on the login screen.
This allows the login screen to be targeted with CSS when JavaScript is disabled.

Props Nikschavan.
Fixes #38088.

git-svn-id: https://develop.svn.wordpress.org/trunk@46192 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 19:21:17 +00:00
Sergey Biryukov
00b03f2a6f I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.

git-svn-id: https://develop.svn.wordpress.org/trunk@45932 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-03 00:39:13 +00:00
Sergey Biryukov
a7513ac8e0 I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.

git-svn-id: https://develop.svn.wordpress.org/trunk@45926 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-01 17:12:43 +00:00
Andrew Ozz
6dad32d2ae Admin email verification:
- Add the `admin_email_lifespan` option when installing. Fixes a bug where the verification screen is shown right after installation.
- Reset the same option when upgrading and the user doing the DB upgrade is not an admin. This will ensure the email verification is shown next time an admin logs in.
- Use `site_url()` instead of `network_site_url()` for the form action. The latter seems needed only for password reset.

See #46349.

git-svn-id: https://develop.svn.wordpress.org/trunk@45788 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-13 17:39:06 +00:00
Andrew Ozz
296d8646e7 Add admin email verification screen. Shown every six months after an admin has logged in.
Also includes WPCS fixes for wp-login.php.

Props andraganescu, boemedia, lessbloat, azaozz.
See #46349.

git-svn-id: https://develop.svn.wordpress.org/trunk@45757 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-07 00:03:39 +00:00
Dominik Schilling
3df5f2a3d7 I18N: Display the logged out message in the user's locale
git-svn-id: https://develop.svn.wordpress.org/trunk@45690 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-27 14:30:19 +00:00
Gary Pendergast
5fe76184f2 Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in the base directory.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45582 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 08:26:25 +00:00
Sergey Biryukov
a6fa4b5491 General: Update support forum links.
There are a lot of places in Core that link to https://wordpress.org/support/ for the support forums, but that's now the URL for HelpHub. The new forums link is https://wordpress.org/support/forums/.

This is a follow-up to [45140], which changed the links in help tabs.

Props dilipbheda.
Fixes #47239. See #46790.

git-svn-id: https://develop.svn.wordpress.org/trunk@45412 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 14:23:27 +00:00
John Blackbourn
fce8910a2d Mail: Use the standardised spelling of email in the password reset error message.
Fixes #39110


git-svn-id: https://develop.svn.wordpress.org/trunk@45405 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-24 22:52:55 +00:00
John Blackbourn
3834909270 Mail: Improve the user experience when the password reset email cannot be sent.
This introduces a link to the support page for resetting your password, and improves the error by bringing it into the login page instead of a `wp_die()`.

Props neelpatel7295, estelaris, desrosj


git-svn-id: https://develop.svn.wordpress.org/trunk@45404 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-24 22:13:11 +00:00
Jonathan Desrosiers
3da0d67f80 I18N: Combine similar strings with minor differences.
Props dimadin.
Fixes #47158.

git-svn-id: https://develop.svn.wordpress.org/trunk@45298 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-09 19:47:28 +00:00
John Blackbourn
8b1ecf68d9 I18N: Improvements to and additions of translator comments for various email subject strings.
Props ramiy

Fixes #46920


git-svn-id: https://develop.svn.wordpress.org/trunk@45204 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 22:38:59 +00:00
Jonathan Desrosiers
212bbbae98 Administration: Move “Recovery Mode” to the beginning of the document title.
This improves accessibility, ensuring users utilizing screen readers are informed that the site is in recovery mode.

Props: afercia, TimothyBlynJacobs.
See #46608.

git-svn-id: https://develop.svn.wordpress.org/trunk@45175 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 19:04:13 +00:00
Felix Arntz
a511415d0a Administration: Improve user experience and clarify when in recovery mode.
This changeset introduces several changes around usability when recovery mode is active:

* Display a notice in the admin clarifying that the user is in recovery mode.
* Use a highlight color for the admin bar link to exit recovery mode.
* Exit recovery mode automatically when logging out.
* Include a recovery mode indicator in the title tag.

Props aandrewdixon, azaozz, dhanukanuwan, flixos90, henrywright, karmatosed, mapk, melchoyce, spacedmonkey, TimothyBlynJacobs, tinkerbelly.
See #46608.


git-svn-id: https://develop.svn.wordpress.org/trunk@45117 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-05 16:59:34 +00:00
Felix Arntz
1f3912e9bf Bootstrap/Load: Introduce a recovery mode for fixing fatal errors.
Using the new fatal handler introduced in [44962], an email is sent to the admin when a fatal error occurs. This email includes a secret link to enter recovery mode. When clicked, the link will be validated and on success a cookie will be placed on the client, enabling recovery mode for that user. This functionality is executed early before plugins and themes are loaded, in order to be unaffected by potential fatal errors these might be causing.

When in recovery mode, broken plugins and themes will be paused for that client, so that they are able to access the admin backend despite of these errors. They are notified about the broken extensions and the errors caused, and can then decide whether they would like to temporarily deactivate the extension or fix the problem and resume the extension.

A link in the admin bar allows the client to exit recovery mode.

Props timothyblynjacobs, afragen, flixos90, nerrad, miss_jwo, schlessera, spacedmonkey, swissspidy.
Fixes #46130, #44458.


git-svn-id: https://develop.svn.wordpress.org/trunk@44973 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 21:52:07 +00:00
Jonathan Desrosiers
c62eab00a7 Coding Standards: Fix PHPCS issue introduced in [44931].
See #44901.

git-svn-id: https://develop.svn.wordpress.org/trunk@44932 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-19 02:47:41 +00:00
Jonathan Desrosiers
d941cf62ee Privacy: Remove unnecessary WP_Error when handling confirmaction requests.
By reordering the logic when handling the `confirmaction` action in `wp-login.php`, the need for a new `WP_Error` object to be created can be eliminated. The error message can be passed directly into a `wp_die()` call, matching the other validation errors in related code.

Props garrett-eclipse, birgire.
Fixes #44901.

git-svn-id: https://develop.svn.wordpress.org/trunk@44931 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-19 02:37:38 +00:00
Andrea Fercia
eeb57f67c4 Accessibility: Login: Display error messages when both the username and password fields are empty.
For accessibility and usability, if an input error is detected, the item that is in error needs to be identified and the error needs to be described to the user in text (WCAG Success Criterion 3.3.1). The login form displays an error when the username field is empty or when the password field is empty. It omits to do so when both fields are empty.

This change restores the login form behavior to the one that used to work in WordPress 2.3 (!) and displays the related error messages also when both fields are empty.

Props birgire, audrasjb.
See #8938, #5405, #3708.
Fixes #42985.


git-svn-id: https://develop.svn.wordpress.org/trunk@44918 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-16 15:21:25 +00:00
Sergey Biryukov
d52e37ea5e Acessibility: Remove title attribute in login_header().
* Deprecate `login_headertitle` filter, introduce `login_headertext` as a replacement.
* For backwards compatibility, if a `login_headertitle` is set, it will be used as link text.
* Make the login header logo URL and text consistent between single site and Multisite.
* Avoid ambiguity of where the WordPress logo points to; link to WordPress.org by default.
* `login_headerurl` filter is still available to change the URL of the header logo.

Props afercia, pratikkry, chetan200891.
Fixes #42537.

git-svn-id: https://develop.svn.wordpress.org/trunk@44899 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-14 21:09:47 +00:00
Andrea Fercia
cdca702477 Accessibility: Improve the password form buttons accessibility.
- makes the "Cancel" button always visible: this allows to generate a new password also on small screens
- moves focus back to the Generate Password button when closing the form
- changes the password reset show/hide button from a clickable `<span>` element to a real `<button>` element
- improves the CSS

Props janak007, afercia.
Fixes #42853.


git-svn-id: https://develop.svn.wordpress.org/trunk@44895 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-13 23:36:45 +00:00
Sergey Biryukov
010cdb3ce6 Login and Registration: Update URLs for browser cookie documentation.
Props joostdevalk.
Fixes #46254.

git-svn-id: https://develop.svn.wordpress.org/trunk@44776 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-28 11:43:24 +00:00
Gary Pendergast
992184cf73 Coding Standards: Upgrade WPCS to 1.2.1.
This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.



git-svn-id: https://develop.svn.wordpress.org/trunk@44574 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 06:40:16 +00:00
Andrea Fercia
238e8991f8 Accessibility: Remove negative tabindex from the login, install, and setup pages header.
Props bamadesigner, rishishah, jainnidhi.
Fixes #42632.


git-svn-id: https://develop.svn.wordpress.org/trunk@44545 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-10 17:20:59 +00:00
Gary Pendergast
bc027fb70f Login: Improve the error message when retrieving a lost password.
When an invalid username or email address is entered, the form now displays a better error message.

Props mrtortai, iamfriendly, TomHarrigan, afercia, pento.
Fixes #31788.



git-svn-id: https://develop.svn.wordpress.org/trunk@44489 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 02:05:08 +00:00
Jonathan Desrosiers
47116930ee Docs: Update since annotation for new lost_password action parameter.
Introduced in [43542].

Fixes #44512.

git-svn-id: https://develop.svn.wordpress.org/trunk@44396 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-04 21:51:32 +00:00
Jeremy Felt
f7b3c32a57 REST API: Render response in user locale with ?_locale=user.
Introduces new `determine_locale()` function for deciding the proper locale to use for a response. Default value is `get_user_locale()` in the admin, and `get_locale()` on the frontend. Because REST API requests are considered frontend requests, `?_locale=user` can be used to render the response in the user's locale.

Also updates `wp-login.php?wp_lang` implementation to benefit from this abstraction.

Merges [43776] from the 5.0 branch to trunk.

Props flixos90, mnelson4, swissspidy, TimothyBlynJacobs.
Fixes #44758.


git-svn-id: https://develop.svn.wordpress.org/trunk@44134 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 01:31:27 +00:00
Peter Wilson
b5bfe2bd82 Multisite: Improve messaging for previously activated users.
Ensure activation of a site is not attempted multiple times and users are shown the correct message if they follow the link a second time.


git-svn-id: https://develop.svn.wordpress.org/trunk@44021 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 00:22:03 +00:00
John Blackbourn
3493feaa5a Docs: Improve docblocks within wp-login.php.
Props birgire

See #42505


git-svn-id: https://develop.svn.wordpress.org/trunk@43644 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-14 13:47:01 +00:00
jrf
7839cf651f I18n: Improve translators comments [1].
* Add missing translators comments.
* Fix placement of some translators comments.
  Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools.
  The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Patch `44360-src.2.diff` of the series.

Props garyj, alvarogois, michielatyoast
See #44360

git-svn-id: https://develop.svn.wordpress.org/trunk@43595 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 12:13:53 +00:00
Gary Pendergast
a75d153eee Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.



git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-17 01:50:26 +00:00
Gary Pendergast
cb3d1777b1 Coding Standards: Prepare for upgrading WPCS to 1.0.0.
In order to get the best result when running `phpcbf` across the codebase, there are some manual tweaks we need to make.

These fall into three categories:
- Fixing incorrectly indented code which has flow-on effects when auto-fixing.
- Tweaking the layout of inline PHP inside HTML tags.
- Moving more complex inline PHP inside HTML tags, to execute earlier.

See #44600.



git-svn-id: https://develop.svn.wordpress.org/trunk@43569 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-15 06:22:00 +00:00
John Blackbourn
ae69878202 Login and Registration: Pass the $errors parameter to the lost_password action.
Props sebakurzyn

Fixes #44512


git-svn-id: https://develop.svn.wordpress.org/trunk@43542 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-28 13:01:30 +00:00
Sergey Biryukov
2b539c3a91 Login and Registration: Set a better default value for $wp_error parameter in login_header().
To prevent someone from passing a string (which would not be added to a new `WP_Error` instance), check for `is_wp_error()` explicitly.

Props desrosj, chetan200891, spyderbytes, lbenicio, sebastien@thivinfo.com, abdullahramzan.
Fixes #44052.

git-svn-id: https://develop.svn.wordpress.org/trunk@43457 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 14:09:22 +00:00
Sergey Biryukov
0a56b67b52 Privacy: Update request confirmation notice text for clarity.
Props desrosj, melchoyce, garrett-eclipse.
Fixes #43970.

git-svn-id: https://develop.svn.wordpress.org/trunk@43232 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 20:52:54 +00:00
Ian Dunn
6e5a2e295c Privacy: Add policy link to login screen.
Personal data collection is more likely for registered users than casual visitors, and the privacy policy might have been updated since a user last logged in. Those changes could impact the collection of personal data from registered users, so it makes sense to provide a link to the policy before users log in.

Props voneff, xkon, melchoyce, chetan200891, desrosj.
Fixes #43721.


git-svn-id: https://develop.svn.wordpress.org/trunk@43120 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 19:48:01 +00:00
Andrew Ozz
e678d4ea6d Privacy: fix inconsistencies in new strings.
Props audrasjb.
Fixes #43925.

git-svn-id: https://develop.svn.wordpress.org/trunk@43118 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 18:41:10 +00:00
Andrew Ozz
11d594e3a8 Privacy: update the method to confirm user requests by email. Use a single CPT to store the requests and to allow logging/audit trail.
Props mikejolley.
See #43443.


git-svn-id: https://develop.svn.wordpress.org/trunk@43008 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-27 10:12:01 +00:00
Andrew Ozz
531abcbdd4 Privacy: fixes and updates for the method to confirm user requests by email.
- Improve function and variable names.
- Allow extra data to be passed with the request.
- Make the option/user meta names more consistent.
- Adds an inline comment explaining use of hash.

Props mikejolley.
See #43443.

git-svn-id: https://develop.svn.wordpress.org/trunk@42964 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-06 19:09:53 +00:00
Dominik Schilling (ocean90)
7a62871459 Login: Use wp_safe_redirect() when redirecting the login page if forced to use HTTPS.
git-svn-id: https://develop.svn.wordpress.org/trunk@42892 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 14:31:16 +00:00
Dominik Schilling (ocean90)
8df8cf2df1 Pinking shears.
See #41057.

git-svn-id: https://develop.svn.wordpress.org/trunk@42843 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 14:22:09 +00:00
Sergey Biryukov
1fddd69163 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.

git-svn-id: https://develop.svn.wordpress.org/trunk@42827 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-11 16:43:59 +00:00
Andrew Ozz
0005ad91d6 Add a method to confirm user requests by email. First run.
Props mikejolley.
See #43443.

git-svn-id: https://develop.svn.wordpress.org/trunk@42791 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-06 23:46:44 +00:00
Sergey Biryukov
1cc516f2e8 General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov.
Fixes #42742.

git-svn-id: https://develop.svn.wordpress.org/trunk@42761 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-27 02:30:46 +00:00
John Blackbourn
8f92dcf4a4 Login and Registration: Instruct the browser to disable autocapitalisation for the user login field on the login screen.
Props drywallbmb
Fixes #42886


git-svn-id: https://develop.svn.wordpress.org/trunk@42406 602fd350-edb4-49c9-b593-d223f7449a82
2017-12-16 13:40:31 +00:00
Gary Pendergast
8f95800d52 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-30 23:09:33 +00:00
Gary Pendergast
1eda9654da Login: Swap bloginfo() usage for get_bloginfo().
[41843] introduced a use of `bloginfo()`, where it should be using `get_bloginfo()`.

Props dlh.
Fixes #34625.



git-svn-id: https://develop.svn.wordpress.org/trunk@41850 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 02:09:42 +00:00