43356 Commits

Author SHA1 Message Date
Sergey Biryukov
835066933b Tests: Add missing @covers tags for files in phpunit/tests/external-http/.
Props patopaiar, jrf.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@50290 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-11 20:53:51 +00:00
Sergey Biryukov
5b3cb96ce0 Tests: Add missing @covers tags for files in phpunit/tests/error-protection/.
Props patopaiar, jrf.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@50289 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-11 20:53:19 +00:00
Sergey Biryukov
f184ef4b6c Tests: Add missing @covers tags for files in phpunit/tests/editor/.
Props patopaiar, jrf.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@50288 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-11 20:52:52 +00:00
Sergey Biryukov
c49e14bd7b Tests: Add missing @covers tags for files in phpunit/tests/dependencies/.
Props patopaiar, jrf.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@50287 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-11 15:15:37 +00:00
Sergey Biryukov
a4617592cb Tests: Add missing @covers tags for files in phpunit/tests/db/.
Props patopaiar, jrf.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@50286 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-11 14:02:42 +00:00
Jonathan Desrosiers
6e49ac2e96 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50285 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-10 16:52:13 +00:00
Sergey Biryukov
3d259c2b22 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50284 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-10 13:24:24 +00:00
Sergey Biryukov
62d5c54b67 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50283 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-10 13:23:42 +00:00
Peter Wilson
f9b901549b 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@50282 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-10 05:38:23 +00:00
Jonathan Desrosiers
26b3fa70a3 Post WordPress 5.7 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@50281 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 20:38:37 +00:00
Jonathan Desrosiers
c351ffcb1c WordPress 5.7 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@50280 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 20:24:56 +00:00
Sergey Biryukov
def10f619b Tests: Add missing @covers tags for files in phpunit/tests/date/.
Props patopaiar, jrf.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@50279 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 19:55:35 +00:00
Kelly Choyce-Dwan
a25e5988dd 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@50278 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 19:45:47 +00:00
Jonathan Desrosiers
c35f0ede24 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50277 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 18:40:46 +00:00
Sergey Biryukov
6b7a708fa1 Tests: Correct the test for NOT BETWEEN comparison operator in WP_Date_Query.
Follow-up to [29793].

Props patopaiar, jrf.
See #39265, #51802.

git-svn-id: https://develop.svn.wordpress.org/trunk@50276 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 18:08:07 +00:00
Sergey Biryukov
93db55f9be Twenty Twenty: Make ordered list styling in classic editor match the front-end style.
Props sabernhardt, sebastienserre, hareesh-pillai.
Fixes #50454.

git-svn-id: https://develop.svn.wordpress.org/trunk@50275 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 17:53:00 +00:00
Anthony Burchell
5f2d089fb3 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@50274 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 17:25:18 +00:00
Sergey Biryukov
22ffa08799 Twenty Twenty-One: Use correct value for the global line-height CSS variable.
Props acerempel, mukesh27, dd32, poena.
Fixes #52477.

git-svn-id: https://develop.svn.wordpress.org/trunk@50273 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 17:08:31 +00:00
Sergey Biryukov
0ff5b67127 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50272 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 16:57:06 +00:00
John Blackbourn
22cd0a3b9e 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


git-svn-id: https://develop.svn.wordpress.org/trunk@50271 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 16:55:29 +00:00
Sergey Biryukov
93e1d628d0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50270 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 16:43:44 +00:00
Jonathan Desrosiers
73c1b28ec7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50269 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 14:54:48 +00:00
Jonathan Desrosiers
2833031cce Build/Test Tools: Correct some inline documentation within GitHub Action files.
This corrects several inaccuracies within the GitHub Action workflow files.

See #50401.

git-svn-id: https://develop.svn.wordpress.org/trunk@50268 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 14:15:50 +00:00
Jonathan Desrosiers
9207a14a64 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50267 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 14:14:25 +00:00
John Blackbourn
f0e3ab49b3 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


git-svn-id: https://develop.svn.wordpress.org/trunk@50266 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 13:42:58 +00:00
John Blackbourn
b4f354d524 Build/Test Tools: Various docblock improvements within test utilities.
See #51802


git-svn-id: https://develop.svn.wordpress.org/trunk@50265 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 13:22:47 +00:00
Sergey Biryukov
a4cb795001 Docs: Update some recently added inline comments per the documentation standards.
Follow-up to [50256], [50258], [50259].

See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@50264 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 12:32:54 +00:00
Sergey Biryukov
0b8b1f4006 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50263 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 12:04:01 +00:00
Peter Wilson
c25dcaf5e8 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@50262 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 03:53:14 +00:00
Peter Wilson
59ff18165e Twenty Twenty-One: Adapt vertical buttons to text length.
Display vertically aligned buttons as inline elements.

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



git-svn-id: https://develop.svn.wordpress.org/trunk@50261 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 03:42:43 +00:00
Peter Wilson
223bd0ee52 Twenty Twenty-One: Support font size option for code block.
Props poena, paaljoachim, hellofromTonya.
See #52431.



git-svn-id: https://develop.svn.wordpress.org/trunk@50260 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-09 03:22:42 +00:00
Robert Anderson
385c29b49a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@50259 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 23:49:33 +00:00
Anthony Burchell
27a113951b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@50258 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 23:20:56 +00:00
Peter Wilson
2e23c29603 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@50257 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 22:50:36 +00:00
Anthony Burchell
de258c87e6 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@50256 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 21:42:43 +00:00
Dominik Schilling
df0c776d1f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50255 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 21:37:34 +00:00
Kelly Choyce-Dwan
fb37bfa8e1 Privacy: Update colors to match new color palette.
Follow-up to [50161].
Props xkon.
Fixes #52436.



git-svn-id: https://develop.svn.wordpress.org/trunk@50238 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 19:13:09 +00:00
Kelly Choyce-Dwan
9c8e17821a 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@50237 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 16:11:34 +00:00
Sergey Biryukov
c3dd52264d Docs: Clarify the @return value for wp_get_attachment_image_url() and get_the_post_thumbnail_url().
Props GeekPress, audrasjb, naveen17797.
Fixes #52183.

git-svn-id: https://develop.svn.wordpress.org/trunk@50236 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 14:12:21 +00:00
Robert Anderson
a8179897a2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@50235 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 03:34:31 +00:00
Sergey Biryukov
ef0a312dc1 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50234 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-07 12:42:06 +00:00
Sergey Biryukov
cf8928cdfc Twenty Twenty-One: Capitalize translator comments consistently.
Follow-up to [45932].

See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@50233 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-07 12:26:41 +00:00
Sergey Biryukov
b301fa3d42 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50232 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-06 14:14:48 +00:00
Sergey Biryukov
a07d734d77 Docs: Use typed array notation in the update_post_term_count_statuses filter DocBlock.
Follow-up to [50169].

See #38843.

git-svn-id: https://develop.svn.wordpress.org/trunk@50231 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 19:11:15 +00:00
Sergey Biryukov
73b353ef95 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50230 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 15:48:59 +00:00
John Blackbourn
df85e54119 Users: Coding standards fixes after [50228].
See #52238


git-svn-id: https://develop.svn.wordpress.org/trunk@50229 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 14:42:01 +00:00
John Blackbourn
a690358619 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


git-svn-id: https://develop.svn.wordpress.org/trunk@50228 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 14:38:15 +00:00
Jonathan Desrosiers
5629865595 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50192 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 03:36:26 +00:00
Jonathan Desrosiers
36171d1a83 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50185 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 02:44:07 +00:00
Sergey Biryukov
3c40632397 Privacy: Remove gray left border on the inline notices in Privacy Policy Guide.
Follow-up to [50161].

Props xkon.
See #52430.

git-svn-id: https://develop.svn.wordpress.org/trunk@50182 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-04 12:46:58 +00:00