Commit Graph

31394 Commits

Author SHA1 Message Date
desrosj
6574121d8a External Libraries: Correct the hoverIntent version used when registering.
Follow up to [50521].

Props david.binda.
Fixes #53715.
Built from https://develop.svn.wordpress.org/trunk@51467


git-svn-id: http://core.svn.wordpress.org/trunk@51078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-21 12:18:06 +00:00
John Blackbourn
f5713b8d71 Application Passwords: Improve various user-facing and developer-facing terminology.
Fixes #53503, #53691

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


git-svn-id: http://core.svn.wordpress.org/trunk@51074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-19 21:14:57 +00:00
Sergey Biryukov
77f6357eac Tests: Replace assertContains() with assertStringContainsString() when used with strings.
Using the `assertContains()` and `assertNotContains()` methods with string haystacks was deprecated in PHPUnit 8 and removed in PHPUnit 9.

While WordPress test suite currently only supports PHPUnit up to 7.5.x, this allows us to switch to newer assertions ahead of adding full support for PHPUnit 8+.

These methods introduced in PHPUnit 7.5 should be used as an alternative:

* `assertStringContainsString()`
* `assertStringContainsStringIgnoringCase`
* `assertStringNotContainsString()`
* `assertStringNotContainsStringIgnoringCase`

As WordPress currently uses PHPUnit 5.7.x to run tests on PHP 5.6, polyfills for these methods were added to the `WP_UnitTestCase` class for PHPUnit < 7.5.

Follow-up to [51331], [51451], [51461].

Props jrf, dd32, SergeyBiryukov.
See #53363, #46149.
Built from https://develop.svn.wordpress.org/trunk@51462


git-svn-id: http://core.svn.wordpress.org/trunk@51073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-19 14:01:57 +00:00
Sergey Biryukov
1074ae9e4f Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertFalse( stripos( ... ) )` with `assertStringNotContainsString()` or `assertStringNotContainsStringIgnoringCase()` to use native PHPUnit functionality.

Going forward, these methods introduced in PHPUnit 7.5 should be used for similar assertions:

* `assertStringContainsString()`
* `assertStringContainsStringIgnoringCase()`
* `assertStringNotContainsString()`
* `assertStringNotContainsStringIgnoringCase()`

As WordPress currently uses PHPUnit 5.7.x to run tests on PHP 5.6, polyfills for these methods are now added to the `WP_UnitTestCase` class for PHPUnit < 7.5.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436], [51438], [51448], [51449], [51451], [51453], [51454].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51461


git-svn-id: http://core.svn.wordpress.org/trunk@51072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-19 13:30:57 +00:00
desrosj
14f024a34a Upgrade/Install: Add additional files to $_old_files for 5.8.
Follow up to [51134].

Fixes #53367.
Built from https://develop.svn.wordpress.org/trunk@51459


git-svn-id: http://core.svn.wordpress.org/trunk@51070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-19 00:59:57 +00:00
desrosj
50db2d585f Build/Test Tools: Update the caniuse browser data and regenerate CSS.
This includes three minor updates to generated CSS files:

- A single `-webkit-` prefix is removed for `min-width`, which was required for Safari <= 10.1 (0.06% total global usage). WordPress only supports the last two versions.
- 2 instances where the `-o-` prefix are added for `tab-size`. This appears to be for Opera Mobile, which has creeped back over the 1% global usage.

Props peterwilsoncc, jorbin.
Fixes #53686.
Built from https://develop.svn.wordpress.org/trunk@51456


git-svn-id: http://core.svn.wordpress.org/trunk@51067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-19 00:41:57 +00:00
desrosj
29e534376c Bundled Themes: Bump bundled theme versions for WordPress 5.8.
This bumps the version for all bundle themes in preparation for release with WordPress 5.8. The new versions are as follows:

- Twenty Twenty-One: 1.4
- Twenty Twenty: 1.8
- Twenty Nineteen: 2.1
- Twenty Seventeen: 2.8
- Twenty Sixteen: 2.5
- Twenty Fifteen: 3.0
- Twenty Fourteen: 3.2
- Twenty Thirteen: 3.4
- Twenty Twelve: 3.4
- Twenty Eleven: 3.8
- Twenty Ten: 3.4

Props mukesh27, kapilpaul.
Fixes #53277.
Built from https://develop.svn.wordpress.org/trunk@51455


git-svn-id: http://core.svn.wordpress.org/trunk@51066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-18 23:05:00 +00:00
Sergey Biryukov
a86d4cbd85 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( ... > 0 )` with `assertGreaterThan()` to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436], [51438], [51448], [51449], [51451], [51453].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51454


git-svn-id: http://core.svn.wordpress.org/trunk@51065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-18 14:11:57 +00:00
Sergey Biryukov
232597b633 Tests: Use more appropriate assertions in rest_sanitize_request_arg() tests.
This replaces instances of `assertSame( true, ... )` with `assertTrue()` to use native PHPUnit functionality.

Follow-up to [38832].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51453


git-svn-id: http://core.svn.wordpress.org/trunk@51064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-18 14:01:58 +00:00
Sergey Biryukov
ff737b2d76 Tests: Require the WP_REST_Test_Controller class in WP_REST_Controller tests.
This avoids a "Class not found" PHP fatal error when running these tests separately.

Follow-up to [38832].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51452


git-svn-id: http://core.svn.wordpress.org/trunk@51063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-18 13:47:00 +00:00
Sergey Biryukov
e0c355fcaa Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( strpos( ... ) > 0 )` with `assertStringContainsString()` to use native PHPUnit functionality.

Going forward, these methods introduced in PHPUnit 7.5 should be used for similar assertions:

* `assertStringContainsString()`
* `assertStringNotContainsString()`

As WordPress currently uses PHPUnit 5.7.x to run tests on PHP 5.6, polyfills for these methods are now added to the `WP_UnitTestCase` class for PHPUnit < 7.5.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436], [51438], [51448], [51449].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51451


git-svn-id: http://core.svn.wordpress.org/trunk@51062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-17 10:37:58 +00:00
Sergey Biryukov
69a57fe80e Tests: Correct the test for autosaving a post with Ajax.
`wp_autosave()` only updates drafts and auto-drafts created by the current user if the post is not locked.

As a result of previous Ajax test refactoring, setting the current user and creating a test post ended up in different methods, with the user being set after the post is already created.

This resulted in the test post being created with the `post_author` field set to zero, and the current user check in `wp_autosave()` failed. Instead of updating the original post as the test intended, it created a new autosave.

The test only passed accidentally due to `assertGreaterThanOrEqual()` not performing a strict type check.

Follow-up to [26995], [35311].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51450


git-svn-id: http://core.svn.wordpress.org/trunk@51061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-17 10:24:59 +00:00
Sergey Biryukov
7bcca73ed7 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertSame( 0, strpos( ... ) )` with `assertStringStartsWith()` to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436], [51438], [51448].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51449


git-svn-id: http://core.svn.wordpress.org/trunk@51060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-16 19:15:00 +00:00
Sergey Biryukov
4a8667c576 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( is_string( ... ) )` with `assertIsString()` to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436], [51438].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51448


git-svn-id: http://core.svn.wordpress.org/trunk@51059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-16 09:52:00 +00:00
youknowriad
e76d4e1bcd Block Editor: Backport fixes targetted for WordPress 5.8 RC4.
This includes:

 - Suggestion List: Check if a node exists to scroll into view.
 - Autocomplete: reset state for empty text.
 - Adds auxiliary class names for editor styles in the widgets editor.
 - Extract snackbars into a separate component.
 - Rich text: run input rules after composition end.
 - iframe: load inline styles.
 - Multi select: select all: restore ref callback.
 - Writing flow: allow select all from empty selection.
 - Post Excerpt: Fix excerpt_more filter conflict and remove wordCount attribute.
 - Add the percent unit to the default units in Core.

Props desrosj.
See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 18:55:29 +00:00
desrosj
904862da90 Media: Document edge cases with the new image_editor_output_format filter.
More testing has revealed that the `image_editor_output_format` filter has some interesting edge cases that developers should be aware of when electing to use this filter (see #53667 and #53668).

Because this is a new filter that was intended to be used for experimenting with different ways to handle generating image sizes and has not yet been adopted in the wild, expanding the inline documentation is an acceptable temporary solution while these edge cases are explored further and addressed.

Props mikeschroder, antpb, desrosj, adamsilverstein, ianmjones.
See #5366, #53668, #35725.
Built from https://develop.svn.wordpress.org/trunk@51442


git-svn-id: http://core.svn.wordpress.org/trunk@51053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 17:39:59 +00:00
joedolson
f0e5f17c2c Media: Fix JS error in Media Library when infinite scroll enabled.
Wrap call to this.updateLoadMoreView() is wrapped in a check that infinite scroll is disabled to prevent JS errors.

Props wildworks.
Fixes #53672.
Built from https://develop.svn.wordpress.org/trunk@51440


git-svn-id: http://core.svn.wordpress.org/trunk@51051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 17:00:59 +00:00
Sergey Biryukov
1c4ec82ce7 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( is_numeric( ... ) )` with `assertIsNumeric()` to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51438


git-svn-id: http://core.svn.wordpress.org/trunk@51049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 14:45:56 +00:00
Sergey Biryukov
d3d8d166c8 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( is_a( ... ) )` with `assertInstanceOf()` to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51436


git-svn-id: http://core.svn.wordpress.org/trunk@51047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 09:08:01 +00:00
Andrew Ozz
15f9f7c6b9 Media: When resizing WebP images set the compression to "lossy" by default. Fixes a bug where the compression was set to "lossless" when the uploaded WebP images have extended file format (VP8X).
Props adamsilverstein, mikeschroder, mmxxi, linux4me2.
Fixes #53653.
Built from https://develop.svn.wordpress.org/trunk@51435


git-svn-id: http://core.svn.wordpress.org/trunk@51046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 00:43:00 +00:00
desrosj
88cedeac5c Bundled Themes: Revert the [51372] update to block patterns in bundled themes.
Upon further examination, this change was not great for backwards compatibility, resulting in block validation errors when running on older versions of WordPress.

While there are currently many `console.info()` notices caused by older format block syntax being updated to the current version included in WordPress 5.8, the blocks do not break.

Block patterns do not currently have a versioning mechanism, or a means to indicate which versions of WordPress are supported.

See #53617.
Built from https://develop.svn.wordpress.org/trunk@51434


git-svn-id: http://core.svn.wordpress.org/trunk@51045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-14 20:02:59 +00:00
desrosj
88309aa27e Widgets: Prevent widgets unintentionally being moved to the inactive sidebar.
This fixes a bug where widgets are unintentionally moved to the `wp_inactive_widgets` sidebar when batch updates occur through the REST API.

When batch requests are processed, only `$_wp_sidebars_widgets is updated by previous calls to `WP_REST_Widgets_Controller::create_item()`. `$sidebars_widgets` is not aware of the new widget’s intended location, and `retrieve_widgets()` mistakenly flags the widget as inactive.

Calling `wp_get_sidebars_widgets()` before `retrieve_widgets()` ensures both global variables match and is intended as a temporary fix until the root cause of the problem can be fixed.

Props zieladam, htmgarcia, timothyblynjacobs.
Fixes #53657.
Built from https://develop.svn.wordpress.org/trunk@51432


git-svn-id: http://core.svn.wordpress.org/trunk@51043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-14 16:45:58 +00:00
desrosj
440fd76242 Privacy: Ensure the copy button actually copies the suggested privacy policy text.
Follow up to [50609].

Props walbo, SergeyBiryukov.
Fixes #53652. See #52891.
Built from https://develop.svn.wordpress.org/trunk@51431


git-svn-id: http://core.svn.wordpress.org/trunk@51042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-14 16:17:59 +00:00
Sergey Biryukov
a727138559 Docs: Synchronize the $post_id argument description for some post and attachment functions.
See #53399.
Built from https://develop.svn.wordpress.org/trunk@51430


git-svn-id: http://core.svn.wordpress.org/trunk@51041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-14 08:14:01 +00:00
desrosj
b8c451cdec Editor: Second round of package updates ahead of RC3.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj.
Built from https://develop.svn.wordpress.org/trunk@51426


git-svn-id: http://core.svn.wordpress.org/trunk@51037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 23:58:30 +00:00
Sergey Biryukov
10f7a91fa7 Docs: Correct documentation for wp_get_post_parent_id().
The `$post` parameter is required and does not have a default value.

Follow-up to [42397].

Props denisco.
See #53399.
Built from https://develop.svn.wordpress.org/trunk@51425


git-svn-id: http://core.svn.wordpress.org/trunk@51036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 18:34:57 +00:00
desrosj
46f0cfe3ca Coding Standards: Use the correct formatting for multi-line comments.
Follow up to [51414].
Built from https://develop.svn.wordpress.org/trunk@51423


git-svn-id: http://core.svn.wordpress.org/trunk@51034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 18:02:57 +00:00
youknowriad
e270f4f0f3 Block Editor: Include the fixes targetted for WordPress 5.8 RC3.
This includes the following fixes:
 - Safari: see if compositing layer size is more reasonable when position fixed divs are not inserted into content.
 - Site Logo Block: update Site Logo block UI and option syncing.
 - Fix moving inner blocks in the Widgets Customizer.
 - Allow themes to provide empty values for color.duotone and spacing.units
 - Update getTermsInfo() to workaround parsing issue for translatable strings.
 - Specify what settings can be part of settings.layout.
 - Update conditions to hide duotone panel.
 - Prevent entering invalid values in the Query Loop block config.
 - Prevent color panel from showing as empty.
 - Avoid calling gutenberg_ functions within code shipped through WordPress Core.

Props desrosj.
See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 16:41:28 +00:00
Sergey Biryukov
8b2e5e7843 Tests: Reset $current_screen global between tests to avoid cross-test interdependencies.
This provides a consistent global starting state for tests that interact with admin screens.

Individual tests no longer need to invoke `set_current_screen( 'front' )` (or an alternative implementation) as a reset.

Follow-up to [29251], [29860], [31046], [36721], [38678], [48908], [50433].

Props hellofromTonya, johnbillion.
Fixes #53431.
Built from https://develop.svn.wordpress.org/trunk@51419


git-svn-id: http://core.svn.wordpress.org/trunk@51030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 16:14:58 +00:00
ryelle
f1e1a53f5a Help/About: Update the About page for 5.8.
Use a larger image for theme.json on retina screens, and update the spacing of sections on the page.

Props javiarce.
See #52775.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 15:39:57 +00:00
Mike Schroder
b95e0b391c Customizer: Don’t always set normalizedTransitionendEventName to null.
Reverts [51389].

Unprops mikeschroder.
See #53562.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 14:04:57 +00:00
Sergey Biryukov
8ed1859c35 Tests: Clean up skipping conditions and requirements for various tests.
This improves the consistency of test skipping and ensures that:

* The `@requires` annotations use the right condition and format, and are on the right level (class vs. function).
* Inline conditions with a `markTestSkipped()` call are only used when annotations cannot be used.
* All `markTestSkipped()` calls contain a verbose explanation of why the test is being skipped.

Props jrf, hellofromTonya.
Fixes #53009.
Built from https://develop.svn.wordpress.org/trunk@51415


git-svn-id: http://core.svn.wordpress.org/trunk@51026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 10:45:02 +00:00
Peter Wilson
34119e2c95 Widgets: Validate HTML before saving block widgets.
Props talldanwp, noisysocks, kevin940726, peterwilsoncc.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 05:59:01 +00:00
ryelle
a5cfc54fec Help/About: Update the About section for 5.8.
Update the image links to use the CDN. Use regular text color for headings. Fix two string issues. Remove unnecessary `wp-components` script & style.

Props nao, audrasjb, karmatosed, desrosj, javiarce, milana_cap.
See #52775.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 00:12:56 +00:00
desrosj
f2b3c983f6 Docs: Various documentation fixes following [51129].
- Typo corrections in filter descriptions.
- DocBlocks are now now wrapped to the next line after 80 characters, and not extending beyond 120 total characters wide.
- Remove unnecessary repeated references to the suggested replacement hooks.
- Adjustments to the indentation for consistency with other emails in Core, allowing the `phpcs:ignore` comment to be removed.

Props SergeyBiryukov.
Fixes #44314.
Built from https://develop.svn.wordpress.org/trunk@51410


git-svn-id: http://core.svn.wordpress.org/trunk@51021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 00:02:57 +00:00
desrosj
b60650f5bd Widgets: Replace wp.editor references in the legacy text widget.
This changes the references to `wp.editor` in the text widget’s JavaScript to `wp.oldEditor`, which is the new location for the old `editor` script that was previously available at `window.wp.editor`. 

Follow up to [51387-51388,51390].

Props spacedmonkey, zieladam.
Fixes #53437.
Built from https://develop.svn.wordpress.org/trunk@51409


git-svn-id: http://core.svn.wordpress.org/trunk@51020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-12 23:57:57 +00:00
desrosj
a3a7ccf107 Widgets: Use wp_sidebar_description() to retrieve a sidebar’s description.
This switches `WP_REST_Sidebars_Controller` to use `wp_sidebar_description()` for retrieving the `description` of a given sidebar instead of referencing the value in the `$wp_registered_sidebars` global variable directly.

`wp_sidebar_description()` uses `wp_kses()` to only allow the default list of `$allowed_tags` to be present in a sidebar’s `description`.

Props timothyblynjacobs, desrosj.
Fixes #53646.
Built from https://develop.svn.wordpress.org/trunk@51408


git-svn-id: http://core.svn.wordpress.org/trunk@51019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-12 19:03:57 +00:00
Sergey Biryukov
2276bef421 Coding Standards: Fix WPCS issue in [51404].
This fixes an "Expected 1 spaces before closing parenthesis; 0 found" error.

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51405


git-svn-id: http://core.svn.wordpress.org/trunk@51016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-12 10:53:59 +00:00
Sergey Biryukov
79b4f21761 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( in_array( ... ) )` with `assertContains()` to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397], [51403].

Props hellofromTonya, jrf, SergeyBiryukov.
Fixes #53123. See #53363.
Built from https://develop.svn.wordpress.org/trunk@51404


git-svn-id: http://core.svn.wordpress.org/trunk@51015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-12 10:37:00 +00:00
Sergey Biryukov
fb44d80643 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( empty( ... ) )` with `assertEmpty()` to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51403


git-svn-id: http://core.svn.wordpress.org/trunk@51014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-11 12:42:59 +00:00
Andrew Ozz
8a8c4796db TinyMCE: ensure initialization runs in all cases on 'interactive' and 'complete' readyState. Fixes a rare bug when the init code is inserted in the DOM after the page has finished loading.
Props Collizo4sky, azaozz.
Fixes #53632.
Built from https://develop.svn.wordpress.org/trunk@51402


git-svn-id: http://core.svn.wordpress.org/trunk@51013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-10 23:58:57 +00:00
Sergey Biryukov
f45d515ff8 Twenty Fifteen: Use strict comparison in inc/custom-header.php.
Props kapilpaul.
See #53359.
Built from https://develop.svn.wordpress.org/trunk@51401


git-svn-id: http://core.svn.wordpress.org/trunk@51012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-10 18:43:57 +00:00
Sergey Biryukov
84f725010b Bundled Themes: Correct comment formatting in inc/block-patterns.php.
Follow-up to [51045], [51103].

Props kapilpaul.
See #53359, #52627.
Built from https://develop.svn.wordpress.org/trunk@51400


git-svn-id: http://core.svn.wordpress.org/trunk@51011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-10 18:40:57 +00:00
Sergey Biryukov
c205a7e583 Coding Standards: Rename the $ID variable to $user_id in wp_insert_user() and wp_update_user().
This fixes a "Variable `$ID` is not in valid snake_case format" WPCS warning.

Follow-up to [2872].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@51399


git-svn-id: http://core.svn.wordpress.org/trunk@51010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-10 12:21:58 +00:00
Sergey Biryukov
514f23aef8 Users: Return earlier from wp_update_user() in case of error.
This ensures that if the `wp_insert_user()` call resulted in a `WP_Error` object, it is returned right away without any further actions.

Follow-up to [32820].

Fixes #53627.
Built from https://develop.svn.wordpress.org/trunk@51398


git-svn-id: http://core.svn.wordpress.org/trunk@51009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-10 12:00:58 +00:00
Sergey Biryukov
d4ca0e0790 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( isset( ... ) )` with `assertArrayHasKey()` to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51397


git-svn-id: http://core.svn.wordpress.org/trunk@51008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-10 11:16:58 +00:00
Sergey Biryukov
c51c4ab729 Code Modernization: Only check collation in wpdb methods if the query is not empty.
This avoids a deprecation notice on PHP 8.1 caused by passing `null` instead of a string to `ltrim()` in `wpdb::check_safe_collation()`, and maintains the current behaviour.

Follow-up to [30345], [32162], [33455].

See #53635.
Built from https://develop.svn.wordpress.org/trunk@51396


git-svn-id: http://core.svn.wordpress.org/trunk@51007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-10 11:15:59 +00:00
Sergey Biryukov
e304c93a58 Coding Standards: Add missing semicolon to endforeach keywords in media templates.
Follow-up to [27411], [27440].

Props vishitshah, mukesh27, nielslange, sabernhardt.
Fixes #46103.
Built from https://develop.svn.wordpress.org/trunk@51395


git-svn-id: http://core.svn.wordpress.org/trunk@51006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-10 10:40:58 +00:00
Sergey Biryukov
7922a90974 I18N: Translate _doing_it_wrong() messages in wp_check_widget_editor_deps().
This makes them consistent with other similar messages in core.

Follow-up to [51387], [51388], [51390].

See #53437, #53569.
Built from https://develop.svn.wordpress.org/trunk@51391


git-svn-id: http://core.svn.wordpress.org/trunk@51002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-09 10:57:59 +00:00
Sergey Biryukov
eb9d31bb11 Docs: Some documentation improvements for wp_check_widget_editor_deps():
* Add missing short description for the function.
* Correct function names in `_doing_it_wrong()` calls.
* Document the usage of `$wp_scripts` and `$wp_styles` globals.
* Update syntax for multi-line comment per the documentation standards.

Follow-up to [51387], [51388].

See #53437, #53569.
Built from https://develop.svn.wordpress.org/trunk@51390


git-svn-id: http://core.svn.wordpress.org/trunk@51001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-09 10:50:56 +00:00
Mike Schroder
8222719bc9 Customizer: Skip animations when they have no duration.
In addition to skipping animations when a related style doesn't Exist, now checks to see if animation styles are Empty as well.

This resolves a case where the Gutenberg End to End tests were failing, due to running with animations disabled.

This change should also help some users who are intentionally overriding styles to remove animations.

See https://github.com/WordPress/gutenberg/issues/32024 for the original Gutenberg issue.

Props zieladam, isabel_brison, kevin940726, desrosj, mikeschroder.
Fixes #53562.
See #53542.
Built from https://develop.svn.wordpress.org/trunk@51389


git-svn-id: http://core.svn.wordpress.org/trunk@51000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-09 08:13:58 +00:00
noisysocks
846529de97 Widgets: Warn when wp-editor script or wp-edit-post style is enqueued in widgets editor
It is common that plugins erroneously have `wp-editor` or `wp-edit-post` as a
dependency in a script that is loaded in the new widgets editor. This is a smell
since both `@wordpress/editor` and `@wordpress/edit-post` assume the existence
of a global "post" object which the widgets editor does not have.

[51387] fixes the user-facing errors typically caused by this mistake, but we
can go a step further and warn developers about this by calling
`_doing_it_wrong()` when we detect that the `wp-editor` script or `wp-edit-post`
style is enqueued alongside `wp-edit-widgets` or `wp-customize-widgets`.

See #53437.
Fixes #53569.
Props zieladam, spacedmonkey, TimothyBlynJacobs, andraganescu, dlh.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-09 01:18:57 +00:00
noisysocks
c57e6f00fe Editor: Merge conflicting wp.editor objects into single, non-conflicting object
The `wp-editor` script (`@wordpress/editor` npm package) is exposed as
`window.wp.editor` in WP Admin.  This causes problems, though, as many older
scripts expect to see the older `editor` script available at `window.wp.editor`.

The solution is to export all the members of the older `window.wp.editor` module
in the newer module to maintain backwards compatibility.

See #53437.
Props zieladam, spacedmonkey, TimothyBlynJacobs, andraganescu.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-09 01:10:57 +00:00
jorgefilipecosta
d05e5232b7 Block Editor: Fix for theme.json: color.duotone and spacing.units should allow empty sets.
This commit fixes an issue with the color.duotone & spacing.units in which empty values didn't override previous origins, resulting in that a theme couldn't provide an empty set for this via its theme.json.

Props nosolosw, youknowriad, aristath.
See #53175.
Built from https://develop.svn.wordpress.org/trunk@51383


git-svn-id: http://core.svn.wordpress.org/trunk@50994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-08 19:31:57 +00:00
Sergey Biryukov
2d18007ac5 Coding Standards: Remove wrapping HTML tags from translatable strings.
This fixes a "Strings should not be wrapped in HTML" WPCS warning in help tabs for Export Personal Data and Erase Personal Data screens.

Follow-up to [50147].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@51381


git-svn-id: http://core.svn.wordpress.org/trunk@50992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-08 17:07:58 +00:00
Dominik Schilling
2f170f54ea Script Loader: Update jQuery version to 3.6.0 following the update in [50520].
Props audrasjb.
See #52707.
Built from https://develop.svn.wordpress.org/trunk@51380


git-svn-id: http://core.svn.wordpress.org/trunk@50991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-08 07:19:57 +00:00
Aaron Jorbin
381a720ea9 Fix merge info.
[51378] contained merge info it shouldn't and accidentally a line of code from one of those commits that another one had changed.

See #53604.
Unprops jorbin.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 22:47:56 +00:00
Aaron Jorbin
f4acd73b70 Posts: Fix Spelling in inline docs.
A warpper is the traditional home of a neditor. They generally are optimized for supporting the good quality content that a neditor requires to survive. Some warppers feel like they have been around forever but have laid a foundation for newer warppers. A specific Russian warppers is known for having a wide footprint and touching almost everything. Warppers were originally only found subversioned underground, but they have been able to GIT above ground in the last few years.

The number of warpers in the world is small, but without them the neditor would never survive.

See [23105], [51375], #53604.
Props SergeyBiryukov.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 22:39:57 +00:00
TimothyBlynJacobs
3f7c228c90 REST API: Ensure a sidebar's widgets property is a list.
When a widget is removed from a sidebar, if it was removed from the middle of the list, the widgets property would become an object with numeric keys.

The sidebars controller now forces the widgets property to be a list.

Props walbo.
Fixes #53612.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 19:35:57 +00:00
desrosj
501e37bf2b Posts: Allow the list of wrapper blocks to be filtered.
This introduces the `excerpt_allowed_wrapper_blocks` filter for controlling which blocks should be considered wrapper blocks.

Wrapper blocks and their nested contents are not stripped by `excerpt_remove_blocks()`, allowing their contents to appear in generated excerpts.

Follow up to [51348].

Props aristath, jorbin.
See #53604.
Built from https://develop.svn.wordpress.org/trunk@51375


git-svn-id: http://core.svn.wordpress.org/trunk@50986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 19:10:57 +00:00
desrosj
b16abdec23 Bundled Themes: Update block patterns to match the latest versions of core/* blocks.
When using the post editor with a bundled theme active, there will be a number of `console.info` notices printed to the browser’s console.

These notices are caused by block patterns containing outdated and deprecated versions of `core/*` blocks. Before rendering the blocks, they need to be updated, and this process outputs information to the console.

Props ntsekouras.
Fixes #53617.
Built from https://develop.svn.wordpress.org/trunk@51372


git-svn-id: http://core.svn.wordpress.org/trunk@50983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 17:31:00 +00:00
desrosj
cf711280e0 Tests: Add missed file update in [51370].
See #53497.
Built from https://develop.svn.wordpress.org/trunk@51371


git-svn-id: http://core.svn.wordpress.org/trunk@50982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 15:55:58 +00:00
desrosj
13695f4abd Themes: Remove mention of “FSE” in Core.
“FSE” themes are block themes.

Fixes #53497.
Built from https://develop.svn.wordpress.org/trunk@51370


git-svn-id: http://core.svn.wordpress.org/trunk@50981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 15:49:57 +00:00
desrosj
0a4c5d0f01 Tests: Expand tests for get_block_editor_settings().
This adds unit tests to ensure `get_block_editor_settings()` properly maps some previously experimental features to their correct locations in the array of contextualized block editor settings returned by the function.

Follow up to [51149], [51213].

Props felipeelia.
Fixes #53458.
Built from https://develop.svn.wordpress.org/trunk@51369


git-svn-id: http://core.svn.wordpress.org/trunk@50980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 14:13:57 +00:00
Sergey Biryukov
a1418c50bd Coding Standards: Fix WPCS issues in [51367].
This fixes an "Expected 1 space after comma in argument list; 2 found" error.

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51368


git-svn-id: http://core.svn.wordpress.org/trunk@50979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 10:51:58 +00:00
Sergey Biryukov
4c165a015e Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertSame( [number], count( ... ) )` with `assertCount()` to use native PHPUnit functionality.

Follow-up to [51335], [51337].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51367


git-svn-id: http://core.svn.wordpress.org/trunk@50978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-07 10:34:00 +00:00
Peter Wilson
d73dcb8378 Block Editor: Update packages with latest fixes for 5.8 RC2
Includes the following fixes:

- Query Block: Type validation of `WP_Query` parameters.

Props ntsekouras, stevehenty, peterwilsoncc, desrosj.
Fixes #53397.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 23:57:21 +00:00
ryelle
39ff1d6709 Help/About: Update placeholder links on About page.
Props SergeyBiryukov, audrasjb.
See #52775.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 22:04:58 +00:00
iandunn
8b025acd61 Multisite: Log error/warnings/notices from ms-files.php.
Previously errors were not displayed or logged, but the original intention was only to prevent them from being displayed. Hiding them from logs makes problems like #53492 much harder to debug.

This makes the handling of errors in `ms-files` consistent with the REST API, `admin-ajax`, and XML-RPC.

Props iandunn, johnjamesjacoby.
Fixes #53493.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 20:21:57 +00:00
ryelle
72f034f636 Help/About: Update the About section for 5.8.
Add the images for About, Freedoms, and Privacy. Update the styles on all About section pages to match the About page style. Fix string issues, missing link wrapper, duplicate copy.

Props chanthaboune, kellychoffman, javiarce, ryokuhi, alanjacobmathew, desrosj.
See #52775.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 18:38:57 +00:00
John Blackbourn
1940e5d03e Build/Test Tools: Add assertions to ensure version-controlled files are not modified during CI, and fix the grunt clean command.
Some tests and some commands that run during the build steps modify files that are under version control. This adds assertions to ensure that these files don't remain in a modified state after the test runs on CI.

This also fixes the `grunt clean` command which erroneously deletes `script-loader-packages.php`. This file is re-populated during the build, but deleting it during the clean is undesirable.

Fixes #53606

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


git-svn-id: http://core.svn.wordpress.org/trunk@50964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 18:37:57 +00:00
John Blackbourn
5f67ba0406 Docs: Correct the @since tag for the user_erasure_fulfillment_email_headers filter.
See #44314, #53461

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


git-svn-id: http://core.svn.wordpress.org/trunk@50962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 18:18:02 +00:00
desrosj
5ce4f59f07 Themes: Remove inline comment that is not relevant in WordPress Core.
This removes an inline comment block that was added when importing the `WP_Theme_JSON` class in [50959]. The comment is relevant to the code only when viewed within the context of the Gutenberg plugin.

Props nosolosw, jorbin.
Fixes #53576.
Built from https://develop.svn.wordpress.org/trunk@51352


git-svn-id: http://core.svn.wordpress.org/trunk@50961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 18:14:57 +00:00
desrosj
faa69b408c Tests: Update the wp-api-generated.js fixture.
Follow up to [51241].

Props johnbillion.
See #53606.
Built from https://develop.svn.wordpress.org/trunk@51351


git-svn-id: http://core.svn.wordpress.org/trunk@50960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 15:59:59 +00:00
desrosj
1dcad8f5bb REST API: Add the $request parameter to methods checking permissions.
This adds the `$request` parameter to the `permissions_check()` methods within `WP_REST_Widgets_Controller` and adds `$request` as an allowed parameter to the `permissions_check()` method within `WP_REST_Templates_Controller`.

Even when this parameter is not used by default, it should be implemented to support the class being extended and the method overidden.

Props johnbillion, timothyblynjacobs.
Fixes #53593.
Built from https://develop.svn.wordpress.org/trunk@51349


git-svn-id: http://core.svn.wordpress.org/trunk@50958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 15:43:00 +00:00
desrosj
98579e4495 Posts: Prevent an empty excerpt when groups and nested column blocks are present.
This improves the logic within `excerpt_remove_blocks()` to better handle `innerBlocks`. This prevents an empty excerpt from being returned when `core/columns`, `core/column`, and `core/group` blocks are present.

This issue has been surfaced in the Query Loop block, where excerpts can be set to display. 

Props aristath.
Fixes #53604.
Built from https://develop.svn.wordpress.org/trunk@51348


git-svn-id: http://core.svn.wordpress.org/trunk@50957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 15:32:57 +00:00
youknowriad
5ab81a5f38 Block Editor: Update packages with latest fixes for 5.8 RC2
Includes the following fixes:

 - [Block Library]: Less warnings when blocks try to render themselves.
 - Reset z-index on focused widget form
 - Refactor appender margin.
 - Fix slash inserter for widgets screen.
 - Widget screens: set html block as freeform content handler.
 - Widget Block: widget_id is undefined when a widget is placed.
 - Add <CopyHandler> to WidgetAreasBlockEditorProvider
 - Add width: 100% to components-base-control inside wp-block-legacy-widget
 - [Widgets editor] Replace the "technical" error notice a more user-friendly one
 - Fix legacy widget height overflow 
 - Fix "Select all" behavior in the editor 
 - Increase specificity of the NoPreview CSS rules to avoid conflicts with theme styles
 - Fix move to widget area checkmark
 - Replace legacy widget icon with its new version
 - [Block Library - Query Loop]: Set default block variations not to inherit from global query

See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 14:38:40 +00:00
desrosj
833382b2c9 Bundled Themes: Correct customzier typo.
This was found in Twenty Twenty-One and Twenty Nineteen.

Props audrasjb, spytzo, sabernhardt.
Fixes #53598.
Built from https://develop.svn.wordpress.org/trunk@51343


git-svn-id: http://core.svn.wordpress.org/trunk@50952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 14:02:57 +00:00
desrosj
038904da7c I18N: Correct recurring lenghts typo.
Props mikaelmayer.
Fixes #53600.
Built from https://develop.svn.wordpress.org/trunk@51342


git-svn-id: http://core.svn.wordpress.org/trunk@50951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 13:52:57 +00:00
desrosj
6f2b454864 Build/Test Tools: Use caching built into actions/setup-node.
This updates the `actions/setup-node` action to version 2.2.2 and takes advantage of the cache feature now built in. This removes the need for an additional step using `actions/cache` to cache NPM dependencies.

The cache key used will be `${{ runner.os }}-npm-${{ hashFiles('') }}`, which matches the recommendation in the `actions/cache` documentation and the key currently in use in the WordPress workflows.

Props gziolo.
Fixes #53584.
Built from https://develop.svn.wordpress.org/trunk@51341


git-svn-id: http://core.svn.wordpress.org/trunk@50950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 13:13:59 +00:00
Sergey Biryukov
0d2ce875d7 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( is_object( ... ) )` with `assertIsObject()` to use native PHPUnit functionality.

Follow-up to [51331], [51335].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51337


git-svn-id: http://core.svn.wordpress.org/trunk@50946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 12:32:57 +00:00
Sergey Biryukov
5bef1b8001 Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( is_array( ... ) )` with `assertIsArray()` to use native PHPUnit functionality.

Follow-up to [51331].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51335


git-svn-id: http://core.svn.wordpress.org/trunk@50944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 12:26:56 +00:00
Sergey Biryukov
7a836ad413 Tests: Move loading compatibility layers for PHPUnit 6+ and 7.5+ closer together.
Follow-up to [40536], [44701], [50986].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51333


git-svn-id: http://core.svn.wordpress.org/trunk@50942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-06 11:35:00 +00:00
Aaron Jorbin
228f2d9d39 Update the IRC link from Freenode to Libera.chat.
Update follows the update to https://make.wordpress.org/support/handbook/appendix/other-support-locations/introduction-to-irc/.

Fixes #53590.
Props empatogen, audrasjb.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-05 19:31:59 +00:00
Sergey Biryukov
94c6df96bc Build/Test Tools: Replace assertInternalType() usage in unit tests.
The `assertInternalType()` and `assertNotInternalType()` methods are deprecated in PHPUnit 8 and removed in PHPUnit 9.

While WordPress test suite currently only supports PHPUnit up to 7.5.x, this allows us to switch to newer assertions ahead of adding full support for PHPUnit 8+.

These methods introduced in PHPUnit 7.5 should be used as an alternative:

* `assertIsArray()`
* `assertIsBool()`
* `assertIsFloat()`
* `assertIsInt()`
* `assertIsNumeric()`
* `assertIsObject()`
* `assertIsResource()`
* `assertIsString()`
* `assertIsScalar()`
* `assertIsCallable()`
* `assertIsIterable()`
* `assertIsNotArray()`
* `assertIsNotBool()`
* `assertIsNotFloat()`
* `assertIsNotInt()`
* `assertIsNotNumeric()`
* `assertIsNotObject()`
* `assertIsNotResource()`
* `assertIsNotString()`
* `assertIsNotScalar()`
* `assertIsNotCallable()`
* `assertIsNotIterable()`

As WordPress currently uses PHPUnit 5.7.x to run tests on PHP 5.6, polyfills for these methods are now added to the `WP_UnitTestCase` class for PHPUnit < 7.5.

Props pbearne, jrf, dd32, SergeyBiryukov.
Fixes #53491. See #46149.
Built from https://develop.svn.wordpress.org/trunk@51331


git-svn-id: http://core.svn.wordpress.org/trunk@50940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-05 17:22:57 +00:00
John Blackbourn
2e6a782a5f Docs: Miscellaneous docblock improvements.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@50939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-05 15:48:00 +00:00
Sergey Biryukov
0dadbcab6b Docs: Correct description for the upgrader_pre_install filter.
Props ilovecats7.
Fixes #53546.
Built from https://develop.svn.wordpress.org/trunk@51329


git-svn-id: http://core.svn.wordpress.org/trunk@50938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-04 10:06:57 +00:00
Sergey Biryukov
ca92ebece3 Docs: Add @since tags for WP_Theme class properties.
Document WordPress versions Twenty Twelve and later bundled themes were introduced in.

See #53399.
Built from https://develop.svn.wordpress.org/trunk@51328


git-svn-id: http://core.svn.wordpress.org/trunk@50937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-04 09:58:58 +00:00
John Blackbourn
efaf4a8938 Docs: Add and correct examples of common names for various dynamic hooks.
See #53581

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


git-svn-id: http://core.svn.wordpress.org/trunk@50936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-03 21:42:59 +00:00
John Blackbourn
6b78871b4a Docs: Document common names for dynamic hooks relating to metadata.
See #53581

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


git-svn-id: http://core.svn.wordpress.org/trunk@50935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-03 21:32:58 +00:00
Sergey Biryukov
39cb388519 Docs: Correct @see references for hooks in the get_option() description.
Follow-up to [51050].

See #52628, #53461.
Built from https://develop.svn.wordpress.org/trunk@51324


git-svn-id: http://core.svn.wordpress.org/trunk@50933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-03 11:31:58 +00:00
Sergey Biryukov
9c0611e9c0 Bundled Themes: Correct @since tags for block patterns.
Follow-up to [49347], [49348], [49583], [49584], [49763], [51103].

See #52628, #53461.
Built from https://develop.svn.wordpress.org/trunk@51323


git-svn-id: http://core.svn.wordpress.org/trunk@50932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-03 09:41:58 +00:00
Sergey Biryukov
af7a04318d Twenty Twenty: Add missing documentation for some filters.
Add missing `@since` tags for some functions.

Correct alignment of some `@param` tags.

Follow-up to [46271], [46278], [51304].

See #52628, #53461.
Built from https://develop.svn.wordpress.org/trunk@51322


git-svn-id: http://core.svn.wordpress.org/trunk@50931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-03 09:14:58 +00:00
Aaron Jorbin
bf92ee343c Remove unnecessary function_exists check in get_the_block_template_html
WordPress can be confident that WordPress functions exist.

I forgot this function existed.
And I thought that it would fatal, but it didn't
And it was so nice
So peaceful and quiet
I forgot this function existed
It isn't love, it isn't hate, it's just indifference

Introduced in [51003].

Props walbo.
Fixes #53578. See #53176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-02 21:52:57 +00:00
desrosj
3e271ba7a7 Editor: Ensure global styles are loaded in the footer when loading core assets individually.
This fixes the logic in `wp_enqueue_global_styles()` to ensure that global styles are loaded in the footer when a site opts-in to loading Core block assets individually.

This fixes a bug where styles defined in `themes.json` are not respected.

Props walbo, nosolosw, mcsf, aristath, desrosj.
Fixes #53494.
Built from https://develop.svn.wordpress.org/trunk@51309


git-svn-id: http://core.svn.wordpress.org/trunk@50918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-02 18:47:58 +00:00
desrosj
bc5908011b Editor: Ensure the Query block pattern category is translatable.
Because the `__()` translation function was used here, the Query block pattern category string is not translatable. `_x()` is the correct function here as that passes the second parameter as context and not text domain.

Follow up to [50948].

Props walbo.
Fixes #53577.
Built from https://develop.svn.wordpress.org/trunk@51307


git-svn-id: http://core.svn.wordpress.org/trunk@50916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-02 14:35:58 +00:00
desrosj
433448f1d8 Editor: Remove the experimental experimental-link-color feature.
This has been plugin only so far and should remain so.

Follow up to [50959].

Props nosolosw.
Fixes #53175.
Built from https://develop.svn.wordpress.org/trunk@51306


git-svn-id: http://core.svn.wordpress.org/trunk@50915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-02 13:02:58 +00:00
Sergey Biryukov
d0c596c992 Twenty Twenty-One: Add missing documentation for some filters.
Add missing `@since` tags for some functions.

Follow-up to [49216], [49220], [49854], [51294].

See #52628, #53461.
Built from https://develop.svn.wordpress.org/trunk@51304


git-svn-id: http://core.svn.wordpress.org/trunk@50913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-02 08:57:57 +00:00
Sergey Biryukov
7ec8606aeb Docs: Correct description for the $image parameter of the wp_save_image_file filter.
Follow-up to [27357], [48798], [51302].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@51303


git-svn-id: http://core.svn.wordpress.org/trunk@50912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-02 07:11:58 +00:00
John Blackbourn
ec4eb88e0f Docs: Further type corrections and improvements for various docblocks.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@50911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-01 22:02:57 +00:00