Commit Graph

17256 Commits

Author SHA1 Message Date
Sergey Biryukov
15059e0a68 Tests: Rename classes in phpunit/tests/load/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50453


git-svn-id: http://core.svn.wordpress.org/trunk@50064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-28 13:44:05 +00:00
Sergey Biryukov
18af98a18b Tests: Rename some classes in phpunit/tests/link/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50452


git-svn-id: http://core.svn.wordpress.org/trunk@50063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-28 13:41:03 +00:00
Sergey Biryukov
b7c1e7eb62 Docs: Use correct variable in the style_loader_tag filter DocBlock.
Follow-up to [46088].

Props rima1889.
Fixes #52673.
Built from https://develop.svn.wordpress.org/trunk@50451


git-svn-id: http://core.svn.wordpress.org/trunk@50062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-27 17:59:03 +00:00
John Blackbourn
c04efbe92e Build/Test Tools: Fix and standardise calls to the tearDown() method in the test suite.
The parent method should be called after any test-specific teardown.

See #52625

Built from https://develop.svn.wordpress.org/trunk@50450


git-svn-id: http://core.svn.wordpress.org/trunk@50061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-27 17:10:03 +00:00
John Blackbourn
fd8fe61045 Build/Test Tools: Fix and standardise calls to the setUp() and setUpBeforeClass() methods in the test suite.
The parent methods should always be called before any test-specific functionality is set up, unless there is a specific and documented reason.

See #52625

Built from https://develop.svn.wordpress.org/trunk@50449


git-svn-id: http://core.svn.wordpress.org/trunk@50060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-27 16:56:04 +00:00
John Blackbourn
210fd37d37 Build/Test Tools: Add some more tests that perform HTTP requests to the external-http test group.
See #52625

Built from https://develop.svn.wordpress.org/trunk@50448


git-svn-id: http://core.svn.wordpress.org/trunk@50059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-27 14:38:04 +00:00
Sergey Biryukov
1a7d246fcc Bootstrap/Load: Check if the error_reporting() function exists in wp-load.php.
This avoids a fatal error on PHP 8 if `error_reporting()` is disabled in `php.ini`.

On systems with this function disabled, it's best to add a dummy function to the `wp-config.php` file, as there are multiple other calls in core or plugins.

However, as this call to the function is run prior to `wp-config.php` loading, it is now wrapped in a `function_exists()` check.

Props peterwilsoncc, fijisunshine, ayeshrajans.
Fixes #52226.
Built from https://develop.svn.wordpress.org/trunk@50447


git-svn-id: http://core.svn.wordpress.org/trunk@50058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-27 11:09:07 +00:00
John Blackbourn
96710a174b Build/Test Tools: Switch away from npx install-changed in GitHub Actions to increase the cache performance.
Using `npm ci` makes better use of the npm cache that's in use, speeding up the test runs by around 30 seconds.

See #52660

Built from https://develop.svn.wordpress.org/trunk@50446


git-svn-id: http://core.svn.wordpress.org/trunk@50057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-26 22:49:03 +00:00
Sergey Biryukov
dacf8681f4 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.
Fixes #52647.
Built from https://develop.svn.wordpress.org/trunk@50445


git-svn-id: http://core.svn.wordpress.org/trunk@50056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-26 17:51:20 +00:00
John Blackbourn
a64c512657 Build/Test Tools: 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.
The `external-http`, `media`, and `restapi` groups combined take roughly the same time as all the other tests combined. Splitting the test run in two speeds up the PHP 5.6 test runs which are the slowest by quite a margin. The net reduction in duration is only seen on PHP versions older than 7.0 where the reduction is greater than the time taken for the job to be set up.

Props peterwilsoncc, desrosj, johnbillion

Special shout out to manzoorwanijk whose article about running steps in parallel started me down this path.

Fixes #52645

Built from https://develop.svn.wordpress.org/trunk@50444


git-svn-id: http://core.svn.wordpress.org/trunk@50055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-26 15:09:02 +00:00
John Blackbourn
1cfb5ef953 Build/Test Tools: Increase the reliability of backing up the mu-plugins directory during tests.
Fixes #51735

Built from https://develop.svn.wordpress.org/trunk@50443


git-svn-id: http://core.svn.wordpress.org/trunk@50054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-26 14:39:04 +00:00
John Blackbourn
56ca8431ad Build/Test Tools: Avoid attempting to redeclare the origin remote prior to sending the test results to the test reporting API.
Props desroj
See #51734

Built from https://develop.svn.wordpress.org/trunk@50442


git-svn-id: http://core.svn.wordpress.org/trunk@50053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-26 14:30:04 +00:00
John Blackbourn
95e4e3d484 Build/Test Tools: Switch back to running the PHPUnit test suite against the src directory instead of build.
Some PHPUnit tests were concerned with the state of files in the `build` directory. In order to allow the tests to run without requiring a build to be run first, these have been moved into assertions that run after the build step (and therefore cause it to fail if they do not pass), or into QUnit tests as necessary.

Various other PHPUnit tests implictly depend on built JavaScript files being present. These files are now touched during the test setup to avoid PHP warnings if the `build` files are not present.

The `wp-tests-config-sample.php` file and the GitHub Actions configuration have also been changed so `ABSPATH` uses `src` instead of `build`, therefore allowing the PHPUnit tests to be run without a build having to be run first. This means all new local installations of WordPress will use `src` for PHPUnit testing. If you would like to switch your existing installation over then change the location of `ABSPATH` in `wp-tests-config.php` to point to `src` instead of `build`.

Props peterwilsoncc, iandunn, gziolo, desroj, johnbillion

Fixes #51734
See #45863

Built from https://develop.svn.wordpress.org/trunk@50441


git-svn-id: http://core.svn.wordpress.org/trunk@50052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-26 14:09:06 +00:00
Peter Wilson
7b26eac3a3 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.
Fixes #52605. See #34281.


Built from https://develop.svn.wordpress.org/trunk@50439


git-svn-id: http://core.svn.wordpress.org/trunk@50050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-26 00:52:02 +00:00
desrosj
ba60f353f8 Build/Test Tools: Prevent the NPM/Composer caches in GitHub Actions from snowballing.
The `actions/cache` GitHub action uses a `key` input to find the desired cache in storage. Currently, this is defined as a combination of the operating system being used, the software being cached (NPM or Composer), PHP version (Composer only), and a hash of the relevant lock file.

The `cache` action also supports a `restore-keys` input, which is an ordered list of keys to use for restoring a cache if no cache hit occurred for the specified key.

However, this means that every time a lock file is updated, the cache is being recreated by first restoring a previous one (when available), and then installing new versions of dependencies on top of that. This results in old, unused versions of dependencies never being removed from the cache.

In this change, the `restore-keys` are removed. This will force a new, fresh cache to be generated when the desired `key` is not matched. In testing, this results in a ~40% reduction in cache size when compared to the latest successful workflow runs. Since there is no way to manually flush the cache in GHA, the benefits of this change will not be seen until the `package-lock.json` and `composer.lock` files are updated, or the cache at the desired key is evicted.

Props johbillion.
See #52660.
Built from https://develop.svn.wordpress.org/trunk@50436


git-svn-id: http://core.svn.wordpress.org/trunk@50047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-25 20:49:08 +00:00
desrosj
7abbffa346 Build/Test Tools: Disable fail-fast for PHPUnit testing.
In GitHub Actions, there is a `fail-fast` option that will cancel all incomplete jobs within a workflow as soon as one failure is encountered. This defaults to `true`.

This is great for alerting you of a failure faster, but does not give you the full picture of what is failing. For example, it’s possible that there is a failing test on 2 versions of PHP, but not others. If `fail-fast` is enabled, it’s impossible to know this.

Even with `fail-fast` disabled, the workflow will still report a failure if one or more jobs produce a failing result.

Props johbillion, jorbin.
Fixes #52612.
Built from https://develop.svn.wordpress.org/trunk@50435


git-svn-id: http://core.svn.wordpress.org/trunk@50046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-25 14:05:04 +00:00
Sergey Biryukov
74e0d8ba54 Docs: Correct function name in add_settings_field() DocBlock.
See #52628.
Built from https://develop.svn.wordpress.org/trunk@50434


git-svn-id: http://core.svn.wordpress.org/trunk@50045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-25 12:02:03 +00:00
Sergey Biryukov
09d7cacc6b Tests: Reset current screen after setting it to dashboard in add_submenu_page() tests.
This avoids polluting other tests and allows the `ms-excluded` test group to successfully run on its own.

Props johnbillion, SergeyBiryukov.
See #52607.
Built from https://develop.svn.wordpress.org/trunk@50433


git-svn-id: http://core.svn.wordpress.org/trunk@50044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-25 11:12:07 +00:00
desrosj
dc3a76e8f3 Build/Test Tools: Limit when GitHub Action workflows run on pull_request.
Different branches have support for different types of testing based on the tooling that was in place at the time each version was branched. The workflows currently in place have patterns configured to match the relevant `branches` and `tags` for each workflow, but only for `push` events.

This copies the patterns for matching supported `branches` over to the `pull_request` event to prevent workflows from running for a pull request to a branch that does not support that workflow.

Fixes #52643.
Built from https://develop.svn.wordpress.org/trunk@50432


git-svn-id: http://core.svn.wordpress.org/trunk@50043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-24 19:36:09 +00:00
desrosj
b231afc0b7 Help/About: Remove extra space in the 5.7 About page copy.
Props tobifjellner, audrasjb.
Fixes #52632.
Built from https://develop.svn.wordpress.org/trunk@50430


git-svn-id: http://core.svn.wordpress.org/trunk@50041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-24 15:51:06 +00:00
Sergey Biryukov
ed5c0971f5 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.
Fixes #52638. See #51812.
Built from https://develop.svn.wordpress.org/trunk@50429


git-svn-id: http://core.svn.wordpress.org/trunk@50040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-24 12:22:07 +00:00
Sergey Biryukov
5ba4f4cee5 Security: Update the Security Policy to include WordPress 5.7.
Fixes #52633.
Built from https://develop.svn.wordpress.org/trunk@50428


git-svn-id: http://core.svn.wordpress.org/trunk@50039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 21:38:04 +00:00
desrosj
3497bb425f trunk is now 5.8 alpha.
Built from https://develop.svn.wordpress.org/trunk@50427


git-svn-id: http://core.svn.wordpress.org/trunk@50038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 21:06:05 +00:00
desrosj
f9e2aa7b8b Post WordPress 5.7 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@50425


git-svn-id: http://core.svn.wordpress.org/trunk@50036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 20:54:02 +00:00
desrosj
415835a949 WordPress 5.7 RC1.
Built from https://develop.svn.wordpress.org/trunk@50424


git-svn-id: http://core.svn.wordpress.org/trunk@50035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 20:40:03 +00:00
Adam Silverstein
3e6928a370 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.


Built from https://develop.svn.wordpress.org/trunk@50423


git-svn-id: http://core.svn.wordpress.org/trunk@50034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 20:17:04 +00:00
Sergey Biryukov
9a4cbd05e8 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.
Built from https://develop.svn.wordpress.org/trunk@50422


git-svn-id: http://core.svn.wordpress.org/trunk@50033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 20:08:03 +00:00
desrosj
d36527ef68 Build/Test Tools: Add a missing word to the CONTRIBUTING.md file.
Follow up to [50417].

Props kraftbj.
See #33043.
Built from https://develop.svn.wordpress.org/trunk@50421


git-svn-id: http://core.svn.wordpress.org/trunk@50032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 20:01:04 +00:00
Sergey Biryukov
b65d83b872 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.
Built from https://develop.svn.wordpress.org/trunk@50420


git-svn-id: http://core.svn.wordpress.org/trunk@50031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 19:45:04 +00:00
Sergey Biryukov
5fd4f8e993 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.
Built from https://develop.svn.wordpress.org/trunk@50419


git-svn-id: http://core.svn.wordpress.org/trunk@50030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 19:18:02 +00:00
ryelle
9a32a41e52 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.


Built from https://develop.svn.wordpress.org/trunk@50418


git-svn-id: http://core.svn.wordpress.org/trunk@50029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 18:41:05 +00:00
desrosj
8dcbe3b7a6 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.
Built from https://develop.svn.wordpress.org/trunk@50417


git-svn-id: http://core.svn.wordpress.org/trunk@50028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 16:52:04 +00:00
desrosj
8fc757b1f0 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.
Built from https://develop.svn.wordpress.org/trunk@50416


git-svn-id: http://core.svn.wordpress.org/trunk@50027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 16:45:19 +00:00
desrosj
89f2e512f5 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.
Built from https://develop.svn.wordpress.org/trunk@50415


git-svn-id: http://core.svn.wordpress.org/trunk@50026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 16:38:06 +00:00
desrosj
2d34a1928e Build/Test Tools: Update the package lock file.
This commits a change that results from running `npm install`.

See #51801.
Built from https://develop.svn.wordpress.org/trunk@50414


git-svn-id: http://core.svn.wordpress.org/trunk@50025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 16:31:05 +00:00
desrosj
687f87ce63 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.
Built from https://develop.svn.wordpress.org/trunk@50413


git-svn-id: http://core.svn.wordpress.org/trunk@50024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 15:47:04 +00:00
Sergey Biryukov
af9675bdcb 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.
Built from https://develop.svn.wordpress.org/trunk@50412


git-svn-id: http://core.svn.wordpress.org/trunk@50023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 14:35:03 +00:00
Sergey Biryukov
e0b66dd56c Users: Relocate the Password Reset feature to the Account Management section.
Follow-up to [50129].

Props mukesh27, audrasjb, hellofromTonya.
Fixes #52597.
Built from https://develop.svn.wordpress.org/trunk@50411


git-svn-id: http://core.svn.wordpress.org/trunk@50022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 14:21:05 +00:00
Sergey Biryukov
d46ee113a2 External Libraries: Correct click event handling in the Thickbox library.
Follow-up to [50367], [50383].

Props peterwilsoncc.
Fixes #52618. See #51812.
Built from https://develop.svn.wordpress.org/trunk@50410


git-svn-id: http://core.svn.wordpress.org/trunk@50021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 10:54:06 +00:00
Peter Wilson
c463e94a33 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.

Built from https://develop.svn.wordpress.org/trunk@50409


git-svn-id: http://core.svn.wordpress.org/trunk@50020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 02:00:06 +00:00
Peter Wilson
032aec8df2 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.

Built from https://develop.svn.wordpress.org/trunk@50408


git-svn-id: http://core.svn.wordpress.org/trunk@50019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-22 23:23:07 +00:00
Sergey Biryukov
ddca2ed164 Docs: Document the usage of $pagenow global in a few functions.
See #51800.
Built from https://develop.svn.wordpress.org/trunk@50407


git-svn-id: http://core.svn.wordpress.org/trunk@50018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-22 19:18:12 +00:00
Sergey Biryukov
c6c1ef3c32 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.
Built from https://develop.svn.wordpress.org/trunk@50406


git-svn-id: http://core.svn.wordpress.org/trunk@50017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-22 18:55:07 +00:00
Sergey Biryukov
a088b586ec 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.
Built from https://develop.svn.wordpress.org/trunk@50401


git-svn-id: http://core.svn.wordpress.org/trunk@50012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-22 13:23:04 +00:00
noisysocks
c55ccb3ef0 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.

Built from https://develop.svn.wordpress.org/trunk@50400


git-svn-id: http://core.svn.wordpress.org/trunk@50011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-22 06:04:39 +00:00
Peter Wilson
0b9c7b7cdf 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.


Built from https://develop.svn.wordpress.org/trunk@50399


git-svn-id: http://core.svn.wordpress.org/trunk@50010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-22 00:51:09 +00:00
Sergey Biryukov
17fa3f6b6d I18N: Remove extra spaces from translatable strings in Privacy help tabs.
Follow-up to [50147].

Props tobifjellner.
Fixes #52583.
Built from https://develop.svn.wordpress.org/trunk@50398


git-svn-id: http://core.svn.wordpress.org/trunk@50009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-21 16:04:11 +00:00
Sergey Biryukov
0d8da2d665 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.
Built from https://develop.svn.wordpress.org/trunk@50397


git-svn-id: http://core.svn.wordpress.org/trunk@50008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-21 09:34:05 +00:00
John Blackbourn
eac91ec9c5 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

Built from https://develop.svn.wordpress.org/trunk@50396


git-svn-id: http://core.svn.wordpress.org/trunk@50007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-20 17:45:04 +00:00
John Blackbourn
391fc25eed Docs: Various docblock corrections and improvements.
See #51800

Built from https://develop.svn.wordpress.org/trunk@50395


git-svn-id: http://core.svn.wordpress.org/trunk@50006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-20 17:10:11 +00:00
John Blackbourn
8b7f965364 Cron API: Add a missing $wp_error parameter to the pre_reschedule_event filter.
Props tmatsuur, mukesh27

Fixes #52572
See #49961

Built from https://develop.svn.wordpress.org/trunk@50394


git-svn-id: http://core.svn.wordpress.org/trunk@50005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-20 12:11:03 +00:00
Sergey Biryukov
7f91e27312 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.
Built from https://develop.svn.wordpress.org/trunk@50393


git-svn-id: http://core.svn.wordpress.org/trunk@50004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-20 09:56:04 +00:00
Sergey Biryukov
a7ecaee063 Tests: Fix typo in one of wp_resource_hints() test method names.
Add `@ticket` reference.

Follow-up to [38100].

See #51802.
Built from https://develop.svn.wordpress.org/trunk@50392


git-svn-id: http://core.svn.wordpress.org/trunk@50003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-20 09:54:06 +00:00
Felix Arntz
f7fd9adee1 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.

Built from https://develop.svn.wordpress.org/trunk@50391


git-svn-id: http://core.svn.wordpress.org/trunk@50002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-19 21:13:08 +00:00
Sergey Biryukov
50f8dafe17 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.
Built from https://develop.svn.wordpress.org/trunk@50390


git-svn-id: http://core.svn.wordpress.org/trunk@50001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-19 17:24:05 +00:00
Sergey Biryukov
1db4b029c3 Taxonomy: Optimize wp_delete_term() for large object counts without a default term.
When deleting a term, it has to be removed individually from each object it's connected to, which can take some significant time when there are a lot of objects.

By calling `wp_remove_object_terms()` when no default term is required, we can skip the terms fetch/diff step and significantly speed up the deletion process.

Props dd32.
Fixes #52549.
Built from https://develop.svn.wordpress.org/trunk@50389


git-svn-id: http://core.svn.wordpress.org/trunk@50000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-19 14:31:08 +00:00
ryelle
afc3958ab1 Twenty Twenty-One: Add the px unit to the admin bar height custom property.
The admin bar height custom property is used in `calc` functions, which require consistent unit use, even when the value is zero. A unitless value returns an invalid value for the "height" property, where this variable is used. This also changes the stylelint rule in the theme to allow zero values with a unit, just in custom properties.

Props nico23.
Fixes #52564.


Built from https://develop.svn.wordpress.org/trunk@50388


git-svn-id: http://core.svn.wordpress.org/trunk@49999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-18 20:46:09 +00:00
desrosj
02701a5060 Build/Test Tools: Update actions within test workflows to the latest versions.
This updates two published GitHub actions to their latest versions:

- `actions/setup-node` from `v1` to `v2`.
- `styfle/cancel-workflow-action` from `0.5.0` to `0.8.0`.

See #50401.
Built from https://develop.svn.wordpress.org/trunk@50387


git-svn-id: http://core.svn.wordpress.org/trunk@49998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-18 18:47:05 +00:00
ryelle
6e895528e7 Customizer: Bring admin color schemes back into the customizer.
In #50547, the admin color schemes were added to the customizer UI, but at some point specificity changed and the colors were overridden by the defaults. This brings the color schemes back into the customizer, using the button color as a highlight, with the link color for text to keep things readable.

Follow up to [48371].
Props audrasjb, peterwilsoncc.
Fixes #52230.


Built from https://develop.svn.wordpress.org/trunk@50386


git-svn-id: http://core.svn.wordpress.org/trunk@49997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-18 16:51:05 +00:00
ryelle
369c43ff2e Administration: Apply background color to updated message in plugin list table.
Follow-up to [50025].
Props afragen.
Fixes #52452.


Built from https://develop.svn.wordpress.org/trunk@50385


git-svn-id: http://core.svn.wordpress.org/trunk@49996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-18 15:16:03 +00:00
Sergey Biryukov
c9220d8cab Tests: Rename stick_post() and unstick_post() tests for a bit more clarity.
Add missing DocBlock for `test_unstick_post_updates_option()`.

Follow-up to [50380].

See #52007.
Built from https://develop.svn.wordpress.org/trunk@50384


git-svn-id: http://core.svn.wordpress.org/trunk@49995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-18 12:04:02 +00:00
Sergey Biryukov
488ebec933 External Libraries: Revert the change to the tb_click() function in the Thickbox library.
The `blur()` method there is not the jQuery method, but is an HTML DOM method instead.

This makes the Close button on the "View details" modal on Plugins screen functional again.

Follow-up to [50367].

Props afragen.
See #51812.
Built from https://develop.svn.wordpress.org/trunk@50383


git-svn-id: http://core.svn.wordpress.org/trunk@49994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-18 11:28:06 +00:00
Peter Wilson
9bc5ccb4a5 Editor: Additional tests for reusable blocks.
Ensure that subsequent renders of a reusable block will render correctly and that recursively inserting a reusable block into itself does not cause an internal server (500) error.

Props bernhard-reiter, SergeyBiryukov.
Fixes #52364.


Built from https://develop.svn.wordpress.org/trunk@50382


git-svn-id: http://core.svn.wordpress.org/trunk@49993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-18 01:13:02 +00:00
Peter Wilson
c6af819b3a Site Health: Use home page for loopback test.
Use `home_url()` for asynchronous loopback test to ensure correct results on sites with WordPress installed elsewhere, for example WordPress in a sub-directory.

Props Levdbas.
Fixes #52547.


Built from https://develop.svn.wordpress.org/trunk@50381


git-svn-id: http://core.svn.wordpress.org/trunk@49992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-17 23:10:04 +00:00
Peter Wilson
23ca4ed304 Posts/Post Types: Prevent duplicates in sticky posts option.
In `unstick_post()` if a post ID is duplicated in the `sticky_posts` option remove all instances.

In both `stick_post()` and `unstick_post()` check for duplicate IDs already stored in the `sticky_post` option and remove them if the option is updated.

Props rahmohn, archon810.
Fixes #52007.

Built from https://develop.svn.wordpress.org/trunk@50380


git-svn-id: http://core.svn.wordpress.org/trunk@49991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-17 22:58:05 +00:00
John Blackbourn
64b43a44db Build/Test Tools: Split the single site and Multisite PHPUnit test runs on CI into separate jobs so they run in parallel.
This reduces the total duration of the test suite from ~26 minutes to ~16 minutes. Hurrah!

Fixes #52548

Built from https://develop.svn.wordpress.org/trunk@50379


git-svn-id: http://core.svn.wordpress.org/trunk@49990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-17 19:33:07 +00:00
John Blackbourn
dd53775247 Comments: Revert the introduction of the opt-in comment approval notification feature.
This reverts the following commits: [50113], [50112], [50109].

See #33717

Built from https://develop.svn.wordpress.org/trunk@50375


git-svn-id: http://core.svn.wordpress.org/trunk@49986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-17 13:08:05 +00:00
Sergey Biryukov
dcbe3cb7b8 Privacy: Suggest wp_add_privacy_policy_content() as an alternative for the deprecated wp_get_default_privacy_policy_content hook.
Follow-up to [50161].

See #49264.
Built from https://develop.svn.wordpress.org/trunk@50374


git-svn-id: http://core.svn.wordpress.org/trunk@49985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-17 12:45:04 +00:00
Sergey Biryukov
f331ff5a7a Docs: Correct the alternative hook name for the deprecated whitelist_options hook.
Follow-up to [48121].

See #51800.
Built from https://develop.svn.wordpress.org/trunk@50373


git-svn-id: http://core.svn.wordpress.org/trunk@49984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-17 12:42:03 +00:00
Sergey Biryukov
3fbc0e5a9b Docs: Correct the type of $widget_id argument in is_active_widget().
See #51800.
Built from https://develop.svn.wordpress.org/trunk@50372


git-svn-id: http://core.svn.wordpress.org/trunk@49983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-17 11:48:12 +00:00
Sergey Biryukov
a9d04adf20 Robots: Rename wp_embed_no_robots to wp_robots_noindex_embeds().
This brings the naming in line with `wp_robots_noindex_search()`.

Follow-up to [49992], [50370].

See #51511, #52457.
Built from https://develop.svn.wordpress.org/trunk@50371


git-svn-id: http://core.svn.wordpress.org/trunk@49982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-17 10:51:04 +00:00
Peter Wilson
b51a707468 General: Add noindex robots meta tag to search results.
Prevent search engines indexing internal search results to protect against reflected web spam attacks.

Props abagtcs, audrasjb, ayeshrajans, burtrw, johnbillion, jonoaldersonwp, peterwilsoncc, poena, sabernhardt, xkon.
Fixes #52457

Built from https://develop.svn.wordpress.org/trunk@50370


git-svn-id: http://core.svn.wordpress.org/trunk@49981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 23:38:06 +00:00
John Blackbourn
a4493bf242 Post WordPress 5.7 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@50369


git-svn-id: http://core.svn.wordpress.org/trunk@49980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 21:20:05 +00:00
John Blackbourn
65e9e123ed WordPress 5.7 beta 3.
Built from https://develop.svn.wordpress.org/trunk@50368


git-svn-id: http://core.svn.wordpress.org/trunk@49979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 20:57:05 +00:00
Sergey Biryukov
8080762e93 External Libraries: Further fix jQuery deprecations in WordPress core.
This addresses `JQMIGRATE` warnings in some admin files and the Thickbox library.

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

Props bordoni, poena.
See #51812.
Built from https://develop.svn.wordpress.org/trunk@50367


git-svn-id: http://core.svn.wordpress.org/trunk@49978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 20:25:03 +00:00
Sergey Biryukov
c4da0c6fc2 Twenty Nineteen: Add some space between the cookies checkbox and label in comment form.
Props sabernhardt, garrett-eclipse, mukesh27, monikarao, Boniu91.
Fixes #46601.
Built from https://develop.svn.wordpress.org/trunk@50365


git-svn-id: http://core.svn.wordpress.org/trunk@49976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 20:15:05 +00:00
ryelle
455bc37c68 Twenty Twenty-One: Remove background color from Social Links the dark gray style.
This block variation doesn't support custom colors, so allowing a background color leads to a mismatch between frontend and editor styles.

Props poena, paaljoachim, audrasjb.
Fixes #52499.


Built from https://develop.svn.wordpress.org/trunk@50364


git-svn-id: http://core.svn.wordpress.org/trunk@49975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 20:12:02 +00:00
Sergey Biryukov
b50e49f5c1 Accessibility: Taxonomy: Correct keyboard navigation for the Tags meta box in classic editor.
Props sabernhardt, almendron, jose64, alexstine, joedolson, ryokuhi.
Fixes #52408.
Built from https://develop.svn.wordpress.org/trunk@50363


git-svn-id: http://core.svn.wordpress.org/trunk@49974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 20:04:07 +00:00
Sergey Biryukov
e99d544215 Administration: Apply the months_dropdown_results filter separately from pre_months_dropdown_query.
Follow-up to [50163].

Props hellofromTonya.
Fixes #51660.
Built from https://develop.svn.wordpress.org/trunk@50362


git-svn-id: http://core.svn.wordpress.org/trunk@49973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 19:58:05 +00:00
Sergey Biryukov
070dcd980b Twenty Ten: Correct the fallback to the default header if the featured image width is narrower than the twentyten_header_image_width setting.
Follow-up to [45581].

Props sabernhardt, macmanx, audrasjb.
Fixes #52516.
Built from https://develop.svn.wordpress.org/trunk@50361


git-svn-id: http://core.svn.wordpress.org/trunk@49972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 19:28:04 +00:00
Sergey Biryukov
9aaa579f0d Twenty Eleven: Correct the fallback to the default header if the featured image width is narrower than the twentyeleven_header_image_width setting.
Follow-up to [45581].

Props sabernhardt, macmanx, audrasjb.
See #52516.
Built from https://develop.svn.wordpress.org/trunk@50360


git-svn-id: http://core.svn.wordpress.org/trunk@49971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 19:26:06 +00:00
Sergey Biryukov
95094becee Twenty Twenty: Make sure the RTL list styles are preserved after npm run build.
Adjust the padding value for better consistency.

Props desrosj, sabernhardt, ryelle, mukesh27.
Fixes #52401.
Built from https://develop.svn.wordpress.org/trunk@50359


git-svn-id: http://core.svn.wordpress.org/trunk@49970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 19:11:05 +00:00
ryelle
5f56591fe5 Bundled Themes: Fix alignment and styles for quote, verse, and code blocks.
Updates older themes to fix alignment, spacing, and font issues to better match the frontend display. Applies to themes: Twenty Eleven, Twenty Thirteen, Twenty Fourteen, Twenty Sixteen, Twenty Seventeen, and Twenty Twenty.

Props burnuser, talldanwp, cristinasoponar, poena, kjellr
Fixes #52009.


Built from https://develop.svn.wordpress.org/trunk@50358


git-svn-id: http://core.svn.wordpress.org/trunk@49969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 18:59:04 +00:00
John Blackbourn
6cb1eaa583 Posts, Post Types: Update the styling of the legacy Links editing screen.
This brings its styling inline with other meta boxes in the admin area.

Props antonlukin, kburgoine, grzim, sabernhardt, pbiron, audrasjb

Fixes #48782

Built from https://develop.svn.wordpress.org/trunk@50357


git-svn-id: http://core.svn.wordpress.org/trunk@49968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 18:50:03 +00:00
Sergey Biryukov
dbaee6b550 Filesystem API: Make sure to only call fread() on non-empty files in the PclZip library.
This avoids a fatal error on PHP 8 caused by passing a zero value to `fread()` as the `$length` argument, which must be greater than zero.

Props yakimun, fierevere, jrf, DavidAnderson, SergeyBiryukov.
Fixes #52018.
Built from https://develop.svn.wordpress.org/trunk@50355


git-svn-id: http://core.svn.wordpress.org/trunk@49966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 18:42:03 +00:00
John Blackbourn
f955bcce54 Feeds: Fix the URL returned by get_feed_link() when pretty permalinks are not in use.
Props hauvong, peterwilsoncc, SergeyBiryukov

Fixes #51839

Built from https://develop.svn.wordpress.org/trunk@50354


git-svn-id: http://core.svn.wordpress.org/trunk@49965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 17:34:04 +00:00
Sergey Biryukov
ec94c354e2 XML-RPC: Pass the method arguments and the XML-RPC server instance to the xmlrpc_call action.
This provides better context and makes the action easier to use when the call passes specific content in the payload of the request.

Props dd32.
Fixes #52524.
Built from https://develop.svn.wordpress.org/trunk@50353


git-svn-id: http://core.svn.wordpress.org/trunk@49964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 17:03:05 +00:00
joedolson
7b5e14e987 Media: Associate upload errors and field with controls.
Adds an explicit relationship between the upload button and the maximum upload limit, moves focus to the error dismiss button if an error occurs, and adds a call to wp.a11y.speak to report the error after it occurs.

Props afercia, anevins, antpb, adamsilverstein, poena
Fixes #47120
Built from https://develop.svn.wordpress.org/trunk@50352


git-svn-id: http://core.svn.wordpress.org/trunk@49963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 04:05:07 +00:00
Peter Wilson
147852757c Twenty Twenty-One: Display inline-images inline.
Remove `display: block` property from inline images and display them center aligned vertically.

Props jeroenrotty, melchoyce, mukesh27, paaljoachim, poena, talldanwp.
Fixes #52287.


Built from https://develop.svn.wordpress.org/trunk@50351


git-svn-id: http://core.svn.wordpress.org/trunk@49962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 02:26:08 +00:00
Peter Wilson
49f0fc9e53 Twenty Twenty-One: Match bullets between editor and frontend.
Change bullet style on frontend nested unordered lists to `circle` to match the editor styles.

Props poena, mukesh27, mahfuz01, tejwanihemant.
Fixes #52412.


Built from https://develop.svn.wordpress.org/trunk@50350


git-svn-id: http://core.svn.wordpress.org/trunk@49961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-15 23:52:04 +00:00
Peter Wilson
3ed24991ba Bundled Themes: Synchronise .gitignore with themes' svn ignore property.
Add `node_modules` directories within Twenty Twenty-One, Twenty Twenty and Twenty Nineteen to the `.gitignore` file.

Fixes #52502.

Built from https://develop.svn.wordpress.org/trunk@50349


git-svn-id: http://core.svn.wordpress.org/trunk@49960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-15 23:19:07 +00:00
Peter Wilson
8665ca27cc Twenty Twenty-One: Add CSS source map files to committed files.
Remove `*.css.map` files from the ignore properties of Twenty Twenty-One directories, add the unignored files.

Props poena, peterwilsoncc.
Fixes #52377.


Built from https://develop.svn.wordpress.org/trunk@50348


git-svn-id: http://core.svn.wordpress.org/trunk@49959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-15 23:11:07 +00:00
ryelle
0e7386521b Bundled Themes: Support font size option for code block.
Adds font-size support to Twenty Fourteen, Twenty Sixteen, and Twenty Seventeen.

Props poena, paaljoachim, peterwilsoncc.
Fixes #52431.


Built from https://develop.svn.wordpress.org/trunk@50347


git-svn-id: http://core.svn.wordpress.org/trunk@49958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-15 18:56:04 +00:00
ryelle
ec38e1434a Twenty Thirteen: Fix alignment of child blocks within the Cover block.
Props kjellr, melchoyce.
Fixes #51224.


Built from https://develop.svn.wordpress.org/trunk@50346


git-svn-id: http://core.svn.wordpress.org/trunk@49957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-15 18:33:05 +00:00
Sergey Biryukov
18a16e0a91 Tests: Rename two classes in phpunit/tests/http/ to match the function names.
See #51802.
Built from https://develop.svn.wordpress.org/trunk@50345


git-svn-id: http://core.svn.wordpress.org/trunk@49956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-15 14:07:06 +00:00
Sergey Biryukov
0bbe650e69 Tests: Add missing @covers tags for files in phpunit/tests/http/.
Props patopaiar, jrf.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@50344


git-svn-id: http://core.svn.wordpress.org/trunk@49955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-15 14:02:07 +00:00
youknowriad
e276187b9a Block Editor: Update packages with bug fixes to be included in WP 5.7 beta 3.
The updated packages are:

@wordpress/block-directory: 1.18.6 -> 1.18.7
@wordpress/block-editor: 5.2.6 -> 5.2.7
@wordpress/block-library: 2.28.3 -> 2.28.4
@wordpress/edit-post: 3.26.6 -> 3.26.7
@wordpress/editor: 9.25.6 -> 9.25.7
@wordpress/format-library: 1.26.6 -> 1.26.7
@wordpress/reusable-blocks: 1.1.6 -> 1.1.7

Props isabel_brison.
Fixes #52525.

Built from https://develop.svn.wordpress.org/trunk@50343


git-svn-id: http://core.svn.wordpress.org/trunk@49954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-15 08:29:31 +00:00
Sergey Biryukov
f1d362a2f3 Tests: Rename classes in phpunit/tests/hooks/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292].
See #51802.
Built from https://develop.svn.wordpress.org/trunk@50342


git-svn-id: http://core.svn.wordpress.org/trunk@49953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-14 12:22:02 +00:00
Sergey Biryukov
2d9dc11508 Tests: Add missing @covers tags for files in phpunit/tests/hooks/.
Props patopaiar, jrf.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@50341


git-svn-id: http://core.svn.wordpress.org/trunk@49952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-14 12:11:08 +00:00
Dominik Schilling
4491708fd1 Docs: Improve parameter types for various URL functions and filters that also accept null.
See #51800.
Built from https://develop.svn.wordpress.org/trunk@50340


git-svn-id: http://core.svn.wordpress.org/trunk@49951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-13 15:16:08 +00:00
Sergey Biryukov
96edb89edb Tests: Add missing @covers tags for files in phpunit/tests/general/.
Props patopaiar, jrf.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@50339


git-svn-id: http://core.svn.wordpress.org/trunk@49950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-13 13:49:03 +00:00
Sergey Biryukov
8fdd713cb2 Tests: Simplify @covers tags in editor/wpEditors.php using @coversDefaultClass annotation.
Follow-up to [50288].

See #39265.
Built from https://develop.svn.wordpress.org/trunk@50338


git-svn-id: http://core.svn.wordpress.org/trunk@49949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-13 13:47:11 +00:00
Sergey Biryukov
e56a6d1a71 Tests: Use @ticket annotation for ticket numbers, for clarity.
See #51802.
Built from https://develop.svn.wordpress.org/trunk@50337


git-svn-id: http://core.svn.wordpress.org/trunk@49948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-13 12:19:06 +00:00
gziolo
fde749f4e4 Tests: Fix failing unit test for block settings
Follow-up to [50297].

Fixes #52512.



Built from https://develop.svn.wordpress.org/trunk@50300


git-svn-id: http://core.svn.wordpress.org/trunk@49945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-12 16:41:03 +00:00
desrosj
00e80bf777 Build/Test Tools: Run xDebug tests on PHP 8.0.
The PHP 8 Docker container for the local WordPress environment now contains xDebug 3.x (the version required for running on PHP 8), so the `xdebug` test group can now be run.

See #50401, #51802.
Built from https://develop.svn.wordpress.org/trunk@50299


git-svn-id: http://core.svn.wordpress.org/trunk@49944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-12 16:38:04 +00:00
desrosj
741e056ed7 Build/Test Tools: Run automated testing when tags are created.
This expands the list of events that triggers automated testing to include tags.

It also refines the matched version ranges for several workflows.

See #50401.
Built from https://develop.svn.wordpress.org/trunk@50298


git-svn-id: http://core.svn.wordpress.org/trunk@49943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-12 16:03:10 +00:00
gziolo
135a35fd04 Blocks: Add missing apiVersion field when preparing server-registered blocks for the block editor
When working on changes to @wordpress/create-block tool (https://github.com/WordPress/gutenberg/pull/28883) to use register_block_type_from_metadata with block.json file in the templates for scaffolded blocks I run into this issue where apiVersion wasn't exposed from the server.

Fixes #52512.


Built from https://develop.svn.wordpress.org/trunk@50297


git-svn-id: http://core.svn.wordpress.org/trunk@49942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-12 16:00:06 +00:00
Sergey Biryukov
463df820f8 Block Editor: Remove extra quotes from the default font stack for editor styles.
Follow-up to [50155].

Props dd32, Joen, kafleg.
Fixes #46169.
Built from https://develop.svn.wordpress.org/trunk@50295


git-svn-id: http://core.svn.wordpress.org/trunk@49940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-12 07:55:06 +00:00
Peter Wilson
d0cf9db65c Site Health: Update site-health script dependencies.
Add `wp-hooks` and `wp-i18n` to Site Health JavaScript dependencies.

Props gmariani405, Clorith, mukesh27.
Fixes #52483.

Built from https://develop.svn.wordpress.org/trunk@50294


git-svn-id: http://core.svn.wordpress.org/trunk@49939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-12 00:10:04 +00:00
Peter Wilson
95fb827816 Twenty Twenty-One: Correct accent marks in block pattern alt text.
Correct accents in "Roses Trémières" for block patterns and starter content.

Props audrasjb, geekzebre, kjellr, SergeyBiryukov.
Fixes #52500.


Built from https://develop.svn.wordpress.org/trunk@50293


git-svn-id: http://core.svn.wordpress.org/trunk@49938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-12 00:03:04 +00:00
Sergey Biryukov
29574d526d Tests: Rename some files and classes in phpunit/tests/general/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291].

See #51802.
Built from https://develop.svn.wordpress.org/trunk@50292


git-svn-id: http://core.svn.wordpress.org/trunk@49937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-11 21:40:11 +00:00
Sergey Biryukov
2553af179d Tests: Rename some classes in phpunit/tests/date/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327].

See #51802.
Built from https://develop.svn.wordpress.org/trunk@50291


git-svn-id: http://core.svn.wordpress.org/trunk@49936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-11 21:22:04 +00:00
Sergey Biryukov
cfacfa87c4 Tests: Add missing @covers tags for files in phpunit/tests/external-http/.
Props patopaiar, jrf.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@50290


git-svn-id: http://core.svn.wordpress.org/trunk@49935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-11 20:57:08 +00:00
Sergey Biryukov
eebc1705a8 Tests: Add missing @covers tags for files in phpunit/tests/error-protection/.
Props patopaiar, jrf.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@50289


git-svn-id: http://core.svn.wordpress.org/trunk@49934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-11 20:56:05 +00:00
Sergey Biryukov
9d739f6be3 Tests: Add missing @covers tags for files in phpunit/tests/editor/.
Props patopaiar, jrf.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@50288


git-svn-id: http://core.svn.wordpress.org/trunk@49933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-11 20:54:16 +00:00
Sergey Biryukov
7034111a38 Tests: Add missing @covers tags for files in phpunit/tests/dependencies/.
Props patopaiar, jrf.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@50287


git-svn-id: http://core.svn.wordpress.org/trunk@49932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-11 15:17:07 +00:00
Sergey Biryukov
262234df8d Tests: Add missing @covers tags for files in phpunit/tests/db/.
Props patopaiar, jrf.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@50286


git-svn-id: http://core.svn.wordpress.org/trunk@49931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-11 14:04:09 +00:00
desrosj
1cfa0a1370 Build/Test Tools: Install WordPress Importer plugin when installing the Docker-based local environment.
The WordPress Importer plugin is now downloaded to the `tests/phpunit/data/plugins` directory when running `npm run env:install`.

This ensures that the PHPUnit test suite will not fail when the plugin is missing.

This also introduces a new `WP_IMPORTER_REVISION` variable to the `.env` file, to control the SVN revision that is checked out.

Props johnbillion.
Fixes #49720.
Built from https://develop.svn.wordpress.org/trunk@50285


git-svn-id: http://core.svn.wordpress.org/trunk@49930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-10 16:54:07 +00:00
Sergey Biryukov
fc8e180035 Tests: Use assertSame() in some newly introduced tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [49904], [49925], [49992], [50012], [50013], [50065], [50075], [50131], [50150], [50157].

See #38266, #52482.
Built from https://develop.svn.wordpress.org/trunk@50284


git-svn-id: http://core.svn.wordpress.org/trunk@49929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-10 13:27:02 +00:00
Sergey Biryukov
24dbafaba5 Tests: Replace most instances of assertEquals() in phpunit/includes/ with assertSame().
Follow-up to [48937], [48939], [48940], [48944].

Props johnbillion, jrf, SergeyBiryukov.
See #38266, #52482.
Built from https://develop.svn.wordpress.org/trunk@50283


git-svn-id: http://core.svn.wordpress.org/trunk@49928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-10 13:25:09 +00:00
Peter Wilson
0f251cdd90 Canonical: Rename wp_force_plain_ugly_permalink() to match UI terminology.
Rename `wp_force_plain_ugly_permalink()` to `wp_force_plain_post_permalink()` to match terminology used in the WordPress dashboard.

Follow up to [50132].
Props SergeyBiryukov.
Fixes #5272.


Built from https://develop.svn.wordpress.org/trunk@50282


git-svn-id: http://core.svn.wordpress.org/trunk@49927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-10 05:40:07 +00:00
desrosj
30da2b425d Post WordPress 5.7 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@50281


git-svn-id: http://core.svn.wordpress.org/trunk@49926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 20:40:04 +00:00
desrosj
bcbad3aef8 WordPress 5.7 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@50280


git-svn-id: http://core.svn.wordpress.org/trunk@49925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 20:26:05 +00:00
Sergey Biryukov
38696a7290 Tests: Add missing @covers tags for files in phpunit/tests/date/.
Props patopaiar, jrf.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@50279


git-svn-id: http://core.svn.wordpress.org/trunk@49924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 19:57:02 +00:00
ryelle
10d1280ff3 Administration: Update color contrast on UI elements.
The color palette changes in #49999 introduced some contrast issues on buttons, input elements, and links. This change ensures that all interactive elements have an appropriate contrast ratio.

Follow-up to [50025].
Props audrasjb, joedolson.
Fixes #52402.


Built from https://develop.svn.wordpress.org/trunk@50278


git-svn-id: http://core.svn.wordpress.org/trunk@49923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 19:47:03 +00:00
desrosj
ac126c1062 Build/Test Tools: Synchronize svn:ignore with .gitignore.
Some files ignored within the `.gitignore` file were not included in the `svn:ignore` property.

This also removed `wp-config.php` and `wp-tests-config.php` from the `svn:ignore` property. It’s already specified in `svn:global-ignores`.

Props johnbillion.
Fixes #49784.
Built from https://develop.svn.wordpress.org/trunk@50277


git-svn-id: http://core.svn.wordpress.org/trunk@49922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 18:42:05 +00:00
Sergey Biryukov
7cae8b1c02 Tests: Correct the test for NOT BETWEEN comparison operator in WP_Date_Query.
Follow-up to [29793].

Props patopaiar, jrf.
See #39265, #51802.
Built from https://develop.svn.wordpress.org/trunk@50276


git-svn-id: http://core.svn.wordpress.org/trunk@49921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 18:10:04 +00:00
Sergey Biryukov
8212925c11 Twenty Twenty: Make ordered list styling in classic editor match the front-end style.
Props sabernhardt, sebastienserre, hareesh-pillai.
Fixes #50454.
Built from https://develop.svn.wordpress.org/trunk@50275


git-svn-id: http://core.svn.wordpress.org/trunk@49920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 17:54:04 +00:00
antpb
0c5a3fa2ed Media: Make adjacent_image_link() include alt text when returning an image.
When using the `adjacent_image_link()` function there is a condition that will return a linked image. Previously, the returned image was sent without alt attributes.

Now, `adjacent_image_link()` will include alt attributes of the image's title when an image is returned.

Props joedolson, Mista-Flo, sabernhardt.
Fixes #52387.

Built from https://develop.svn.wordpress.org/trunk@50274


git-svn-id: http://core.svn.wordpress.org/trunk@49919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 17:27:05 +00:00
Sergey Biryukov
8bd0709dba Twenty Twenty-One: Use correct value for the global line-height CSS variable.
Props acerempel, mukesh27, dd32, poena.
Fixes #52477.
Built from https://develop.svn.wordpress.org/trunk@50273


git-svn-id: http://core.svn.wordpress.org/trunk@49918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 17:10:05 +00:00
Sergey Biryukov
2fdd20da49 Site Health: Link to the support article on troubleshooting in "There has been a critical error" message.
This page is more geared towards users than the one on debugging, which is more developer-oriented.

Props audrasjb, Clorith, Ipstenu.
Fixes #52392.
Built from https://develop.svn.wordpress.org/trunk@50272


git-svn-id: http://core.svn.wordpress.org/trunk@49917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 16:59:04 +00:00
John Blackbourn
3e801fdb5d Comments: Extend the duration of the window within which unapproved comments are visible by their author.
This extension is necessary because the comment approval notification opt-in form introduced in [47887] uses the same mechanism, and the previous limit of one minute meant that users on a slow connection, using assistive technology, with limited motor skills, or who are generally indecisive may not complete the opt-in action within one minute, and therefore not see the confirmation message.

Props joedolson, imath, hellofromTonya, peterwilsoncc, alexstine, davidbaumwald 

Fixes #52406

Built from https://develop.svn.wordpress.org/trunk@50271


git-svn-id: http://core.svn.wordpress.org/trunk@49916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 16:57:04 +00:00
Sergey Biryukov
4fd440cd5c External Libraries: Further fix jQuery deprecations in WordPress core.
This addresses `JQMIGRATE` warnings in the `image-edit.js` library and the `imgAreaSelect` jQuery plugin

Follow-up to [50001].

Props Clorith, poena, dariak, jeroenrotty.
See #51812.
Built from https://develop.svn.wordpress.org/trunk@50270


git-svn-id: http://core.svn.wordpress.org/trunk@49915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 16:45:06 +00:00
desrosj
34987fe903 Twenty Twenty-One: Prevent Dark Mode related JavaScript error.
This prevents an `Uncaught TypeError` in the block editor when scrolling caused by the absence of a `#dark-mode-toggler` element.

Props ocean90, mukesh27, justinahinon.
Fixes #52473.
Built from https://develop.svn.wordpress.org/trunk@50269


git-svn-id: http://core.svn.wordpress.org/trunk@49914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 14:56:04 +00:00
desrosj
d0c1e2b97b Build/Test Tools: Correct some inline documentation within GitHub Action files.
This corrects several inaccuracies within the GitHub Action workflow files.

See #50401.
Built from https://develop.svn.wordpress.org/trunk@50268


git-svn-id: http://core.svn.wordpress.org/trunk@49913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 14:18:03 +00:00
desrosj
5972493ca5 Build/Test Tools: Update NPM dependencies.
This updates two `devDependencies`:

- `uglify-js` from `3.12.6` to `3.12.7`.
- `check-node-version` from `4.0.3` to `4.1.0`.

See #51801.
Built from https://develop.svn.wordpress.org/trunk@50267


git-svn-id: http://core.svn.wordpress.org/trunk@49912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 14:16:19 +00:00
John Blackbourn
ea252a7cba Posts, Post Types: Clarify the documentation about the return value of get_post() when a falsey value is passed.
Props Rahe, juliobox, peterwilsoncc, hellofromTonya, audrasjb

Fixes #33068

Built from https://develop.svn.wordpress.org/trunk@50266


git-svn-id: http://core.svn.wordpress.org/trunk@49911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 13:44:04 +00:00
John Blackbourn
18c0b1c561 Build/Test Tools: Various docblock improvements within test utilities.
See #51802

Built from https://develop.svn.wordpress.org/trunk@50265


git-svn-id: http://core.svn.wordpress.org/trunk@49910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 13:24:04 +00:00
Sergey Biryukov
19ce835654 Docs: Update some recently added inline comments per the documentation standards.
Follow-up to [50256], [50258], [50259].

See #51800.
Built from https://develop.svn.wordpress.org/trunk@50264


git-svn-id: http://core.svn.wordpress.org/trunk@49909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 12:34:06 +00:00
Sergey Biryukov
ea2ff553e9 Site Health: Clarify the recommendation in file uploads test when post_max_size is defined as 0.
This adds a more descriptive text in scenarios where `post_max_size` and `upload_max_filesize` differ, and `post_max_size` is set to a value of `0`.

In some scenarios, PHP may read `0` as a literal zero size, and not as unlimited, which it also means in other scenarios.

See https://www.php.net/manual/en/ini.core.php#ini.post-max-size for details, as PHP 5.3.4 introduced this behavior for literal zero interpretation when the content type of a request is `application/x-www-form-urlencoded` or is not registered with PHP.

Props Clorith, pixolin, helen, ratneshk.
Fixes #51466.
Built from https://develop.svn.wordpress.org/trunk@50263


git-svn-id: http://core.svn.wordpress.org/trunk@49908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 12:05:07 +00:00
Peter Wilson
98b855ed94 Twenty Twenty-One: Update editor styles of search block.
Update editor styles to more closely match the front-end following upstream changes.

Props poena, paaljoachim, hellofromTonya.
Fixes #52433.


Built from https://develop.svn.wordpress.org/trunk@50262


git-svn-id: http://core.svn.wordpress.org/trunk@49907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 03:55:05 +00:00
Peter Wilson
2ffff78f51 Twenty Twenty-One: Adapt vertical buttons to text length.
Display vertically aligned buttons as inline elements.

Props poena, paaljoachim, hellofromTonya, jeroenrotty, rolfsiebers.
Fixes #52432.


Built from https://develop.svn.wordpress.org/trunk@50261


git-svn-id: http://core.svn.wordpress.org/trunk@49906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 03:44:06 +00:00
Peter Wilson
165413db2b Twenty Twenty-One: Support font size option for code block.
Props poena, paaljoachim, hellofromTonya.
See #52431.


Built from https://develop.svn.wordpress.org/trunk@50260


git-svn-id: http://core.svn.wordpress.org/trunk@49905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-09 03:24:05 +00:00
noisysocks
c6ec6cdc88 Fix wp.i18n.isRTL()
Fixes a bug causing wp.i18n.isRTL() to return false in RTL langauges by manually
loading the translated 'ltr' string for the i18n dependency. This ports over an
identical fix that was made in Gutenberg.

Fixes #52441.
Props @jonsurrell @youknowriad.

Built from https://develop.svn.wordpress.org/trunk@50259


git-svn-id: http://core.svn.wordpress.org/trunk@49904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-08 23:51:10 +00:00
antpb
19dbb952f3 Media: Allow post_date to be respected in media_handle_sideload().
Previously, date information was unable to be changed when using `media_handle_sideload()`. 

Now you can override the date for a media item using `$post_data['post_date']` before using the function.

Props jamesgol, mukesh27, SergeyBiryukov, hellofromTonya, Mista-Flo.
Fixes #50972.

Built from https://develop.svn.wordpress.org/trunk@50258


git-svn-id: http://core.svn.wordpress.org/trunk@49903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-08 23:22:04 +00:00
Peter Wilson
71b277da38 Posts/Post Types: Improve documentation of get_posts().
Add references to `WP_Query` to the documentation of `get_posts()`. As the developer documentation for `WP_Query` includes an expanded explanation a full link to developer.wordpress.org is included rather than a standard `@see`.

Props dam6pl, peterwilsoncc.
See #51852, #51800.


Built from https://develop.svn.wordpress.org/trunk@50257


git-svn-id: http://core.svn.wordpress.org/trunk@49902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-08 22:52:02 +00:00
antpb
b981f48184 Media: Pause any playing media when closing the the media modal.
Previously, any video or audio playing in the media modal failed to stop playing when the modal was closed. Now we pause the player when the modal is closed.

Props adamsilverstein, hellofromTonya, paaljoachim, Mista-Flo, Clorith, justinahinon, afercia, amolv.
Fixes #48562.

Built from https://develop.svn.wordpress.org/trunk@50256


git-svn-id: http://core.svn.wordpress.org/trunk@49901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-08 21:44:09 +00:00
Dominik Schilling
219d92f75b Block Editor: Use a unique name for the nonce of the custom fields toggle form.
Avoids a browser warning for having two elements with a non-unique id `#_wpnonce` on the post edit screen.

See #23165.
Fixes #51483.
Props vandestouwe, Mista-Flo.
Built from https://develop.svn.wordpress.org/trunk@50255


git-svn-id: http://core.svn.wordpress.org/trunk@49900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-08 21:39:16 +00:00
ryelle
591845b4c9 Privacy: Update colors to match new color palette.
Follow-up to [50161].
Props xkon.
Fixes #52436.


Built from https://develop.svn.wordpress.org/trunk@50238


git-svn-id: http://core.svn.wordpress.org/trunk@49899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-08 19:15:06 +00:00
ryelle
d4e4828d0a Administration: Fix background color of plugin update row on small screens.
When the color change was done, the background of plugins with updates had to be manually changed. This section was missed, which caused a visual bug. This fix also removes some redundant CSS for the same element.

Follow-up to [50025].
Props afragen.
Fixes #52452.


Built from https://develop.svn.wordpress.org/trunk@50237


git-svn-id: http://core.svn.wordpress.org/trunk@49898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-08 16:13:07 +00:00
Sergey Biryukov
8bc5c10684 Docs: Clarify the @return value for wp_get_attachment_image_url() and get_the_post_thumbnail_url().
Props GeekPress, audrasjb, naveen17797.
Fixes #52183.
Built from https://develop.svn.wordpress.org/trunk@50236


git-svn-id: http://core.svn.wordpress.org/trunk@49897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-08 14:14:08 +00:00
noisysocks
d5fd2d8ea7 Editor: Update @wordpress npm packages
Update @wordpress npm packages to the latest published versions. This includes
block editor bug fixes for WordPress 5.7 beta 2.

Fixes #52467.

Built from https://develop.svn.wordpress.org/trunk@50235


git-svn-id: http://core.svn.wordpress.org/trunk@49896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-08 03:37:09 +00:00
Sergey Biryukov
b88325dbc6 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Adjust some newly introduced strings to remove unnecessary numbered placeholders for consistency.

Follow-up to [42827].

See #51800.
Built from https://develop.svn.wordpress.org/trunk@50234


git-svn-id: http://core.svn.wordpress.org/trunk@49895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-07 12:44:04 +00:00
Sergey Biryukov
48469c6a8f Twenty Twenty-One: Capitalize translator comments consistently.
Follow-up to [45932].

See #51800.
Built from https://develop.svn.wordpress.org/trunk@50233


git-svn-id: http://core.svn.wordpress.org/trunk@49894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-07 12:28:08 +00:00
Sergey Biryukov
1aca7e8b25 Editor: Correct the check for unsaved content in wp.autosave.server.postChanged().
This fixes improper triggering of the "Are you sure?" prompt when navigating away from the old, "classic" Edit Post screen and there are no changes.

The previous check did not account for Pages or any custom post types that don't have a Title, Content, or Excerpt field.

Follow-up to [50031].

Props hwk-fr, mukesh27, audrasjb, archon810, Clorith, ibiza69, tonysandwich, roger995, bartosz777, viablethought, dbtedg, worldedu, hmabpera, magnuswebdesign.
Fixes #52440.
Built from https://develop.svn.wordpress.org/trunk@50232


git-svn-id: http://core.svn.wordpress.org/trunk@49893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-06 14:16:07 +00:00
Sergey Biryukov
a8d455a78f Docs: Use typed array notation in the update_post_term_count_statuses filter DocBlock.
Follow-up to [50169].

See #38843.
Built from https://develop.svn.wordpress.org/trunk@50231


git-svn-id: http://core.svn.wordpress.org/trunk@49892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 19:13:09 +00:00
Sergey Biryukov
a80f705d97 Privacy: Rename the $send_confirmation_email parameter of wp_create_user_request() to $status, for clarity.
Follow-up to [50159], [50165].

Props xkon, TimothyBlynJacobs.
Fixes #52430. See #43890.
Built from https://develop.svn.wordpress.org/trunk@50230


git-svn-id: http://core.svn.wordpress.org/trunk@49891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 15:50:05 +00:00
John Blackbourn
9cd08881ba Users: Coding standards fixes after [50228].
See #52238

Built from https://develop.svn.wordpress.org/trunk@50229


git-svn-id: http://core.svn.wordpress.org/trunk@49890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 14:43:03 +00:00
John Blackbourn
523e292d8c Users: Allow the role of users to be bulk changed to no role from the Users listing screen.
This option is already available when editing an individual user, but it was previously missing from the bulk actions.

Props bonniebeeman, sabernhardt, ovidiul, jeroenrotty

Fixes #52238

Built from https://develop.svn.wordpress.org/trunk@50228


git-svn-id: http://core.svn.wordpress.org/trunk@49889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 14:40:08 +00:00
desrosj
d28712518c Build/Test Tools: Fix tests after [50185].
This removes a test assertion defending against version ranges in the `node` value in `package.json` files. This is now supported.

Props peterwilsoncc.
See #52341.
Built from https://develop.svn.wordpress.org/trunk@50192


git-svn-id: http://core.svn.wordpress.org/trunk@49870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 03:38:05 +00:00
desrosj
a752adb3e6 Build/Test Tools: Specify a version range within engines for node and npm.
This makes it more clear what versions of `node` and `npm` will successfully build WordPress.

Props dd32, mkaz.
Fixes #52455. See #51749.
Built from https://develop.svn.wordpress.org/trunk@50185


git-svn-id: http://core.svn.wordpress.org/trunk@49863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 02:46:08 +00:00
Sergey Biryukov
c8759b4a14 Privacy: Remove gray left border on the inline notices in Privacy Policy Guide.
Follow-up to [50161].

Props xkon.
See #52430.
Built from https://develop.svn.wordpress.org/trunk@50182


git-svn-id: http://core.svn.wordpress.org/trunk@49861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-04 12:48:05 +00:00
Sergey Biryukov
1e7305ed4b Privacy: Update URLs to the Privacy Policy Guide in help tabs.
Follow-up to [50147], [50161].

Props xkon.
See #52430.
Built from https://develop.svn.wordpress.org/trunk@50181


git-svn-id: http://core.svn.wordpress.org/trunk@49860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-04 12:06:07 +00:00
desrosj
2ca808a94c Build/Test Tools: Update NPM dependencies
This updates two dependencies to their latest versions:
- `uglify-js` from `3.12.5` to `3.12.6`.
- `sass` from `1.32.5` to `1.32.6`.

See #51801.
Built from https://develop.svn.wordpress.org/trunk@50176


git-svn-id: http://core.svn.wordpress.org/trunk@49855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-03 14:55:25 +00:00
Sergey Biryukov
21457d76d8 Docs: Consistently document the default value for $args parameter in various cron functions.
See #51800.
Built from https://develop.svn.wordpress.org/trunk@50175


git-svn-id: http://core.svn.wordpress.org/trunk@49854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-03 11:08:04 +00:00
Sergey Biryukov
a47580b247 Docs: Add a @since note to wp_clear_scheduled_hook() for the $wp_error parameter.
Follow-up to [50143].

See #49961.
Built from https://develop.svn.wordpress.org/trunk@50174


git-svn-id: http://core.svn.wordpress.org/trunk@49853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-03 10:58:07 +00:00
Sergey Biryukov
286dd01212 Post WordPress 5.7 Beta 1 version bump.
Built from https://develop.svn.wordpress.org/trunk@50172


git-svn-id: http://core.svn.wordpress.org/trunk@49851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 22:23:03 +00:00
Sergey Biryukov
896e9d7974 WordPress 5.7 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@50171


git-svn-id: http://core.svn.wordpress.org/trunk@49850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 22:06:06 +00:00
antpb
b566631d5e Media: Consistency in logic to pass wp_getimagesize() tests.
Previously, we used `DIR_TESTDATA` to determine if a test should skip a newly silenced error in `wp_getimagesize()`.

We are now using `WP_RUN_CORE_TESTS` instead for consistency.

Props hellofromTonya, SergeyBiryukov.
See #49889.

Built from https://develop.svn.wordpress.org/trunk@50170


git-svn-id: http://core.svn.wordpress.org/trunk@49849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 21:36:03 +00:00
antpb
a2fb85da68 Taxonomy: Add filter for post statuses when updating term count.
This adds a filter that allows `$post_statuses` to be modified in term count.

Props GunGeekATX, adamsilverstein, davecpage, nwjames, hellofromTonya, audrasjb, peterwilsoncc, TimothyBlynJacobs.
Fixes #38843.

Built from https://develop.svn.wordpress.org/trunk@50169


git-svn-id: http://core.svn.wordpress.org/trunk@49848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 21:06:05 +00:00
Sergey Biryukov
23b015ed48 General: Remove admin exception for https in network_home_url().
Previously, `network_home_url()` would automatically switch to `https` if the current request is already `https`, but would only do so on the front end.

This mirrors the change made earlier for `get_home_url()`.

Follow-up to [12598], [21937], [24844], [50156].
See #52421.
Built from https://develop.svn.wordpress.org/trunk@50168


git-svn-id: http://core.svn.wordpress.org/trunk@49847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 20:59:05 +00:00
Adam Silverstein
a506e02edd Security: add Content-Security-Policy script loaders.
Add new functions `wp_get_script_tag`, `wp_print_script_tag`, `wp_print_inline_script_tag` and `wp_get_inline_script_tag` that support script attributes. Enables passing attributes such as `async` or `nonce`, creating a path forward for enabling a Content-Security-Policy in core, plugins and themes.

Props tomdxw, johnbillion, jadeddragoon, jrchamp, mallorydxw, epicfaace, alinod, enricocarraro, ocean90.
Fixes #39941.



Built from https://develop.svn.wordpress.org/trunk@50167


git-svn-id: http://core.svn.wordpress.org/trunk@49846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 20:55:05 +00:00
whyisjake
d9cb5af64e Coding Standards: Update links to be https in package-lock.json
See [50163].

Unprops whyisjake.

Props clorith, antpb, jorbin.

Built from https://develop.svn.wordpress.org/trunk@50166


git-svn-id: http://core.svn.wordpress.org/trunk@49845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 20:48:04 +00:00
Sergey Biryukov
8984e4ef8c Docs: Update documentation for wp_create_user_request() per the documentation standards.
Add a `@since` note for the `$send_confirmation_email` parameter.

Follow-up to [50159].

See #43890.
Built from https://develop.svn.wordpress.org/trunk@50165


git-svn-id: http://core.svn.wordpress.org/trunk@49844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 20:42:03 +00:00
Sergey Biryukov
4773bc5699 General: Restore the $pagenow global in get_home_url().
This fixes test failures in `Tests_WP_Resource_Hints`.

Follow-up to [50156].

See #52421.
Built from https://develop.svn.wordpress.org/trunk@50164


git-svn-id: http://core.svn.wordpress.org/trunk@49843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 20:37:05 +00:00
whyisjake
8e8fe6d2c0 Administration: New filter ahead of the months drop-down.
As this can cause large, long running queries on sites with many posts, this filter allows the query to be modified, bypassing entirely if needed. 

Fixes #51660.

Props geoffguillain, SergeyBiryukov, hareesh-pillai, hellofromTonya, TimothyBlynJacobs, whyisjake. 


Built from https://develop.svn.wordpress.org/trunk@50163


git-svn-id: http://core.svn.wordpress.org/trunk@49842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 20:34:04 +00:00
Aaron Jorbin
56c9aa3cab Administration: use shorthand css properties to improve readability
Consolidating `border`, `padding`, and `margin` instances where the shorthand can be used to improve readability.

Props ankitmaru, audrasjb, sabernhardt, mukesh27, hellofromTonya.
Fixes #52148.


Built from https://develop.svn.wordpress.org/trunk@50162


git-svn-id: http://core.svn.wordpress.org/trunk@49841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 20:28:08 +00:00
TimothyBlynJacobs
9bab39685a Privacy: Redesign the Privacy settings pages.
The Privacy settings pages now use the same design patterns as the Site Health screen. Additionally, each privacy policy guide is now contained in an accordion to make the page easier to navigate when multiple plugins are in use.

Props xkon, hedgefield, garrett-eclipse, hellofromTonya, paaljoachim, joedolson.
Fixes #49264.

Built from https://develop.svn.wordpress.org/trunk@50161


git-svn-id: http://core.svn.wordpress.org/trunk@49840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 20:14:03 +00:00
antpb
f1483599a2 Coding Standards: Fix spacing in test_pending_status_with_false_send_confirmation_email test.
Follow-up to [50159] adjusts alignment of the `$request_data` value.

See #43890.

Built from https://develop.svn.wordpress.org/trunk@50160


git-svn-id: http://core.svn.wordpress.org/trunk@49839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 20:01:06 +00:00
antpb
64bb29d087 Privacy: Allow Admin to Skip e-mail confirmation for Export.
This adds a form option to skip the admin email alert when exporting personal data.

Props xkon, azaozz, TZ-Media, iandunn, desrosj, iprg, allendav, wesselvandenberg, karmatosed, birgire, davidbaumwald, estelaris, paaljoachim, hellofromTonya.
Fixes #43890.

Built from https://develop.svn.wordpress.org/trunk@50159


git-svn-id: http://core.svn.wordpress.org/trunk@49838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 19:45:03 +00:00
desrosj
2896790d57 Twenty Twenty-One: Fix wrapping for long text within comments.
This ensures that word wrapping occurs within comment content. 

Props mayankmajeji, audrasjb.
Fixes #52380.
Built from https://develop.svn.wordpress.org/trunk@50158


git-svn-id: http://core.svn.wordpress.org/trunk@49837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 19:40:04 +00:00
TimothyBlynJacobs
44b83e84ec REST API: Allow for the posts endpoint include/exclude terms query to include_children.
For example the `categories` or `categories_exclude` parameters can now optionally accept an object with a `terms` property that accepts the list of term ids and a new `include_children` property which controls the Tax Query `include_children` field.

Props jason_the_adams, jnylen0, birgire, dlh.
Fixes #39494.

Built from https://develop.svn.wordpress.org/trunk@50157


git-svn-id: http://core.svn.wordpress.org/trunk@49836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 19:25:05 +00:00
Sergey Biryukov
640c03842e General: Remove admin and login exceptions for https in get_home_url().
Previously, `get_home_url()` would automatically switch to `https` if the current request is already `https`, but would only do so on the front end.

This addresses the inconsistent behavior of returning different values in the admin and on the frontend.

Follow-up to [12598], [21937], [24844].

Props herregroen, mukesh27.
Fixes #52421.
Built from https://develop.svn.wordpress.org/trunk@50156


git-svn-id: http://core.svn.wordpress.org/trunk@49835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 19:03:04 +00:00
Sergey Biryukov
9dac2542aa Block Editor: Drop Noto Serif in favor of system fonts.
This aims to improve privacy and performance of the editor.

Follow-up to [37361].

Props Joen, hellofromTonya, garrett-eclipse, aristath, noisysocks, hedgefield, pento, sabernhardt, joyously, yannkozon.
Fixes #46169.
Built from https://develop.svn.wordpress.org/trunk@50155


git-svn-id: http://core.svn.wordpress.org/trunk@49834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 18:37:04 +00:00
antpb
ea3a1d782a Twenty Twenty-One: Make transparent PNG logo visible on focus.
This ensures a transparent logo remains visible while focused.

Props bduclos, poena, paaljoachim, hellofromTonya.
Fixes #52257.

Built from https://develop.svn.wordpress.org/trunk@50154


git-svn-id: http://core.svn.wordpress.org/trunk@49833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 18:29:05 +00:00
Sergey Biryukov
87f1e31871 Login and Registration: Improve the UX of the Reset Password screen.
Previously, it was unclear that the displayed password is only being suggested and should be saved by clicking the Reset Password button.

This adds separate Generate Password and Save Password buttons, for clarity.

Props xkon, estelaris, jaymanpandya, hedgefield, audrasjb, erichmond, magicroundabout, lukecavanagh, knutsp, tinodidriksen, nico_martin, markhowellsmead, kara.mcnair, e_baker, pixelverbieger, souri_wpaustria, megabyterose, poena, whyisjake.
Fixes #39638.
Built from https://develop.svn.wordpress.org/trunk@50153


git-svn-id: http://core.svn.wordpress.org/trunk@49832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 18:13:04 +00:00
desrosj
230c1c5c8a Coding Standards: Fix several minor coding standards issues.
These are made by running `composer format`.

Follow up to [50124], [50129], [50143].

See #49961, #52192, #34281.
Built from https://develop.svn.wordpress.org/trunk@50152


git-svn-id: http://core.svn.wordpress.org/trunk@49831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 18:04:03 +00:00
Sergey Biryukov
2cb2651c00 Upgrade/Install: Introduce a filter for the result of WP_Upgrader::install_package().
This allows for the capture and usage of error data from the method, to facilitate a potential plugin/theme rollback in the event of an update failure.

Props afragen, dd32.
Fixes #52381.
Built from https://develop.svn.wordpress.org/trunk@50151


git-svn-id: http://core.svn.wordpress.org/trunk@49830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 17:31:05 +00:00
TimothyBlynJacobs
8a51ab57e0 REST API: Return detailed error information from request validation.
Previously, only the first error message for each parameter was made available. Now, all error messages for a parameter are concatenated. Additionally, the detailed error for each parameter is made available in a new `details` section of the validation error. Each error is formatted following the standard REST API error formatting.

The `WP_REST_Server::error_to_response` method has been abstracted out into a standalone function `rest_convert_error_to_response` to allow for reuse by `WP_REST_Request`. The formatted errors now also contain an `additional_data` property which contains the additional error data provided by `WP_Error::get_all_error_data`.

Props dlh, xkon, TimothyBlynJacobs.
Fixes #46191.

Built from https://develop.svn.wordpress.org/trunk@50150


git-svn-id: http://core.svn.wordpress.org/trunk@49829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 17:28:02 +00:00
Sergey Biryukov
90ca61ba07 Upgrade/Install: Return a WP_Error from copy_dir() and _copy_dir() if the directory listing failed.
Props afragen, dd32.
Fixes #52342.
Built from https://develop.svn.wordpress.org/trunk@50149


git-svn-id: http://core.svn.wordpress.org/trunk@49828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 17:23:06 +00:00
Sergey Biryukov
aab7206ff8 Media: Move wp_getimagesize() to wp-includes/media.php, for consistency with other media functions.
Follow-up to [50146].

See #49889.
Built from https://develop.svn.wordpress.org/trunk@50148


git-svn-id: http://core.svn.wordpress.org/trunk@49827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 17:10:04 +00:00
Sergey Biryukov
f5857c6a9f Privacy: Add help tabs for Export Personal Data and Erase Personal Data screens.
Props xkon, burtrw, netweblogic, desrosj, hellofromTonya, garrett-eclipse.
Fixes #43994.
Built from https://develop.svn.wordpress.org/trunk@50147


git-svn-id: http://core.svn.wordpress.org/trunk@49826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 16:55:03 +00:00
antpb
f80e5d0919 Media: Avoid suppressing errors when using getimagesize().
Previously, all logic utilizing `getimagesize()` was supressing errors making it difficult to debug usage of the function. 

A new `wp_getimagesize()` function has been added to allow the errors to no longer be suppressed when `WP_DEBUG` is enabled.

Props Howdy_McGee, SergeyBiryukov, mukesh27, davidbaumwald, noisysocks, hellofromTonya.
Fixes #49889.

Built from https://develop.svn.wordpress.org/trunk@50146


git-svn-id: http://core.svn.wordpress.org/trunk@49825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 16:53:04 +00:00
Sergey Biryukov
ce816eeda1 Privacy: Introduce manage_{$this->screen->id}_custom_column action in WP_Privacy_Requests_Table::column_default().
This brings some consistency with other list tables and allows for adding custom column data to columns registered with `manage_export-personal-data_columns` or `manage_erase-personal-data_columns` filters.

Props xkon, garrett-eclipse, birgire, pbiron, hellofromTonya, TimothyBlynJacobs, 7studio, mukesh27, Mista-Flo.
Fixes #44354.
Built from https://develop.svn.wordpress.org/trunk@50145


git-svn-id: http://core.svn.wordpress.org/trunk@49824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 16:44:04 +00:00
Joe McGill
373ee89c83 Media: Make filename checks less strict in 'wp_image_src_get_dimensions'.
This modifies the check for full size files so that only the basename is compared with the image `src` to avoid misses whenever the `src` path has been modified.

Props ianmjones.
Fixes: #52417.

Built from https://develop.svn.wordpress.org/trunk@50144


git-svn-id: http://core.svn.wordpress.org/trunk@49823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 15:28:04 +00:00
John Blackbourn
06c4b334fa Cron API: Introduce a $wp_error parameter to functions that write to the cron array.
This allows the functions to return a `WP_Error` object containing more information in case of a problem, instead of just boolean false.

The various `pre_` filters in these functions are also updated so they can return or be passed a `WP_Error` object.

Fixes #49961

Built from https://develop.svn.wordpress.org/trunk@50143


git-svn-id: http://core.svn.wordpress.org/trunk@49822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 13:49:03 +00:00
Sergey Biryukov
c504140c32 Block Editor: Remove the .is-dark-theme body class from the admin header.
With the changes to dark theme support in https://github.com/WordPress/gutenberg/pull/28233 to check the real background color of the theme, this no longer serves any purpose.

Follow-up to [44133].

Props scruffian, sabernhardt.
Fixes #52385.
Built from https://develop.svn.wordpress.org/trunk@50142


git-svn-id: http://core.svn.wordpress.org/trunk@49821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 13:05:02 +00:00
Sergey Biryukov
c5482c9b82 Docs: Update documentation for retrieve_password() per the documentation standards.
Follow-up to [50129], [50140].

See #34281.
Built from https://develop.svn.wordpress.org/trunk@50141


git-svn-id: http://core.svn.wordpress.org/trunk@49820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 12:43:04 +00:00
Sergey Biryukov
22188b3e85 Users: Move retrieve_password() to wp-includes/user.php, for consistency with other user functions.
Follow-up to [25231], [50129].

Props jfarthing84, dimadin.
See #34281, #31039.
Built from https://develop.svn.wordpress.org/trunk@50140


git-svn-id: http://core.svn.wordpress.org/trunk@49819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 12:37:03 +00:00
Sergey Biryukov
e0bda3a704 Users: Use consistent strings for error messages in wp-admin/users.php.
Use `_n()` for a string with plural forms.

Follow-up to [50129].

See #34281.
Built from https://develop.svn.wordpress.org/trunk@50139


git-svn-id: http://core.svn.wordpress.org/trunk@49818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 12:17:04 +00:00