Commit Graph

6342 Commits

Author SHA1 Message Date
Andrea Fercia e12f3793d5 Accessibility: Audit usage of abbreviations.
Title attributes on abbreviations are only available to a minority of users. The
best option is to avoid unnecessary abbreviations when possible. In the other cases,
use an `<abbr>` element (which provides a hint to user agents on how to announce
and display the abbreviation) and provide an expansion in plain text on first use.

- `readme.html`: improves abbreviations and removes unnecessary `title` attributes
- options-general: removes unnecessary abbreviations and improves the remaining ones
- customizer schedule changeset date: removes unnecessary abbreviations and improves the remaining ones
- posts table date: uses a `span` element instead of an `abbr` element because this is not an abbreviation

Fixes #46980.


git-svn-id: https://develop.svn.wordpress.org/trunk@45930 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-02 21:43:39 +00:00
Sergey Biryukov d0db5be1fe I18N: Split translatable strings located on the same line preceded with a translator comment, where the first string needs that comment, but the second does not.
Props johnbillion.
See #44360.

git-svn-id: https://develop.svn.wordpress.org/trunk@45927 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-02 00:42:01 +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
Sergey Biryukov 3a0faad226 Docs: Simplify `get_plugin_data()` and `get_file_data()` description.
See #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45917 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-30 16:56:39 +00:00
Sergey Biryukov b36feb1b5d Docs: Update plugin headers example in `get_plugin_data()` to clarify that `Version` is not a required field.
Props casiepa.
See #47110, #meta4707.

git-svn-id: https://develop.svn.wordpress.org/trunk@45916 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-30 16:15:32 +00:00
John Blackbourn ab7c365819 Docs: Correct and improve inline docs relating to caching, terms, meta, and some misc tweaks.
See #47110   


git-svn-id: https://develop.svn.wordpress.org/trunk@45915 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-30 11:34:11 +00:00
Sergey Biryukov 07ec966f17 I18N: Add missing translator comment in help text on Reading Settings screen.
Props garrett-eclipse.
See #46708.

git-svn-id: https://develop.svn.wordpress.org/trunk@45913 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-29 21:36:00 +00:00
Sergey Biryukov e9d1a9a539 Administration: Add a note to "For each post in a feed, include [Full text / Summary]" option that how content is displayed in browsers depends on the theme.
Add a documentation link to learn more about feeds.

Props JarretC, SergeyBiryukov, pento, talldanwp, dinhtungdu, noisysocks, tobifjellner.
Fixes #46708.

git-svn-id: https://develop.svn.wordpress.org/trunk@45912 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-29 21:24:46 +00:00
Felix Arntz 4572bb0988 Multisite: Improve performance by caching not found lookups for sites and networks.
With this change, the result of a site or network lookup by ID will be cached even if the ID does not exist. When a new site or network is created, the cache for the respective new ID is cleared.

Props mnelson4, nielsdeblaauw.
Fixes #42251.


git-svn-id: https://develop.svn.wordpress.org/trunk@45910 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-29 12:41:45 +00:00
Mike Schroder 65f3124283 Administration: Output valid HTML when `wp_die()` is called.
To better support HTML and string calls to `wp_die()` without
outputting invalid HTML, wraps error messages in `<div>` rather than `<p>`.

Adds `.wp-die-message` CSS class for styling.

Props dinhtungdu, jeremyfelt, audrasjb, SergeyBiryukov, afercia, audrasjb, noisysocks.
Fixes #47580.

git-svn-id: https://develop.svn.wordpress.org/trunk@45909 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-29 07:52:43 +00:00
Sergey Biryukov 5a1e3649c4 Site Health: Merge two similar strings explaining what drop-in plugins are.
Props garrett-eclipse, ramiy, Clorith.
Fixes #47247.

git-svn-id: https://develop.svn.wordpress.org/trunk@45905 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-28 03:12:09 +00:00
Sergey Biryukov 83efbc67e3 Site Health: Standardize on `SELECT VERSION()` query for checking the database server version, due to the MariaDB version declaration potentially causing issues in production environments.
Partially reverts [45691].

Props Clorith.
Fixes #47738.

git-svn-id: https://develop.svn.wordpress.org/trunk@45904 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-28 03:07:59 +00:00
Sergey Biryukov 252e14ac27 Menus: In `wp_setup_nav_menu_item()` and `Walker_Nav_Menu_Edit::start_el()`, check if the post or term associated with the menu item still exists to avoid a PHP notice.
If the associated post or term no longer exists, mark the menu item as invalid.

Props mehulkaklotar, kamrankhorsandi, cristiano.zanca, SergeyBiryukov.
Fixes #31703.

git-svn-id: https://develop.svn.wordpress.org/trunk@45891 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-25 21:31:43 +00:00
Sergey Biryukov 7ef2679ec7 Users: Adjust [45806] to make sure `$all_userids` is always defined.
Props kbrownkd.
Fixes #47936.

git-svn-id: https://develop.svn.wordpress.org/trunk@45890 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-25 20:02:31 +00:00
Sergey Biryukov 2e1de7309c Site Health: Add timezone to Site Health Info page.
Props justinahinon, sharaz, artisticasad, Rarst.
Fixes #47842.

git-svn-id: https://develop.svn.wordpress.org/trunk@45889 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-24 19:36:33 +00:00
Sergey Biryukov b975a251ff Date/Time: Simplify the date comparing logic in `WP_Community_Events::trim_events()`.
The Events API returns event date without timezone information, so trying to parse it into a timestamp and compare to a WP timestamp is pointless.

Props Rarst.
Fixes #47463.

git-svn-id: https://develop.svn.wordpress.org/trunk@45886 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-23 02:14:07 +00:00
Sergey Biryukov 1c66cf519b Date/Time: Introduce `current_datetime()` for better time operations.
Returning a `DateTimeImmutable` representation of the current moment in time, this allows for a more flexible and reliable use than `current_time()` provides.

Props Rarst.
Fixes #47464.

git-svn-id: https://develop.svn.wordpress.org/trunk@45883 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-23 01:11:22 +00:00
Jonathan Desrosiers 0847b67b13 Coding Standards: Dynamic hooks should be named using interpolation not concatenation.
Props arena, desrosj.
Fixes #47052.

git-svn-id: https://develop.svn.wordpress.org/trunk@45881 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-22 19:07:57 +00:00
Sergey Biryukov 7fbabd505d Administration: Adjust [45814] to address a backward compatibility issue for plugins passing multiple CSS classes to `add_settings_error()`.
Only add the `notice-` prefix for `error`, `success`, `warning`, `info` CSS classes, keep other classes as is.

Add unit tests for `settings_errors()`.

Props afercia, SergeyBiryukov.
Fixes #44941.

git-svn-id: https://develop.svn.wordpress.org/trunk@45873 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-22 00:21:49 +00:00
Sergey Biryukov 7b14e0c349 Docs: Fix typo in `_wp_make_subsizes()` DocBlock.
Props itowhid06.
Fixes #47913. See #40439.

git-svn-id: https://develop.svn.wordpress.org/trunk@45871 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-21 16:22:49 +00:00
Sergey Biryukov 95c36ce5ba Privacy: Add descriptions for sections in a personal data export file.
Props garrett-eclipse, Venutius, karmatosed.
Fixes #45491.

git-svn-id: https://develop.svn.wordpress.org/trunk@45825 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-18 02:07:00 +00:00
Sergey Biryukov 6f30523ce9 Plugins: Adjust margin for plugin headings on "Add Plugins" screen to avoid overlapping with "Network Activate" button.
Props justinahinon, chetan200891.
Fixes #47600.

git-svn-id: https://develop.svn.wordpress.org/trunk@45824 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-17 14:33:01 +00:00
Sergey Biryukov f3241f4883 Administration: Replace legacy `updated` message type in `add_settings_error()` calls with `success`.
See #44640.

git-svn-id: https://develop.svn.wordpress.org/trunk@45818 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-16 00:38:42 +00:00
Sergey Biryukov 7113ab1f51 Administration: In `add_settings_error()`, add `warning` and `info` as possible values for message type.
Account for these new values in `settings_errors()`, resulting in `notice-warning` and `notice-info` CSS classes.

Map legacy `error` and `updated` CSS classes to `notice-error` and `notice-success`.

Props donmhico, toddhalfpenny, flixos90, desrosj, javorszky, SergeyBiryukov.
Fixes #44640, #44941.

git-svn-id: https://develop.svn.wordpress.org/trunk@45814 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-15 23:00:38 +00:00
Sergey Biryukov a636529b7c Users: When deleting users, exclude the current user from the content existence check.
The current user cannot be deleted, so the check is redundant in that context and should only be done for other users.

Props mt8.biz, SergeyBiryukov.
Fixes #47851.

git-svn-id: https://develop.svn.wordpress.org/trunk@45806 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-15 13:05:39 +00:00
Gary Pendergast 9c3fb72719 Schema: Add an index to `wp_options.autoload`.
Most sites will be unaffected by this change, but those with a large number of rows in `wp_options`, only a small number of which have `autoload` set, will see a significant performance improvement.

Sites with a large number of rows in `wp_options`, with many of them having `autoload` set will unfortunately see a performance penalty on top of the already very slow queries they're running, but this should be the minority of cases.

Props DanBUK.
Fixes #24044.


git-svn-id: https://develop.svn.wordpress.org/trunk@45805 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-15 07:12:04 +00:00
Sergey Biryukov e982455e44 Networks and Sites: Trim site domain when creating a new site on Add New Site screen before further validation.
Props dharmin16, jeremyfelt, aubreypwd.
Fixes #44808.

git-svn-id: https://develop.svn.wordpress.org/trunk@45804 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-15 01:20:52 +00:00
Sergey Biryukov 4f86944a09 Docs: Add missing `@since` tag for `WP_Site_Health::has_late_cron()`.
See #47223.

git-svn-id: https://develop.svn.wordpress.org/trunk@45803 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-15 00:41:25 +00:00
Peter Wilson f29952ab74 Site Health Check: Increase time allowance for cron checks.
Introduces `WP_Site_Health::has_late_cron()` for late wp-cron jobs and extends the time allowance before a job is considered missed.

In a standard configuration using loopback requests, a job is considered late once past due and missed over five minutes past due.

Late and missed time frames are extended if `DISABLE_WP_CRON` is defined as `true` to allow for crontab tasks running less frequently. A job is considered late once it's 15 minutes past due and missed over one hour past due.

A file for site health unit tests has been introduced with tests for cron in critical, late and missed states.

Props rockfire, afragen, peterwilsoncc.
Fixes #47223.


git-svn-id: https://develop.svn.wordpress.org/trunk@45801 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-15 00:34:53 +00:00
Sergey Biryukov ee1159c4fe Site Health: Simplify the language in Status Health Info page introduction, add a link to Status page.
Props birgire, mukesh27, subrataemfluence, leogermani.
Fixes #46946.

git-svn-id: https://develop.svn.wordpress.org/trunk@45791 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-13 23:34:53 +00:00
Andrew Ozz 9a20a07304 Remove trailing white space in upgrade.php.
See #46349.

git-svn-id: https://develop.svn.wordpress.org/trunk@45789 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-13 19:52:50 +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
Sergey Biryukov 83eb411e27 Site Health: Add database charset and collation information to debug info.
Props sharaz, Clorith, SergeyBiryukov.
Fixes #47828.

git-svn-id: https://develop.svn.wordpress.org/trunk@45782 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-12 01:53:17 +00:00
Sergey Biryukov 3008781746 Bootstrap/Load: Change "Insufficient Requirements" `wp_die()` heading to "Requirements Not Met", which is more appropriate for the context it's used in.
Props yoavf.
Fixes #47575.

git-svn-id: https://develop.svn.wordpress.org/trunk@45770 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-08 12:53:21 +00:00
Sergey Biryukov 98642e4893 Administration: Show a warning in Reading Settings when a Privacy Policy page is accidentally set as a Homepage or Posts page.
Props garrett-eclipse, subrataemfluence.
Fixes #46831.

git-svn-id: https://develop.svn.wordpress.org/trunk@45766 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-07 23:02:43 +00:00
Sergey Biryukov 10e13daccb Coding Standards: Use strict comparison in `wp-admin/edit.php`.
Props davidbaumwald.
Fixes #47201.

git-svn-id: https://develop.svn.wordpress.org/trunk@45759 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-07 11:40:00 +00:00
Andrew Ozz 93aa98ce42 Remove trailing white space in upgrade.php after [45757].
See #46349.

git-svn-id: https://develop.svn.wordpress.org/trunk@45758 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-07 01:00: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
Sergey Biryukov bab0d4ee9b Administration: Correct "Quick Edit" link height in list tables for consistency with other action links.
Props jobthomas, burhandodhy.
Fixes #47815.

git-svn-id: https://develop.svn.wordpress.org/trunk@45756 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-05 22:19:10 +00:00
Sergey Biryukov 7b11f12d96 Coding Standards: Use strict comparison in `wp-admin/options-reading.php`.
Props subrataemfluence.
Fixes #46834.

git-svn-id: https://develop.svn.wordpress.org/trunk@45752 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-05 12:51:33 +00:00
Sergey Biryukov c68927e509 Plugins: Use `include_once` for `wp-admin/includes/plugin-install.php` in `WP_Plugin_Install_List_Table::prepare_items()`.
This brings consistency with the other instances where the file is included, and allows for reusing its functions in custom code.

Props engelen, desrosj.
Fixes #38874.

git-svn-id: https://develop.svn.wordpress.org/trunk@45751 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-05 11:06:27 +00:00
Sergey Biryukov 3f2e265174 Site Health: Use correct variable when checking PHP requirements for a plugin update in `WP_Plugins_List_Table::single_row()`.
Props diddledan, sharaz, vaishalipanchal.
Fixes #47835.

git-svn-id: https://develop.svn.wordpress.org/trunk@45750 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-05 10:57:04 +00:00
Sergey Biryukov 62f6907bfa Upgrade/Install: Make sure `translate_level_to_role()` always returns a value.
Props diddledan.
Fixes #46848.

git-svn-id: https://develop.svn.wordpress.org/trunk@45747 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-05 07:47:43 +00:00
Sergey Biryukov b536f1de0b Administration: Display a warning at the top of "All Settings" screen.
Props zodiac1978, donmhico, pixolin.
Fixes #47718.

git-svn-id: https://develop.svn.wordpress.org/trunk@45743 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-04 13:02:58 +00:00
Sergey Biryukov 7a6f44b979 Docs: Add missing description for `$post` global.
Props immeet94.
Fixes #46503. See #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45742 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-04 12:27:02 +00:00
Sergey Biryukov a7b20de958 Docs: Add missing description for `$current_screen` global.
Props mukesh27.
Fixes #45604. See #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45740 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-04 02:02:10 +00:00
Sergey Biryukov d19f4d7ff4 Docs: Add missing description for `$wp_query` and `$wp_the_query` globals.
Props mukesh27.
See #45604, #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45739 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-04 01:58:03 +00:00
Sergey Biryukov 1e6420ba55 Docs: Add missing description for `$wp_locale` global.
Props mukesh27.
See #45604, #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45737 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-04 01:45:03 +00:00
Sergey Biryukov 9c1123fb26 Docs: Add missing description for `$wp_rewrite` global.
See #45604, #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45735 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-04 01:18:54 +00:00
SergeyBiryukov cb1d21191d Docs: Add missing description for `$wpdb`, `$wp_db_version`, and `$wp_current_db_version` globals.
Props mukesh27, utsav72640, immeet94, SergeyBiryukov.
See #45604.

git-svn-id: https://develop.svn.wordpress.org/trunk@45734 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-04 01:11:01 +00:00