While NPM supports installing packages from git locations, this requires `git` to be in the path, which won't necessarily be true, particularly on Windows.
We can download the release versions for these packages, instead.
Fixes#47916.
Built from https://develop.svn.wordpress.org/trunk@45875
git-svn-id: http://core.svn.wordpress.org/trunk@45686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Only use the legacy WP timestamp approach (a sum of timestamp and timezone offset) for `timestamp` and `U` formats without the `$gmt` flag.
Otherwise, make sure the function returns correct local time for any format.
Props Rarst, jdgrimes.
Fixes#40653.
Built from https://develop.svn.wordpress.org/trunk@45856
git-svn-id: http://core.svn.wordpress.org/trunk@45667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `wp_timezone_string()` retrieves the timezone from current settings as a string. Uses the `timezone_string` option to get a proper timezone if available, otherwise falls back to an offset.
* `wp_timezone()` retrieves the timezone from current settings as a `DateTimeZone` object. Timezone can be based on a PHP timezone string or a `±HH:MM` offset.
Props Rarst, remcotolsma, johnjamesjacoby, rmccue.
Fixes#24730.
Built from https://develop.svn.wordpress.org/trunk@45853
git-svn-id: http://core.svn.wordpress.org/trunk@45664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously the sites were truncated which meant longer names but with ending identifications were unable to be seen as different. This shows the full site name to allow easier understanding.
Props tferry, melinedo, afercia, jeremyfelt
Fixes: 47112
Built from https://develop.svn.wordpress.org/trunk@45826
git-svn-id: http://core.svn.wordpress.org/trunk@45637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Docker Toolbox requires port forwarding to be configured, but generates error when trying to forward a port that's already been taken.
This change removes clashing port forwarding rules before adding our own.
See #47767.
Built from https://develop.svn.wordpress.org/trunk@45819
git-svn-id: http://core.svn.wordpress.org/trunk@45630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@45814
git-svn-id: http://core.svn.wordpress.org/trunk@45625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevents a non-sequential post type array such as [ 0 => 'post', 2 => 'page' ] from being improperly converted to an object in the taxonomy endpoint's response JSON.
Props TimothyBlynJacobs, birgire, spectacula.
Fixes#42209.
Built from https://develop.svn.wordpress.org/trunk@45813
git-svn-id: http://core.svn.wordpress.org/trunk@45624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Allowing the client to delete revisions breaks the "audit trail" functionality. This is not allowed in WordPress and shouldn't be allowed through the API.
While not recommended, a plugin may opt-in to the previous behavior by setting a custom 'delete_post' capability for the revisions post type.
Props dlh, danielbachhuber, TimothyBlynJacobs, azaozz, kadamwhite.
Fixes#43709.
Built from https://develop.svn.wordpress.org/trunk@45812
git-svn-id: http://core.svn.wordpress.org/trunk@45623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Caches the output of get_item_schema() to avoid redundant recomputation of translatable strings and other computed values. This method is called many times per item in each REST request, and the results of the method should not vary between calls.
Additional schema fields are not cached.
Props kadamwhite, joehoyle, TimothyBlynJacobs.
Fixes#47871.
Built from https://develop.svn.wordpress.org/trunk@45811
git-svn-id: http://core.svn.wordpress.org/trunk@45622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Status code 204 should indicate no response body is sent. Previously, a "null" string was sent, which MacOS Safari would try to parse as JSON and thereby fail to complete the request.
Props TimothyBlynJacobs, andizer, matthias.thiel.
Fixes#43691.
Built from https://develop.svn.wordpress.org/trunk@45809
git-svn-id: http://core.svn.wordpress.org/trunk@45620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Extends meta registration to support complex schema values, mirroring the functionality in the settings controller.
Error when trying to modify a meta key containing schema-nonconformant data.
Props @TimothyBlynJacobs, @birgire, @mnelson4, @flixos90.
Fixes#43392.
Built from https://develop.svn.wordpress.org/trunk@45807
git-svn-id: http://core.svn.wordpress.org/trunk@45618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@45805
git-svn-id: http://core.svn.wordpress.org/trunk@45616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@45801
git-svn-id: http://core.svn.wordpress.org/trunk@45612 1a063a9b-81f0-0310-95a4-ce76da25c4cd