44224 Commits

Author SHA1 Message Date
Kelly Choyce-Dwan
16d538c0f8 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@51418 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-13 15:38:12 +00:00
Mike Schroder
84a22c3f98 Customizer: Don’t always set normalizedTransitionendEventName to null.
Reverts [51389].

Unprops mikeschroder.
See #53562.



git-svn-id: https://develop.svn.wordpress.org/trunk@51417 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-13 14:03:19 +00:00
Sergey Biryukov
b396844d38 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51415 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-13 10:43:42 +00:00
Peter Wilson
4d616c6665 Widgets: Validate HTML before saving block widgets.
Props talldanwp, noisysocks, kevin940726, peterwilsoncc.


git-svn-id: https://develop.svn.wordpress.org/trunk@51414 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-13 05:57:04 +00:00
Kelly Choyce-Dwan
7447f866f7 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@51413 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-13 00:11:42 +00:00
Jonathan Desrosiers
1bdfffbca3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51410 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-13 00:02:00 +00:00
Jonathan Desrosiers
c732027e76 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51409 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-12 23:56:39 +00:00
Jonathan Desrosiers
daea174b3f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51408 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-12 19:02:53 +00:00
Sergey Biryukov
bb389cda94 Coding Standards: Fix WPCS issue in [51404].
This fixes an "Expected 1 spaces before closing parenthesis; 0 found" error.

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51405 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-12 10:52:48 +00:00
Sergey Biryukov
c96a42e08a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51404 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-12 10:35:44 +00:00
Sergey Biryukov
5d9a38ef41 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51403 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-11 12:41:48 +00:00
Andrew Ozz
2ebdfc16eb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51402 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-10 23:57:43 +00:00
Sergey Biryukov
e618a5b859 Twenty Fifteen: Use strict comparison in inc/custom-header.php.
Props kapilpaul.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51401 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-10 18:42:36 +00:00
Sergey Biryukov
ec70bebfb4 Bundled Themes: Correct comment formatting in inc/block-patterns.php.
Follow-up to [51045], [51103].

Props kapilpaul.
See #53359, #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@51400 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-10 18:39:19 +00:00
Sergey Biryukov
b3d49483df 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51399 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-10 12:20:55 +00:00
Sergey Biryukov
03fa1062f2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51398 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-10 12:00:01 +00:00
Sergey Biryukov
d77f065f24 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51397 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-10 11:15:44 +00:00
Sergey Biryukov
cf7cc2843b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51396 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-10 11:14:46 +00:00
Sergey Biryukov
f81cd31166 Coding Standards: Add missing semicolon to endforeach keywords in media templates.
Follow-up to [27411], [27440].

Props vishitshah, mukesh27, nielslange, sabernhardt.
Fixes #46103.

git-svn-id: https://develop.svn.wordpress.org/trunk@51395 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-10 10:39:44 +00:00
Sergey Biryukov
2999960f51 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51391 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-09 10:56:49 +00:00
Sergey Biryukov
c7be2d875e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51390 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-09 10:49:15 +00:00
Mike Schroder
7de1b7c0ae 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51389 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-09 08:12:29 +00:00
Robert Anderson
f49d48fdcb 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@51388 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-09 01:17:41 +00:00
Robert Anderson
5d9c398669 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@51387 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-09 01:09:08 +00:00
Jorge Costa
6bd5962c7d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51383 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-08 19:30:18 +00:00
Sergey Biryukov
7f20da50e7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51381 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-08 17:06:29 +00:00
Dominik Schilling
a0c4143f06 Script Loader: Update jQuery version to 3.6.0 following the update in [50520].
Props audrasjb.
See #52707.

git-svn-id: https://develop.svn.wordpress.org/trunk@51380 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-08 07:18:05 +00:00
Aaron Jorbin
61759be775 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@51379 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 22:46:40 +00:00
Aaron Jorbin
2de2287240 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@51378 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 22:38:44 +00:00
Timothy Jacobs
c283bf2bb6 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@51377 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 19:34:33 +00:00
Jonathan Desrosiers
8c413885bd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51375 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 19:09:41 +00:00
Jonathan Desrosiers
311d6f8f42 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51372 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 17:29:48 +00:00
Jonathan Desrosiers
953e1c5f83 Tests: Add missed file update in [51370].
See #53497.

git-svn-id: https://develop.svn.wordpress.org/trunk@51371 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 15:54:40 +00:00
Jonathan Desrosiers
0834d01365 Themes: Remove mention of “FSE” in Core.
“FSE” themes are block themes.

Fixes #53497.

git-svn-id: https://develop.svn.wordpress.org/trunk@51370 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 15:48:13 +00:00
Jonathan Desrosiers
00fc6b5ecd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51369 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 14:12:46 +00:00
Sergey Biryukov
73e24c997c Coding Standards: Fix WPCS issues in [51367].
This fixes an "Expected 1 space after comma in argument list; 2 found" error.

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51368 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 10:50:43 +00:00
Sergey Biryukov
e77691036d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51367 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-07 10:32:56 +00:00
Peter Wilson
b1f0971ee3 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@51362 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 23:55:44 +00:00
Kelly Choyce-Dwan
380f6976d5 Help/About: Update placeholder links on About page.
Props SergeyBiryukov, audrasjb.
See #52775.



git-svn-id: https://develop.svn.wordpress.org/trunk@51359 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 22:03:43 +00:00
Ian Dunn
8a8f0149b5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@51358 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 20:20:51 +00:00
Kelly Choyce-Dwan
c00ea5f5f2 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@51356 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 18:37:16 +00:00
John Blackbourn
ef09cd88de 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


git-svn-id: https://develop.svn.wordpress.org/trunk@51355 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 18:36:46 +00:00
John Blackbourn
49159c5fc3 Docs: Correct the @since tag for the user_erasure_fulfillment_email_headers filter.
See #44314, #53461


git-svn-id: https://develop.svn.wordpress.org/trunk@51353 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 18:16:52 +00:00
Jonathan Desrosiers
818e9075ce 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51352 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 18:13:38 +00:00
Jonathan Desrosiers
125ebb3d31 Tests: Update the wp-api-generated.js fixture.
Follow up to [51241].

Props johnbillion.
See #53606.

git-svn-id: https://develop.svn.wordpress.org/trunk@51351 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 15:58:38 +00:00
Jonathan Desrosiers
efb1b5946d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51349 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 15:41:35 +00:00
Jonathan Desrosiers
0690170556 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51348 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 15:31:48 +00:00
Riad Benguella
dd332ea876 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@51344 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 14:36:26 +00:00
Jonathan Desrosiers
3e2ce5cbfa Bundled Themes: Correct customzier typo.
This was found in Twenty Twenty-One and Twenty Nineteen.

Props audrasjb, spytzo, sabernhardt.
Fixes #53598.

git-svn-id: https://develop.svn.wordpress.org/trunk@51343 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 14:01:42 +00:00
Jonathan Desrosiers
0b82b52049 I18N: Correct recurring lenghts typo.
Props mikaelmayer.
Fixes #53600.

git-svn-id: https://develop.svn.wordpress.org/trunk@51342 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 13:51:05 +00:00