Commit Graph

450 Commits

Author SHA1 Message Date
Jonny Harris
6d89ea8f09 Taxonomy: Fix caching issues in WP_Term_Query class.
Introduced [52836] when passing `child_of` or `pad_counts` parameters to `get_terms` or `WP_Term_Query` class, the array of terms received by the query, was not correctly cached. This 
change simplifies the logic in `WP_Term_Query` and ensures terms are correctly cached. This change also, improves performance, by only caching an array of term ids where possible.  

Props denishua, spacedmonkey, oztaser, peterwilsoncc, SergeyBiryukov, georgestephanis, jnz31, knutsp, mukesh27, costdev.
Fixes #55837.



git-svn-id: https://develop.svn.wordpress.org/trunk@53496 602fd350-edb4-49c9-b593-d223f7449a82
2022-06-14 11:41:33 +00:00
Sergey Biryukov
ae9e0bb74f Trunk is now 6.1-alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@53344 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 17:38:14 +00:00
Sergey Biryukov
64025d0abe Post WordPress 6.0 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53341 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 17:13:20 +00:00
Sergey Biryukov
6d93192ee9 WordPress 6.0 RC1
git-svn-id: https://develop.svn.wordpress.org/trunk@53340 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 16:44:39 +00:00
Sergey Biryukov
4558de543c Post WordPress 6.0 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53335 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 16:42:03 +00:00
Sergey Biryukov
74dd0397fc WordPress 6.0 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@53334 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 16:08:37 +00:00
Sergey Biryukov
4bc07ccb43 Post WordPress 6.0 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53290 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 16:36:59 +00:00
Sergey Biryukov
c70f640e3a WordPress 6.0 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@53289 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 16:14:15 +00:00
Sergey Biryukov
419e8248d6 Post WordPress 6.0 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53224 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 16:39:38 +00:00
Sergey Biryukov
e467197f4f WordPress 6.0 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@53223 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 16:12:34 +00:00
Sergey Biryukov
51fb7887e3 Post WordPress 6.0 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53167 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 19:03:42 +00:00
Sergey Biryukov
b039058669 WordPress 6.0 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@53166 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 18:13:18 +00:00
Sergey Biryukov
1ba5187119 Trunk is now 6.0-alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@52448 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-04 20:52:38 +00:00
Sergey Biryukov
96713b9292 Post WordPress 5.9 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@52446 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-04 20:39:55 +00:00
Sergey Biryukov
5d03c091fc WordPress 5.9 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@52445 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-04 20:13:33 +00:00
Sergey Biryukov
e45483fe8a Post WordPress 5.9 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@52408 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 21:13:13 +00:00
Sergey Biryukov
63a2a71068 WordPress 5.9 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@52407 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 20:31:45 +00:00
Sergey Biryukov
9792783bdd Post WordPress 5.9 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@52379 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-14 21:23:02 +00:00
Sergey Biryukov
ffa47c8df4 WordPress 5.9 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@52378 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-14 20:24:41 +00:00
Sergey Biryukov
be006b0c55 Post WordPress 5.9 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@52344 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-07 21:56:28 +00:00
Sergey Biryukov
0e13a6add1 WordPress 5.9 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@52343 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-07 21:19:26 +00:00
Sergey Biryukov
b94ce528fc Post WordPress 5.9 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@52296 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-30 23:32:40 +00:00
Sergey Biryukov
48a3e5f131 WordPress 5.9 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@52295 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-30 21:35:01 +00:00
Tonya Mork
ac18b68a32 Cron: Remove errant false values in cron array when upgrading to 5.9+.
[51916] fixed a bug where `array( `false` )` was added to the cron array when `_get_cron_array()` returned `false`. 

This commit:
* Removes any `false` values from the cron array when upgrading to 5.9+.
* Bumps the database version.

Follow-up to [44917], [51916].

Props peterwilsoncc, jrf.
See #53950.

git-svn-id: https://develop.svn.wordpress.org/trunk@51917 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-18 13:29:47 +00:00
Sergey Biryukov
f98b284768 Docs: Update description for the $wp_version global.
In addition to holding the version number, the WordPress version string is used to bust caches and to enable development mode for scripts when running from the `/src` directory.

Follow-up to [803], [2585], [6554], [47230].

Props muhammadfaizanhaidar, azaozz.
Fixes #53413.

git-svn-id: https://develop.svn.wordpress.org/trunk@51809 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-14 17:30:48 +00:00
Jonathan Desrosiers
a749bada78 Post branching 5.8 version bump.
`trunk` is now `5.9-alpha`.

git-svn-id: https://develop.svn.wordpress.org/trunk@51272 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 03:54:44 +00:00
Jonathan Desrosiers
47b4353470 Post WordPress 5.8 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@51270 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 03:43:41 +00:00
Jonathan Desrosiers
fd3e1b346b WordPress 5.8 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@51269 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 03:15:39 +00:00
Aaron Jorbin
3c57ccf1b4 Post WordPress 5.8 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@51243 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 17:09:17 +00:00
Aaron Jorbin
043ddf9cbd WordPress 5.8 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@51242 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 16:48:50 +00:00
Jonathan Desrosiers
e38e743902 Post WordPress 5.8 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@51218 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-23 02:14:02 +00:00
Jonathan Desrosiers
39c8eee6c1 WordPress 5.8 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@51217 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-23 01:44:40 +00:00
Sergey Biryukov
f14b45a57e Docs: Correct @since version in the wp-includes/version.php file header.
There was no public release of WordPress 1.1.

Follow-up to [803], [43662].

See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@51188 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-21 04:28:32 +00:00
Jonathan Desrosiers
5bf13be488 Post WordPress 5.8 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@51165 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 18:04:44 +00:00
Jonathan Desrosiers
59d2ddab14 WordPress 5.8 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@51164 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 17:39:34 +00:00
Jonathan Desrosiers
676fb1bc18 Post WordPress 5.8 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@51132 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 02:39:44 +00:00
Jonathan Desrosiers
1707206579 WordPress 5.8 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@51131 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 02:01:05 +00:00
Jonathan Desrosiers
f2ca1e00d8 trunk is now 5.8 alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@50427 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 21:04:02 +00:00
Jonathan Desrosiers
e2e0ff05c2 Post WordPress 5.7 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@50425 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 20:52:59 +00:00
Jonathan Desrosiers
886d9fe6e0 WordPress 5.7 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@50424 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 20:38:08 +00:00
John Blackbourn
6299c30506 Post WordPress 5.7 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@50369 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-16 21:18:06 +00:00
John Blackbourn
21c5666fce WordPress 5.7 beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@50368 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-16 20:55:10 +00:00
Jonathan Desrosiers
26b3fa70a3 Post WordPress 5.7 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@50281 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 20:38:37 +00:00
Jonathan Desrosiers
c351ffcb1c WordPress 5.7 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@50280 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 20:24:56 +00:00
Sergey Biryukov
3c3590103a Post WordPress 5.7 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@50172 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 22:21:52 +00:00
Sergey Biryukov
2f8657c858 WordPress 5.7 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@50171 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 22:04:54 +00:00
Sergey Biryukov
c145ff4a1a 5.7-alpha-50000 🎉🙌❤️
Thank you for the past
Excited for the future
We are #WordPressStrong!

git-svn-id: https://develop.svn.wordpress.org/trunk@50000 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-21 12:37:39 +00:00
Timothy Jacobs
38361be8e6 App Passwords: Prevent conflicts when Basic Auth is already used by the site.
Application Passwords uses Basic Authentication to transfer authentication details. If the site is already using Basic Auth, for instance to implement a private staging environment, then the REST API will treat this as an authentication attempt and would end up generating an error for any REST API request.

Now, Application Password authentication will only be attempted if Application Passwords is in use by a site. This is flagged by setting an option whenever an Application Password is created. An upgrade routine is added to set this option if any App Passwords already exist.

Lastly, creating an Application Password will be prevented if the site appears to already be using Basic Authentication.

Props chexwarrior, georgestephanis, adamsilverstein, helen, Clorith, marybaum, TimothyBlynJacobs.
Fixes #51939.



git-svn-id: https://develop.svn.wordpress.org/trunk@49752 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-04 21:42:52 +00:00
Ian Dunn
cac678f807 Multisite: Cache absolute dirsize paths to avoid PHP 8 fatal.
r49212 greatly improved the performance of `get_dirsize()`, but also changed the structure of the data stored in the `dirsize_cache` transient. It stored relative paths instead of absolute ones, and also removed the unnecessary `size` array.

That difference in data structures led to a fatal error in the following environment:

* PHP 8
* Multisite
* A custom `WP_CONTENT_DIR` which is not a child of WP's `ABSPATH` folder (e.g., [https://roots.io/bedrock/ Bedrock])
* The `upload_space_check_disabled` option set to `0`

After upgrading to WP 5.6, the `dirsize_cache` transient still had data in the old format. When `wp-admin.php/index.php` was visited, `get_space_used()` received an `array` instead of an `int`, and tried to divide it by another `int`. PHP 7 would silently cast the arguments to match data types, but [https://wiki.php.net/rfc/arithmetic_operator_type_checks PHP 8 throws a fatal error]: 

`Uncaught TypeError: Unsupported operand types: array / int`

`recurse_dirsize()` was using `ABSPATH` to convert the absolute paths to relative ones, but some upload locations are not located under `ABSPATH`. In those cases, `$directory` and `$cache_path` were identical, and that triggered the early return of the old `array`, instead of the expected `int`. 

In order to avoid that, this commit restores the absolute paths, but without the `size` array. It also adds a type check when returning cached values. Using absolute paths without `size` has the result of overwriting the old data, so that it matches the new format. The type check and upgrade routine are additional safety measures.

Props peterwilsoncc, janthiel, helen, hellofromtonya, francina, pbiron.
Fixes #51913. See #19879.



git-svn-id: https://develop.svn.wordpress.org/trunk@49744 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-03 20:37:43 +00:00
Helen Hou-Sandi
b73f9fc5f6 Trunk is now 5.7-alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@49644 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-17 22:50:57 +00:00