Commit Graph

31356 Commits

Author SHA1 Message Date
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
John Blackbourn
e4cfebe92e Docs: Undo the accidental revert of [51299] made in [51300].
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@50910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-01 21:29:56 +00:00
John Blackbourn
ea60cd8191 Docs: Descriptive improvements and corrections for various docblocks.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@50909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-01 21:12:58 +00:00
John Blackbourn
9146628ae1 Docs: Miscellaneous formatting corrections for docblocks.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@50908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-01 21:10:56 +00:00
John Blackbourn
79685db062 Docs: Corrections and improvements to types used in docblocks for symbols, properties, and filters.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@50907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-01 21:02:57 +00:00
John Blackbourn
00a0c0f3d5 Docs: Fix the documentation for the $tests parameter of the site_status_tests filter.
Tests are contained within `direct` and `async` properties of this array, not directly in the array itself. This also clarifies the properties that differ between direct and async tests.

See #53399, #46573

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


git-svn-id: http://core.svn.wordpress.org/trunk@50906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-01 20:37:57 +00:00
desrosj
a54727d936 Twenty Twenty-One: Ensure the dropdown arrow displays for <select> elements when focused.
Props isabel_brison, zieladam, poena.
Fixes #53560.
Built from https://develop.svn.wordpress.org/trunk@51296


git-svn-id: http://core.svn.wordpress.org/trunk@50905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-01 19:55:58 +00:00
Sergey Biryukov
61b5311c57 Twenty Twenty-One: Improve documentation per the documentation standards:
* Remove unnecessary `@access` tags that were previously removed from core.
* Remove an empty line between `@param` and `@return` tags.
* Correct alignment of `@param` tags.

Follow-up to [41161], [41162], [41168], [49216], [49220].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-01 12:59:57 +00:00
Sergey Biryukov
4871e33916 Docs: Correct documentation for rest_{$post_type}_query and rest_{$taxonomy}_query filters.
Synchronize documentation for related `rest_{$object_type}_query` filters for consistency.

Props dlh.
Fixes #53568.
Built from https://develop.svn.wordpress.org/trunk@51293


git-svn-id: http://core.svn.wordpress.org/trunk@50902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-01 09:12:59 +00:00
Sergey Biryukov
d999568ae4 Docs: Improve documentation for optional parameters in WP_Theme_JSON methods per the documentation standards.
Additionally:
* Remove an empty line between `@param` and `@return` tags.
* Correct alignment of `@param` tags.

Follow-up to [50959], [50973], [51149], [51284], [51289].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 19:00:58 +00:00
Sergey Biryukov
1b749d971a Docs: Remove an empty line between @param and @return tags in some newly added REST API methods, per the documentation standards.
Follow-up to [48242], [49925], [51003], [51021].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 18:43:58 +00:00
desrosj
9e3049477c Script Loader: Revert [51267].
This was missed in [51268] when reverting [51259-51260,51265].

Props pbiron.
See #53397.
Built from https://develop.svn.wordpress.org/trunk@51288


git-svn-id: http://core.svn.wordpress.org/trunk@50897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 18:26:03 +00:00
Sergey Biryukov
df662d1e24 Coding Standards: Add missing visibility keywords to WP_Theme, WP_Theme_JSON, and WP_Theme_JSON_Resolver tests.
Follow-up to [50959], [50960], [50967].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@51287


git-svn-id: http://core.svn.wordpress.org/trunk@50896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 18:22:57 +00:00
Sergey Biryukov
8f4593b124 Docs: List the expected type first instead of WP_Error in some REST API methods added in 5.8.
Follow-up to [46696], [49929], [50995], [51021].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 17:59:58 +00:00
Sergey Biryukov
e7b6a4dce8 Coding Standards: Remove redundant type casting to array in WP_Query::get_posts().
This brings some consistency with other instances of using `get_post_stati()` in core.

`get_post_stati()` always returns an array, so the type casting is not needed.

Follow-up to [13172].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 17:44:58 +00:00
Sergey Biryukov
a58c86abd8 Docs: Improve documentation for optional parameters in WP_Theme_JSON_Resolver methods per the documentation standards.
Move `add_action()` call to `wp-includes/default-filters.php`.

Follow-up to [50959], [51221].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 17:20:58 +00:00
Sergey Biryukov
40ff2751bc Docs: Add missing @since tags for some WP_Theme_JSON methods.
Docs: Update syntax for multi-line comments per the documentation standards.

Follow-up to [50959], [50967], [50973], [51051], [51089], [51149].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 16:23:57 +00:00
Sergey Biryukov
b10b4a2586 Docs: Adjust wp_dashboard_browser_nag() DocBlock per the documentation standards.
Follow-up to [51117], [51119], [51120].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 16:07:57 +00:00
Sergey Biryukov
7884c33821 Docs: Add @ticket references to some WP_Theme_JSON tests.
Follow-up to [50973], [51054].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 15:59:58 +00:00
Sergey Biryukov
598c337f4b Docs: Add missing @since tags for some REST API methods added in 5.8.
Follow-up to [50995], [51021].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 13:58:59 +00:00
Sergey Biryukov
a2f00a677c Docs: Document the globals used in WP_REST_Widget_Types_Controller and WP_REST_Widgets_Controller.
Follow-up to [50995].

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


git-svn-id: http://core.svn.wordpress.org/trunk@50888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 12:55:57 +00:00
Sergey Biryukov
d72eb14abf Docs: Document the globals used in some REST API methods.
See #53399.
Built from https://develop.svn.wordpress.org/trunk@51278


git-svn-id: http://core.svn.wordpress.org/trunk@50887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 12:34:56 +00:00
Sergey Biryukov
ffafbefc36 REST API: Allow multiple widgets to be deleted in a single batch request.
This resets the `WP_Widget::$updated` flag when deleting a widget, to avoid blocking all future updates in a request.

Props noisysocks, andraganescu.
Fixes #53557.
Built from https://develop.svn.wordpress.org/trunk@51277


git-svn-id: http://core.svn.wordpress.org/trunk@50886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 10:41:58 +00:00
Peter Wilson
4c598d36b1 Query: Check each post-type's capabilities when querying multiple post-types.
When querying multiple post types, check the `read_private_posts` capability for each post type when determining which post statuses to return. This ensures private posts appear in search results and archives for users permitted to read them.

Props leogermani, hellofromTonya, jeffpaul, peterwilsoncc.
Fixes #48556.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 05:00:56 +00:00
desrosj
7344160c11 Security: Add 5.8 to the list of versions receiving security updates.
Built from https://develop.svn.wordpress.org/trunk@51274


git-svn-id: http://core.svn.wordpress.org/trunk@50883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 04:02:57 +00:00
desrosj
a610e9675b Build/Test Tools: Add the 5.8 branch to the workflow for testing branches.
Built from https://develop.svn.wordpress.org/trunk@51273


git-svn-id: http://core.svn.wordpress.org/trunk@50882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 03:58:58 +00:00
desrosj
4f26a88360 Post branching 5.8 version bump.
`trunk` is now `5.9-alpha`.
Built from https://develop.svn.wordpress.org/trunk@51272


git-svn-id: http://core.svn.wordpress.org/trunk@50881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 03:55:56 +00:00
desrosj
2c1f2bf1e4 Post WordPress 5.8 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@51270


git-svn-id: http://core.svn.wordpress.org/trunk@50879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 03:44:58 +00:00
desrosj
77d0f6114f WordPress 5.8 RC1.
Built from https://develop.svn.wordpress.org/trunk@51269


git-svn-id: http://core.svn.wordpress.org/trunk@50878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 03:16:56 +00:00
desrosj
8c3e1e9aa8 Build/Test Tools: Revert [51259-51256,51265].
[51259] introduced a PHP notice that was not actually fixed by [51265]. Reverting these changes in order to investigate further.

See #53397.
Built from https://develop.svn.wordpress.org/trunk@51268


git-svn-id: http://core.svn.wordpress.org/trunk@50877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 02:14:56 +00:00
desrosj
e7387a9ace Script Loader: Fix PHP notice caused by the viewScript for the core/file block.
This fixes a PHP notice caused by the `viewScript` for the `core/file` block having `.min.js` instead of just `.js`.

`register_block_script_handle()` was incorrectly looking for `view.min.asset.php`, which does not exist, and caused the `_doing_it_wrong()` notice.

This adds a check for `.min.js` in the `viewScript` field of `block.json` and corrects it to `.js` in order to match the expected pattern of `view.asset.php` until a more permanent fix can be created.

Follow up to [51259].

Props ipstenu, pbiron, peterwilsoncc.
See #53397.
Built from https://develop.svn.wordpress.org/trunk@51267


git-svn-id: http://core.svn.wordpress.org/trunk@50876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 01:46:57 +00:00
Peter Wilson
1b7cd950ca Upgrade/Install: Notify users of deactivated plugins during upgrade.
This adds a one-off notice to the dashboard in the event WordPress has automatically deactivated a plugin due to incompatibility with the new version of WordPress.

Introduces the new private function `deactivated_plugins_notice()` to display the notice in the dashboard. Introduces the new auto-loaded option `wp_force_deactivated_plugins` to store a list of automatically deactivated plugins; the option is used on both a site and network level.

Follow up to [51180].

Props desrosj, jorbin, azaozz, SergeyBiryukov, peterwilsoncc.
See #53432.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 00:21:58 +00:00
desrosj
8fa45ab8f8 Script Loader: Add file block assets to the svn-ignore list.
These are automatically generated and should not be committed.

Follow up to [51259].

Props gziolo, youknowriad.
See #53397.
Built from https://develop.svn.wordpress.org/trunk@51265


git-svn-id: http://core.svn.wordpress.org/trunk@50874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-29 19:10:57 +00:00
ryelle
aea10c0c44 Help/About: WordPress 5.8 About Page.
This is the start of the WordPress 5.8 about page, introducing new content and a first pass of the new style.

Props chanthaboune, cbringmann, webcommsat, marybaum, melchoyce, shaunandrews, desrosj, ryelle, oglekler, yvettesonneveld, nalininonstopnewsuk, meher, femkreations, alanjacobmathew, courane01, annezazu, matveb, milana_cap, javiarce, ryokuhi, audrasjb.
See #52775.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-29 19:06:57 +00:00
Aaron Jorbin
ad14ee34eb Docs: Further Improve documentation for wp_should_load_separate_core_block_assets().
In [51256], the documentation was improved, this further improves it. As scripts are not yet a part of what this function does, they are not mentioned explicitly. Assets is used so that the docs don't need a lot of improvements when scripts do come into play..

Props desrosj, SergeyBiryukov, Jorbin.
See #53505.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-29 18:45:56 +00:00
desrosj
6fc65b33d5 Script Loader: Use the provided block version when registering styles.
This updates `register_block_style_handle()` to use the `version` value provided in the `$metadata` parameter for non-Core blocks (when present). This removes the requirement to use `filemtime()` to generate a unique version.

When `version` is not defined within `$metadata`, the script version will fallback to using the current version of WordPress.

The block version should be considered similar to the one specified by plugin developers within the header of the main plugin file.

Props hellofromTonya, gziolo, jorbin, desrosj, walbo, aristath.
Fixes #53507.
Built from https://develop.svn.wordpress.org/trunk@51262


git-svn-id: http://core.svn.wordpress.org/trunk@50871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-29 18:24:56 +00:00
youknowriad
2f27f24191 Block Editor: Include the latest fixes targetted for 5.8 RC1.
It includes:

 - Add a label for screen reader in categories block gutenberg#33060
 - Remove "is-dark-theme" rules from mixins. gutenberg#33058
 - Adjust widget form margins in the new widget editor gutenberg#33040
 - [Block Library - Query Loop]: Select first Query Loop found from pattern selection gutenberg#32737

See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-29 15:53:43 +00:00
desrosj
d5cf36000b Docs: Correct @since annotation for WP_Block_Type->view_script.
Follow up to [51259].

Props swissspidy.
See #53397.
Built from https://develop.svn.wordpress.org/trunk@51260


git-svn-id: http://core.svn.wordpress.org/trunk@50869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-29 15:47:58 +00:00
youknowriad
8e08c569c5 Build: Split packages and blocks to their webpack configs.
This also adds support for the viewScript for blocks fixing 
the PDF preview for file blocks.

Props desrosj, gziolo.
See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-29 15:09:58 +00:00