Commit Graph

3938 Commits

Author SHA1 Message Date
Peter Wilson
41513c2d0f REST API: Re-introduce WP_Test_REST_Widgets_Controller tests.
Returns the test suite with the addition of defining a URL in the RSS widget within `WP_Test_REST_Widgets_Controller::test_get_items()` to work around an infinite loop in `WP_Widget_RSS` on PHP 8 if the URL is unset or empty.

Reverts [51020].

Props peterwilsoncc, TimothyBlynJacobs.
See #41683.



git-svn-id: https://develop.svn.wordpress.org/trunk@51029 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-26 06:14:08 +00:00
Peter Wilson
55db8c73a3 Posts, Post Types: Improve post_exists() query.
Add `$status` parameter to `post_exists()` to allow developers to specify a post type, date and status to ensure they hit the `wp_posts` table's `type_status_date` index when determining if a post exists.

Props apokalyptik, boonebgorges, brettshumaker, DrewAPicture, MikeHansenMe, peterwilsoncc, whyisjake.
Fixes #34012.



git-svn-id: https://develop.svn.wordpress.org/trunk@51027 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-26 02:16:01 +00:00
Timothy Jacobs
852a2c216c REST API: Add support for modifying the term relation when querying posts.
By default, a post most contain any of the requested terms to be included in the response. This commit adds a new `operator` property that can be set to `AND` to require a post to contain all of the requested terms.

For example, `/wp/v2/posts?tags[terms]=1,2,3&tags[operator]=AND` will return posts that have tags with the ids of 1, 2, and 3.

Props dlh, earnjam, Clorith, jnylen0, sebbb.
Fixes #41287.


git-svn-id: https://develop.svn.wordpress.org/trunk@51026 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-26 02:15:51 +00:00
Kelly Choyce-Dwan
849c811396 Block Editor: Add support for the pattern directory.
Add an endpoint for fetching block patterns from WordPress.org, and load the block patterns from this new API. Remove the block patterns that have already been moved to WordPress.org/patterns.

Props ryelle, iandunn, youknowriad, timothyblynjacobs.
Fixes #53246.



git-svn-id: https://develop.svn.wordpress.org/trunk@51021 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-26 01:10:57 +00:00
Peter Wilson
6476ee7f78 REST API: Remove WP_Test_REST_Widgets_Controller tests.
This test suite is causing a loop in PHP8, remove tests to investigate.

Props SergeyBiryukov, desrosj.
See #41683.



git-svn-id: https://develop.svn.wordpress.org/trunk@51020 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-26 00:28:50 +00:00
Riad Benguella
ea49625d59 Block Editor: Introduce block templates for classic themes.
With this patch, users will be able to create custom block based templates
and assign them to specific pages/posts.

Themes can also opt-out of this feature

Props bernhard-reiter, carlomanf.
Fixes #53176.


git-svn-id: https://develop.svn.wordpress.org/trunk@51003 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 14:19:14 +00:00
Sergey Biryukov
645813bc57 Coding Standards: Move assignment out of condition in phpunit/includes/speed-trap-listener.php.
Follow-up to [45588] for `phpunit/includes/phpunit7/speed-trap-listener.php`.

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50998 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 11:54:28 +00:00
Robert Anderson
00bc227eb8 Adds the widgets block editor to widgets.php and customize.php
Moves the widgets block editor from Gutenberg into WordPress Core.

- Adds @wordpress/edit-widgets, @wordpress/customize-widgets and
  @wordpress/widgets.
- Modifies wp-admin/widgets.php to branch between the old editor and new editor
  depending on wp_use_widgets_block_editor().
- Modifies WP_Customize_Widgets to branch between the old editor control and new
  editor control depending on wp_use_widgets_block_editor().

Fixes #51506.
Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp.


git-svn-id: https://develop.svn.wordpress.org/trunk@50996 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 08:38:04 +00:00
Robert Anderson
bc48d7ae09 REST API: Add widget endpoints
Adds the sidebars, widgets and widget-types REST API endpoints from the
Gutenberg plugin.

Fixes #41683.
Props TimothyBlynJacobs, spacedmonkey, zieladam, jorgefilipecosta, youknowriad, kevin940726.


git-svn-id: https://develop.svn.wordpress.org/trunk@50995 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 08:26:21 +00:00
Robert Anderson
1b05374ddd REST API: Revert widget endpoints
Reverts [50993] as it has missing props.

Reverts [50993].
See #41683.


git-svn-id: https://develop.svn.wordpress.org/trunk@50994 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 08:21:03 +00:00
Robert Anderson
909bd7fad0 REST API: Add widget endpoints
Adds the sidebars, widgets and widget-types REST API endpoints from the
Gutenberg plugin.

Fixes #41683.
Props TimothyBlynJacobs.


git-svn-id: https://develop.svn.wordpress.org/trunk@50993 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 07:51:14 +00:00
Aaron Jorbin
84eee38fcb Formatting: Add 'main' tag to kses
`main` is a valid HTML element that is especially valuable for KSES to support in light of full site editing.

Related: https://github.com/WordPress/gutenberg/pull/28576 for the addition of `main` to the group block.

Fixes #53156.
Props glendaviesnz.



git-svn-id: https://develop.svn.wordpress.org/trunk@50987 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 01:42:20 +00:00
Sergey Biryukov
d80fdbca3b Tests: Minimize the chances of signature conflicts for assertEqualsWithDelta().
The PHPUnit 7.5+ method `assertEqualsWithDelta()` was polyfilled for PHPUnit < 7.5, but also overloaded for PHPUnit 7.5 itself, which was not necessary and created a higher chance of signature conflicts, especially when the WP test suite is used as a basis for integration tests with plugins/themes.

This change removes the unnecessary overloading for PHPUnit 7.5+ and simplifies the overloaded method for PHPUnit < 7.5, including removing the `IsEqual()` class alias declaration, no longer needed.

Follow-up to [48952].

Props jrf.
See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50986 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 01:07:43 +00:00
Greg Ziółkowski
b589f04a03 Editor: Use the block editor context in filters that used the editor name
Follow-up for [50956].
Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.



git-svn-id: https://develop.svn.wordpress.org/trunk@50983 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 21:20:31 +00:00
Sergey Biryukov
479ea22b8e Tests: Improve PHPUnit version retrieval.
Always test for newer class names first and fall back to the older.

This improves compatibility when running PHPUnit via a phar while there is also a Composer-installed version of PHPUnit on the system.

Props jrf.
See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50982 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 21:03:15 +00:00
Jorge Costa
73bf1dab6b Block Editor: Update color merging algorithm.
The npm packages in use were published a few hours ago, which include some changes to how we manage colors. This commit adds the corresponding PHP changes.

Props nosolosw.
See #53175.

git-svn-id: https://develop.svn.wordpress.org/trunk@50977 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 18:56:09 +00:00
Jorge Costa
3d3aa3cd09 Block Editor: Add Global Styles support using theme.json file.
This is the second piece of landing the theme.json processing in WordPress core. 
It includes the mechanism that outputs the CSS styles of a theme.json file.

Props nosolosw, youknowriad.
See #53175.

git-svn-id: https://develop.svn.wordpress.org/trunk@50973 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 17:38:59 +00:00
Sergey Biryukov
1c4268756a Tests: Remove trailing commas in function calls in _wp_array_get() tests.
This fixes parse errors on PHP 7.2 and lower versions.

Follow-up to [49143], [49144], [49580], [50964].

See #51461, #51720, #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50970 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 13:46:39 +00:00
Sergey Biryukov
a5e333f03c Tests: Rename classes in phpunit/tests/privacy/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50969 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 13:37:56 +00:00
Sergey Biryukov
5ebaf70f7e Tests: Rename some classes in phpunit/tests/theme/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

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

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50968 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 13:31:15 +00:00
Sergey Biryukov
e4947e935d Docs: Some documentation and test improvements for WP_Theme_JSON and WP_Theme_JSON_Resolver classes:
* Add missing `@since` tags.
* Update some DocBlocks per the documentation standards.
* Rename test files and classes per the naming conventions.
* Fix some code alignment issues reported by WPCS.

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

See #52991, #53175.

git-svn-id: https://develop.svn.wordpress.org/trunk@50967 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 13:24:05 +00:00
Sergey Biryukov
23e669465a Tests: Correct description for the Tests_Functions_wpArraySet class.
Follow-up to [50958], [50962], [50964], [50965].

See #53175, #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50966 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 12:27:35 +00:00
Sergey Biryukov
fa0fca4670 General: Some documentation and test improvements for the _wp_array_set():
* Update the function DocBlock per the documentation standards.
* Move the unit tests to a more appropriate place.
* Rename and reorder the tests for consistency with `_wp_array_get()` tests.

Follow-up to [50958], [50962], [50964].

See #53175, #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50965 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 12:24:14 +00:00
Sergey Biryukov
cea9485383 Tests: Add missing tests for the _wp_array_get() function.
Follow-up to [49143], [49144], [49580].

Props jorgefilipecosta, johnbillion.
See #51461, #51720, #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50964 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 11:06:15 +00:00
Greg Ziółkowski
451044d24d Editor: Rename the unit test file for _wp_array_set function
Follow-up [50958].
See #53175. 



git-svn-id: https://develop.svn.wordpress.org/trunk@50962 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 09:58:23 +00:00
Sergey Biryukov
2c7c677f25 Widgets: Make sure WP_Widget constructor creates a correct classname value for a namespaced widget class.
This reverts the changes to `id_base` from [50953] due to backward compatibility concerns, and instead focuses on the `id` and `class` attributes specifically.

With this change, any backslashes in the `id` or `class` attributes for a namespaced widget class are converted to underscores, making it easier to style the output or target the widget with JavaScript.

Follow-up to [50953].

Fixes #44098.

git-svn-id: https://develop.svn.wordpress.org/trunk@50961 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 09:50:30 +00:00
Greg Ziółkowski
987acb5954 Editor: Fix failing unit test for i18n support in theme.json
As part of the change, I also did some code reorganization to match with how other test fixtures are handled.

Follow-up [50959].

See #52991.



git-svn-id: https://develop.svn.wordpress.org/trunk@50960 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 09:49:48 +00:00
Riad Benguella
ef3da3363a Block Editor: Add Global Settings support using theme.json file.
This is the first piece of landing the theme.json processing in WordPress core. 
It allows themes to configure the different editor settings, allow cusomizations and define presets in theme.json file.
 
Props jorgefilipecosta, nosolosw.
See #53175.


git-svn-id: https://develop.svn.wordpress.org/trunk@50959 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 08:36:11 +00:00
Riad Benguella
c0084bccca General: Add _wp_array_set function.
This adds the _wp_array_set function, which is the counterpart of the existing _wp_array_get.
This utility is to be used by the Global Settings work.

Props nosolosw, jorgefilipecosta.
See #53175.


git-svn-id: https://develop.svn.wordpress.org/trunk@50958 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 08:29:03 +00:00
Greg Ziółkowski
2a389ad7b7 Editor: Extract block_editor_rest_api_preload method for use with different editor screens
It is going to be used on the new widgets editor screen. This patch also introduced a new class WP_Block_Editor_Context that is going to be used with revised block editor filters to let extenders to keep their existing behavior. It should also allow to provide more settings through the context class as new screens get introduced like the navigation editor.

Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.




git-svn-id: https://develop.svn.wordpress.org/trunk@50956 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 07:31:49 +00:00
Greg Ziółkowski
b9b464de8a Editor: Add missing unit tests for block_has_support
Follow-up for [50761].
Props ntsekouras.
Fixes #53257. See #52991.



git-svn-id: https://develop.svn.wordpress.org/trunk@50955 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 06:26:00 +00:00
Peter Wilson
7cd5ecd667 XML-RPC: Set HTTP status code in accordance with the spec.
When the XML-RPC endpoint is enabled, always return a HTTP `200 OK` status code in accordance with the XML-RPC specification. Continue to return an HTTP `405 Method Not Allowed` status code when the endpoint is disabled.

Props ariskataoka, johnbillion.
Fixes #52958.



git-svn-id: https://develop.svn.wordpress.org/trunk@50954 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 02:17:36 +00:00
Sergey Biryukov
c4fd562663 Widgets: Make sure WP_Widget constructor creates a correct id_base value for a namespaced widget class.
The `id_base` value is used for the widget's `id` and `class` attributes and also for the option name which stores the widget settings (unless the widget specifies a custom `option_name` value).

With this change, any backslashes in the `id_base` for a namespaced widget class are converted to hyphens, making it easier to style the output or target the widget with JavaScript.

This also avoids a `preg_match(): Compilation failed` PHP warning from `next_widget_id_number()` on the Widgets screen, previously caused by unescaped backslashes.

Props Mte90, hermpheus, rogerlos, welcher, SergeyBiryukov.
Fixes #44098.

git-svn-id: https://develop.svn.wordpress.org/trunk@50953 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-23 08:50:44 +00:00
Sergey Biryukov
655fbb26ab Media: Some documentation and test improvements for the image_editor_output_format filter:
* Update the filter DocBlock per the documentation standards.
* Use a shorter variable name for consistency with the surrounding code.
* Delete the test file before performing assertions to avoid leftovers in case the test fails.

Follow-up to [50943].

See #52867.

git-svn-id: https://develop.svn.wordpress.org/trunk@50951 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-22 12:58:46 +00:00
Adam Silverstein
62327715a0 Revisions: add a new filter for revisions to keep by post type.
Add a new `wp_{$post_type}_revisions_to_keep` filter that makes it convenient to filter the number of revisions created for a specific post type.

Overrides both the value of WP_POST_REVISIONS and the `wp_revisions_to_keep` filter.

Props dlh.
Fixes #51550.



git-svn-id: https://develop.svn.wordpress.org/trunk@50949 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-21 15:28:39 +00:00
Riad Benguella
83c5f4d23b Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC.
This also includes:

 - The removal of the Post Author block.
 - Renaming build_query_vars_from_query_block function.
 - Update the block supports.

Props gziolo.
See #52991. 
-This line, and those below, will be ignored--

M    package-lock.json
M    package.json
M    src/wp-includes/assets/script-loader-packages.php
M    src/wp-includes/block-supports/colors.php
AM   src/wp-includes/block-supports/elements.php
D    src/wp-includes/block-supports/padding.php
AM   src/wp-includes/block-supports/spacing.php
M    src/wp-includes/block-supports/typography.php
M    src/wp-includes/blocks/column/block.json
M    src/wp-includes/blocks/index.php
D    src/wp-includes/blocks/post-author
D    src/wp-includes/blocks/post-author.php
M    src/wp-includes/blocks/post-content.php
M    src/wp-includes/blocks/post-featured-image.php
M    src/wp-includes/blocks/query/block.json
M    src/wp-includes/blocks/query-loop/block.json
M    src/wp-includes/blocks/query-loop.php
M    src/wp-includes/blocks/query-pagination/block.json
M    src/wp-includes/blocks/query-pagination-next.php
M    src/wp-includes/blocks/query-pagination-numbers.php
M    src/wp-includes/blocks/site-tagline/block.json
M    src/wp-includes/blocks/site-title/block.json
M    src/wp-includes/blocks.php
M    src/wp-settings.php
M    tests/phpunit/tests/blocks/block.php
M    tools/webpack/packages.js


git-svn-id: https://develop.svn.wordpress.org/trunk@50945 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-21 10:12:42 +00:00
Greg Ziółkowski
e7dbf1d5f1 Editor: Add missing unit tests for construct_wp_query_args
Follow-up for [50929].
Props ntsekouras, jorbin.
Fixes #53240. See #52991.



git-svn-id: https://develop.svn.wordpress.org/trunk@50944 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-21 06:28:59 +00:00
Anthony Burchell
5a2c3706ee Media: Introduces image_editor_output_format filter for setting default MIME type of sub size image output.
This change introduces the `image_editor_output_format` filter, which fires as sub size images are generated allowing to define a default image MIME type for those items.

Props adamsilverstein, williampatton, spacedmonkey, mikeschroder, hellofromTonya, justinahinon, Boniu91, antpb, SergeyBiryukov.
Fixes #52867.



git-svn-id: https://develop.svn.wordpress.org/trunk@50943 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-20 22:14:47 +00:00
Sergey Biryukov
3da0ccdc95 General: Ensure consistent type for integer properties of a bookmark object.
Previously, these properties could be unexpectedly converted to strings in some contexts.

This applies to the following function:

* `sanitize_bookmark_field()`

and the following properties:

* `$bookmark::link_id`
* `$bookmark::link_rating`

Follow-up to [50935].

See #53235.

git-svn-id: https://develop.svn.wordpress.org/trunk@50936 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-20 00:03:04 +00:00
Sergey Biryukov
110f132f7e General: Ensure consistent type for integer properties of WP_Post, WP_Term, and WP_User.
Previously, these properties could be unexpectedly converted to strings in some contexts.

This applies to the following functions:

* `sanitize_post_field()`
* `sanitize_term_field()`
* `sanitize_user_field()`

and the following properties:

* `WP_Post::ID`
* `WP_Post::post_parent`
* `WP_Post::menu_order`
* `WP_Term::term_id`
* `WP_Term::term_taxonomy_id`
* `WP_Term::parent`
* `WP_Term::count`
* `WP_Term::term_group`
* `WP_User::ID`

Props grantmkin, SergeyBiryukov.
Fixes #53235. See #52995.

git-svn-id: https://develop.svn.wordpress.org/trunk@50935 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 22:10:58 +00:00
Jonathan Desrosiers
2207c248f0 Script Loader: Stop loading polyfills specific to Internet Explorer
This change removes the inline JavaScript attached to the `wp-polyfill` script responsible for loading polyfill libraries included specifically for Internet Explorer support.

Support for the final version of IE supported in WordPress Core (IE11) was removed in [50784] and will on longer be supported when the next version of WordPress is released.

These scripts are still registered and available to be enqueued, but WordPress will no longer load them by default.

For more information, see https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/.

Props youknowriad, gziolo, sergiomdgomes, desrosj.
Fixes #53078.

git-svn-id: https://develop.svn.wordpress.org/trunk@50934 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 19:59:55 +00:00
Greg Ziółkowski
585f62ad8c Editor: Update WordPress packages published for Gutenberg 10.6
It contains several changes in addition to regular update to WordPress packages:
- All newly exposed blocks are now registered on the server.
- Dutone block support was added.
- Border block support was updated.
- New shared function `construct_wp_query_args` was added for the family of Query blocks - it might need some further work.

Props youknowriad.
See #52991.




git-svn-id: https://develop.svn.wordpress.org/trunk@50929 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 15:07:55 +00:00
Greg Ziółkowski
6ad4e34c54 Editor: Extend register_block_type to accept the path file or folder with block.json
Rather than using two distinct methods to register block types in WordPress core, let's make `register_block_type` the canonical method to deal with all use cases. In practice, the patch proposed extends its usage to work as a proxy to `register_block_type_from_metadata`. It should remove some confusion that we observed and let us be more explicit what's the latest recommendation.

Props matveb, mcsf.
Fixes #53233.



git-svn-id: https://develop.svn.wordpress.org/trunk@50927 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 13:50:09 +00:00
Sergey Biryukov
fe9ab38075 Tests: Use assertInstanceOf() instead of assertTrue() in some tests.
See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50926 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-18 21:04:31 +00:00
Sergey Biryukov
8e498a8314 KSES: Allow calc() and var() values to be used in inline CSS.
Props aristath, displaynone, joyously, olafklejnstrupjensen, sabernhardt, jamesbonham, poena.
Fixes #46197, #46498.

git-svn-id: https://develop.svn.wordpress.org/trunk@50923 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-17 21:03:56 +00:00
Greg Ziółkowski
0b6eb8daba Editor: Remove editor type specific filters for block editor configuration
Aligns with changes introduced in the Gutenberg plugin. The planned follow-up replace the editor name string with a context object to bring back an optional reference to the actual post.

Props youknowriad.
See #52920.



git-svn-id: https://develop.svn.wordpress.org/trunk@50920 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-17 15:06:27 +00:00
Greg Ziółkowski
d9f169a02a Editor: Rename should_load_separate_core_block_assets for consistency
Changes introduced:
- The `wp_should_load_separate_core_block_assets` function.
- The `should_load_separate_core_block_assets` filter.

Props hellofromTonya, SergeyBiryukov.
Fixes #50328.



git-svn-id: https://develop.svn.wordpress.org/trunk@50919 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-17 14:26:53 +00:00
Sergey Biryukov
32151af6e4 Docs: Miscellaneous DocBlock corrections.
See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50916 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-15 17:36:49 +00:00
Sergey Biryukov
6768039f21 Docs: Update documentation in phpunit/includes/abstract-testcase.php per the documentation standards.
Follow-up to [44902].

See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50913 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-14 19:07:47 +00:00
Sergey Biryukov
bab911f0d7 Editor: Some documentation and test improvements for loading separate assets for core blocks:
* Move `should_load_separate_core_block_assets()` to a more appropriate place.
* Update DocBlocks and inline comments per the documentation standards.
* Document the `$wp_styles` global in `wp_maybe_inline_styles()`.
* List the expected result first in unit test assertions.
* Remove a duplicate unit test.
* Add missing `@covers` tags.

Follow-up to [50836], [50837].

See #50328, #52620, #53180.

git-svn-id: https://develop.svn.wordpress.org/trunk@50838 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-11 16:26:28 +00:00