43463 Commits

Author SHA1 Message Date
Jonathan Desrosiers
f97b2c61fd Help/About: Clarify a string about lazy-loading iframes.
Props davidbaumwald, audrasjb, hellofromTonya.
See #52347.

git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50492 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-04 16:44:17 +00:00
Robert Anderson
7dcd4fe33d Block Editor: Fix color support for dynamic blocks
Changes wp_apply_colors_support to check for for color instead of
experimentalColor when determining block support for color.

Props nosolosw, rafhun, youknowriad.
See #52709.


git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50489 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-03 23:31:26 +00:00
Jonathan Desrosiers
9bacecfe03 Post WordPress 5.7 RC2 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50482 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-02 20:45:53 +00:00
Jonathan Desrosiers
85e88cbddb WordPress 5.7 RC2.
git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50481 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-02 20:31:47 +00:00
Kelly Choyce-Dwan
5bab5d2994 Help/About: Iterate on the 5.7 About Page.
Adds a more obviously interactive comparison for viewing the color scheme differences. Improvements on RTL and IE11. Update strings to be more clear and consistent. Switch to the CDN for loading images.

Props sarahricker, desrosj, melchoyce, SergeyBiryukov, tikifez, clorith, marybaum, audrasjb, francina, hellofromTonya.
Reviewed by SergeyBiryukov.
Merges [50478] to the 5.7 branch.
Fixes #52693. See #52347.



git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50480 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-02 20:12:19 +00:00
Mike Schroder
61537d911a Upgrade/Install: Invalidate OPcache for version.php during update.
Invalidate OPcache for wp-content/version.php on update individually, since it's copied separately.

Props stodorovic, krstarica, cenay, desrosj, pbiron, sergeybiryukov, mikeschroder.

Reviewed by mikeschroder, SergeyBiryukov.
Merges [50460] and [50475] to the 5.7 branch.
Fixes #51686, #51281.
See #36455.




git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50477 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-02 18:19:42 +00:00
Sergey Biryukov
da266e6ca5 Security, Site Health: Do not store HTTPS request error messages in an option.
This changes the logic in `update_https_detection_errors()` to never store error messages from the actual request since they could use a different encoding, which would make storing them in an option potentially fail, leading WordPress to then falsely assume that HTTPS is supported.

While this doesn't actually fix the encoding issue, it is not crucial to do so anyway, since these messages are not used anywhere. A simple differentiation between whether the overall HTTPS request or only the SSL verification failed should be sufficient for the purpose of this function.

Props flixos90, tmatsuur, lukecarbis.
Reviewed by flixos90, SergeyBiryukov.
Merges [50471] to the 5.7 branch.
Fixes #52484.

git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50472 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-02 15:14:09 +00:00
Sergey Biryukov
582df45458 REST API: Correct error code for the maxItems keyword.
Follow-up to [50007].

Props TimothyBlynJacobs.
Reviewed by desrosj, SergeyBiryukov.
Merges [50461] to the 5.7 branch.
Fixes #52317.

git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50470 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-02 12:53:12 +00:00
Sergey Biryukov
04c2acb024 Twenty Twenty-One: Correct inner container background color for Cover Blocks.
Adjust the background color palette rules so they don't show up on inner containers when they're not supposed to:
- When an inner container block is present, it only applies them to direct children of the block with the background color assigned.
- Since the background color should only be applied to the Cover block's overlay, not to the inner container, it opts that specific block out of this rule.

Props dianeco, kjellr, paaljoachim.
Reviewed by ryelle, SergeyBiryukov.
Merges [50466] to the 5.7 branch.
Fixes #52676.

git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50469 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-02 12:50:05 +00:00
Sergey Biryukov
c0f15dc19b Twenty Fifteen & Twenty Sixteen: Remove extra space around post editor.
The editor uses the full height of its container, so the added margins cause the visual editor to break out of the container. This removes the top & bottom margins, and makes the left & right margins consistent with the meta box area.

Props antonlukin, paaljoachim, felipeelia.
Reviewed by ryelle, SergeyBiryukov.
Merges [50465] to the 5.7 branch.
Fixes #52646.

git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50468 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-02 12:45:42 +00:00
Robert Anderson
d0ca6fc35e Editor: Update @wordpress npm packages
Update @wordpress npm packages to the latest published versions. This includes
block editor bug fixes for WordPress 5.7 RC 2.

Fixes #52680.


git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50467 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-02 00:44:06 +00:00
John Blackbourn
cc13009e99 Build/Test Tools: PHPUnit test improvements:
* Switch back to running the PHPUnit test suite against the `src` directory instead of `build`
* Increase the reliability of backing up the `mu-plugins` directory during tests
* Split the PHPUnit tests for PHP versions below 7.0 in half, allowing them to run in parallel and reduce the overall test run duration on GitHub Actions

Merges [50441-50444] to the 5.7 branch.

Fixes #51734, #51735, #52645


git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50464 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-01 20:21:23 +00:00
Peter Wilson
7af02944ff External Libraries: Install jQuery via NPM.
Previously, jQuery 1.12.4 was added to the WordPress SVN repo in order to backport an upstream security patch from jQuery 3.4.0.

Now that WordPress includes an unmodified version of jQuery 3.5.1 and no longer needs to maintain a fork, it can be removed from the SVN repo and installed via NPM again as part of the build.

Follow-up to [45342], [49101].

Props peterwilsoncc, SergeyBiryukov.
Merges [50445] to the 5.7 branch.
Fixes #52647.



git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50457 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-01 00:52:11 +00:00
Sergey Biryukov
186b3faecf Users: Use localized site title for password reset emails.
When sending password reset emails, switch to the user's locale prior to obtaining the site title to allow for plugins filtering based on locale.

Follow up to [50129,50139-50141,50152,50415].

Props chouby.
Merges [50439] to the 5.7 branch.
Fixes #52605. See #34281.

git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50440 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-26 11:15:54 +00:00
Peter Wilson
12955c4205 Help/About: Remove extra space in the 5.7 About page copy.
Props tobifjellner, audrasjb, desrosj, ryelle.
Merges [50430] to the 5.7 branch.
Fixes #52632.


git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50438 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-25 23:35:07 +00:00
Peter Wilson
4639c48bd8 Administration: Revert the change to click event handler for fly-out submenus.
The `click()` method there is not the jQuery method, but is an HTML DOM method instead.

This makes the fly-out submenu header clickable again when the menu is folded.

Follow-up to [50420].

Props peterwilsoncc, SergeyBiryukov.
Merges [50429] to the 5.7 branch.
Fixes #52638. See #51812.


git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50437 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-25 22:50:47 +00:00
Jonathan Desrosiers
e66199a1e8 Security: Update the Security Policy to include WordPress 5.7.
Reviewed by desrosj, SergeyBiryukov.
Merges [50428] to the 5.7 branch.
Fixes #52633.

git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50431 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-24 15:55:41 +00:00
Jonathan Desrosiers
c568e950a9 Branch 5.7
git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50426 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 21:01:11 +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
adamsilverstein
e4ce30bfca Twenty Twenty-One: Improve transparent PNG logo visible on focus.
This ensures a transparent logo remains visible while focused. Also cleans up dark mode CSS, consolidating styles and removing overrides that are no longer needed.

Follow up to [50154].

Props poena, sabernhardt, ryelle.
Fixes #52257.



git-svn-id: https://develop.svn.wordpress.org/trunk@50423 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 20:15:02 +00:00
Sergey Biryukov
1926a14489 Users: Only include the IP address in password reset email if the user is not logged in.
This avoids unnecessarily disclosing the IP address when sending a password reset link to another user from the admin.

Follow-up to [49255], [50129].

Props carike, audrasjb, gmariani405, Ipstenu.
See #34281.

git-svn-id: https://develop.svn.wordpress.org/trunk@50422 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 20:06:40 +00:00
Jonathan Desrosiers
1b2ec3ecc7 Build/Test Tools: Add a missing word to the CONTRIBUTING.md file.
Follow up to [50417].

Props kraftbj.
See #33043.

git-svn-id: https://develop.svn.wordpress.org/trunk@50421 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 19:59:20 +00:00
Sergey Biryukov
69751046d6 External Libraries: Further fix jQuery deprecations in WordPress core.
This includes many minor adjustments to a wide array of core files to replace shorthands with full declarations.

Follow-up to [50001], [50270], [50367].

Props Clorith, hellofromTonya, peterwilsoncc, adamsilverstein, aristath.
See #51812.

git-svn-id: https://develop.svn.wordpress.org/trunk@50420 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 19:43:23 +00:00
Sergey Biryukov
0a2ba7cb29 Docs: Improve documentation for WP_Block_Type properties.
Add a reference to `WP_Block_Type::__construct()` for information on accepted arguments in `register_block_type()`.

Synchronize the documentation between several places, use `WP_Block_Type::__construct()` as the canonical source.

Props ediamin, audrasjb, peterwilsoncc.
Fixes #48640.

git-svn-id: https://develop.svn.wordpress.org/trunk@50419 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 19:16:26 +00:00
Kelly Choyce-Dwan
666bdbb011 Help/About: WordPress 5.7 About Page.
This is the start of the WordPress 5.7 about page.

Props audrasjb, metalandcoffee, melchoyce, hedgefield, francina, webcommsat, lukecarbis, meher, sarahricker, marybaum.
See #52347.



git-svn-id: https://develop.svn.wordpress.org/trunk@50418 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 18:39:13 +00:00
Jonathan Desrosiers
765bf1f6cc Build/Test Tools: Introduce a CONTRIBUTING.md file.
This file is used on GitHub to communicate important details about the best way to contribute to a project.

Props ad7six, boonebgorges, netweb, noisysocks, kraftbj.
Fixes #33043.

git-svn-id: https://develop.svn.wordpress.org/trunk@50417 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 16:50:05 +00:00
Jonathan Desrosiers
06cae965b9 Build/Test Tools: Update NPM dependencies.
This updates two `devDependencies`:

- `uglify-js` from `3.12.7` to `3.12.8`.
- `sassn` from `1.32.6` to `1.32.8`.

See #51801.

git-svn-id: https://develop.svn.wordpress.org/trunk@50416 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 16:43:03 +00:00
Jonathan Desrosiers
9b160263da Users: Ensure reset password emails are in the receiving user’s locale.
This ensures that reset password emails initiated by an administrator are sent to the user in their preferred locale.

Follow up to [50129,50139-50141,50152].

Props chouby, davidbaumwald, audrasjb, johnbillion.
Fixes #52605. See #34281.

git-svn-id: https://develop.svn.wordpress.org/trunk@50415 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 16:37:01 +00:00
Jonathan Desrosiers
4c046a1bfd Build/Test Tools: Update the package lock file.
This commits a change that results from running `npm install`.

See #51801.

git-svn-id: https://develop.svn.wordpress.org/trunk@50414 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 16:29:21 +00:00
Jonathan Desrosiers
da710d81e5 Build/Test Tools: Stop running the restapi-jsclient tests separately.
This group is not specified in the list of excluded groups within the test configuration file, so they already run as part of the main test suite.

Props johnbillion.
Fixes #52608.

git-svn-id: https://develop.svn.wordpress.org/trunk@50413 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 15:45:45 +00:00
Sergey Biryukov
63fd7102eb Users: Give the Password Reset table row its own wrapper class.
Previously, the class of the Sessions table row was duplicated.

Follow-up to [50129], [50411].

See #52597.

git-svn-id: https://develop.svn.wordpress.org/trunk@50412 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 14:33:07 +00:00
Sergey Biryukov
3bf334edaa Users: Relocate the Password Reset feature to the Account Management section.
Follow-up to [50129].

Props mukesh27, audrasjb, hellofromTonya.
Fixes #52597.

git-svn-id: https://develop.svn.wordpress.org/trunk@50411 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 14:20:01 +00:00
Sergey Biryukov
d7ddc7a81e External Libraries: Correct click event handling in the Thickbox library.
Follow-up to [50367], [50383].

Props peterwilsoncc.
Fixes #52618. See #51812.

git-svn-id: https://develop.svn.wordpress.org/trunk@50410 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 10:52:12 +00:00
Peter Wilson
db9c95a056 Security: move Content-Security-Policy script loaders.
Move `wp_get_script_tag()`, `wp_print_script_tag()`, `wp_print_inline_script_tag()` and `wp_get_inline_script_tag()` functions from `functions.php` to `script-loader.php`.

Relocate related tests to `dependencies` sub-directory.

Follow up to [50167].
Props adamsilverstein, hellofromTonya, SergeyBiryukov.
Fixes #39941.


git-svn-id: https://develop.svn.wordpress.org/trunk@50409 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-23 01:58:21 +00:00
Peter Wilson
50639dbad6 Script Loader: Prevent wp_localize_script() warnings.
Prevent `wp_localize_script()` (via `WP_Scripts::localize()`) throwing warnings in PHP 8 when the translation data is passed as a string. This maintains backward compatibility with earlier versions of PHP.

Introduce a `_doing_it_wrong()` notice to `WP_Scripts::localize()` if the translation data is not passed as an array.

Props jrf, peterwilsoncc, SergeyBiryukov.
Fixes #52534.


git-svn-id: https://develop.svn.wordpress.org/trunk@50408 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-22 23:21:56 +00:00
Sergey Biryukov
aaf3fc57fc Docs: Document the usage of $pagenow global in a few functions.
See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@50407 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-22 19:16:07 +00:00
Sergey Biryukov
cebbabbe21 Media: Explicitly declare the $pagenow global in wp_get_attachment_url().
This avoids an "Undefined index" PHP notice in the function when running the `media` test group separately.

Follow-up to [32342], [50156], [50164], [50393].

Props johnbillion.
Fixes #52606.

git-svn-id: https://develop.svn.wordpress.org/trunk@50406 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-22 18:53:11 +00:00
Sergey Biryukov
6479ea9af8 Embeds: Allow posts with a public custom post status to be embedded.
Previously, only posts with the `publish` status could be embedded.

Props goaroundagain, peterwilsoncc, poena.
Fixes #47574.

git-svn-id: https://develop.svn.wordpress.org/trunk@50401 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-22 13:21:26 +00:00
Robert Anderson
04b26cf226 Editor: Update @wordpress npm packages
Update @wordpress npm packages to the latest published versions. This includes
block editor bug fixes for WordPress 5.7 RC 1.

Fixes #52588.


git-svn-id: https://develop.svn.wordpress.org/trunk@50400 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-22 06:02:34 +00:00
Peter Wilson
21ef06aee1 Site Health: Update loopback test to POST to wp-cron.
Replace loopback health check URL with a `POST` request to `wp-cron.php` in the WordPress install directory. This more closely represents how WordPress uses loopback requests.

A `POST` request is used to cause `wp-cron.php` to exit prior to running any cron jobs. This allows the test to indicate success quicker and accounts for sites that set the `DISABLE_WP_CRON` constant to avoid running cron jobs on loopback requests.

Props clorith, peterwilsoncc, TimothyBlynJacobs.
Fixes #52547.



git-svn-id: https://develop.svn.wordpress.org/trunk@50399 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-22 00:49:17 +00:00
Sergey Biryukov
d2bf9ee9c8 I18N: Remove extra spaces from translatable strings in Privacy help tabs.
Follow-up to [50147].

Props tobifjellner.
Fixes #52583.

git-svn-id: https://develop.svn.wordpress.org/trunk@50398 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-21 16:02:47 +00:00
Sergey Biryukov
3d8ea574c5 External Libraries: Upgrade PHPMailer to version 6.3.0.
This is a maintenance release. Changes include:

* Handle early connection errors such as 421 during connection and EHLO states.
* Make the `mail()` and sendmail transports set the envelope sender the same way as SMTP does, i.e. use whatever `From` is set to, only falling back to the `sendmail_from` php.ini setting if `From` is unset. This avoids errors from the `mail()` function if `Sender` is not set explicitly and php.ini is not configured. This is a minor functionality change, so bumps the minor version number.
* Extend `parseAddresses` to decode encoded names.

Release notes: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.3.0

For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.2.0...v6.3.0

Props ayeshrajans.
Fixes #52577.

git-svn-id: https://develop.svn.wordpress.org/trunk@50397 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-21 09:32:41 +00:00
John Blackbourn
66504ce36e Posts, Post Types: Rename the new post parent conditional tag functions for clarity.
* `get_parent_post()` becomes `get_post_parent()`
* `has_parent_post()` becomes `has_post_parent()`

Props johnjamesjacoby, SergeyBiryukov, lukecarbis, peterwilsoncc

Fixes #33045


git-svn-id: https://develop.svn.wordpress.org/trunk@50396 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-20 17:43:55 +00:00
John Blackbourn
9ab39e3363 Docs: Various docblock corrections and improvements.
See #51800


git-svn-id: https://develop.svn.wordpress.org/trunk@50395 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-20 17:08:24 +00:00
John Blackbourn
3f705da1f2 Cron API: Add a missing $wp_error parameter to the pre_reschedule_event filter.
Props tmatsuur, mukesh27

Fixes #52572
See #49961


git-svn-id: https://develop.svn.wordpress.org/trunk@50394 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-20 12:09:45 +00:00
Sergey Biryukov
24f0d03a6c Script Loader: Explicitly declare the $pagenow global in wp_deregister_script().
This avoids an "Undefined index" PHP notice in `wp_resource_hints()` tests when running the full test suite.

Remove the unused global from `get_home_url()`.

Follow-up to [25443], [38100], [38174], [50156], [50164].

Props peterwilsoncc.
Fixes #52566.

git-svn-id: https://develop.svn.wordpress.org/trunk@50393 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-20 09:53:48 +00:00
Sergey Biryukov
77a7160821 Tests: Fix typo in one of wp_resource_hints() test method names.
Add `@ticket` reference.

Follow-up to [38100].

See #51802.

git-svn-id: https://develop.svn.wordpress.org/trunk@50392 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-20 09:52:14 +00:00
Felix Arntz
c8bbd79d2d Security: Fix bug in wp_is_local_html_output().
Prior to this changeset, the check for the correct RSD link output was relying on a specific protocol, although it needs to accept both the HTTP and HTTPS version of the URL.

Props TimothyBlynJacobs.
Fixes #52542. See #47577.


git-svn-id: https://develop.svn.wordpress.org/trunk@50391 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-19 21:11:02 +00:00
Sergey Biryukov
d77042872c Users: Correctly display an error message after clicking the "Send Reset Link" button.
The `addInlineNotice()` function expects a single string as a success or error message, not an array of strings.

Follow-up to [50129].

Props audrasjb.
Fixes #52573.

git-svn-id: https://develop.svn.wordpress.org/trunk@50390 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-19 17:22:37 +00:00