In [51146], the `core-js` package replaced the deprecated `@babel//polyfill` one. The `core-js` package builds `wp-polyfill` from a configuration provided by `@wordpress/babel-preset-default` instead of copying a one size fits all polyfill.
That change caused an issue where plugins and themes relying on the `regenerator-runtime` script being included in the `wp-polyfill.js` file encountering fatal JavaScript errors.
This adds the `regenerator-runtime` package to Core and registers it as a dependency for `wp-polyfill`. While Core does not require `regenerator-runtime`, it will allow for a smoother transition to using `core-js`.
This dependency will be removed in a future version of WordPress, so developers are encouraged to add `regenerator-runtime` as a dependency for any custom script that requires it.
Follow up to [51146].
Props gziolo, herregroen, jeherve, hellofromtonya, peterwilsoncc.
Fixes#52941.
git-svn-id: https://develop.svn.wordpress.org/trunk@51212 602fd350-edb4-49c9-b593-d223f7449a82
Now that the pattern API request includes the locale and version, the cache key needs to contain a hash of the query args.
Props ocean90, dd32, timothyblynjacobs
Fixes#53435
git-svn-id: https://develop.svn.wordpress.org/trunk@51208 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds the `wp_filter_content_tags()` function as a filter to `widget_block_content`.
Props spacedmonkey, walbo, daisyo.
Fixes#53463, #53464.
git-svn-id: https://develop.svn.wordpress.org/trunk@51207 602fd350-edb4-49c9-b593-d223f7449a82
This affects the `::walk()`, `::paged_walk()`, and `::get_number_of_root_elements()` methods.
PHP 8 changes the way string to number comparisons are performed: https://wiki.php.net/rfc/string_to_number_comparison
In particular, checking if an empty string is equal to zero in PHP 8 evaluates to `false`, not `true`.
For the `WP_Walker` class, this resulted in an incorrect handling of parent items in a few methods.
By explicitly checking for an `empty()` value instead, we make sure the check works as expected in PHP 8 and earlier versions.
Follow-up to [35876], [48960], [49043], [49076].
Props sunxiyuan, aristath, SergeyBiryukov.
Fixes#53474.
git-svn-id: https://develop.svn.wordpress.org/trunk@51204 602fd350-edb4-49c9-b593-d223f7449a82
This updates the widgets screen to load the editor styles in the same way as the post editor. This combined with the package updates in [51198] and [51199] ensures that the blocks added to sidebars more accurately reflect what will be displayed on the front end of the site.
Props isabel_brison, noisysocks, andraganescu, audrasjb, jorbin, caseymilne, desrosj.
Fixes#53344. See #53388.
git-svn-id: https://develop.svn.wordpress.org/trunk@51200 602fd350-edb4-49c9-b593-d223f7449a82
This allows for using headers in the format of `<?php // Template Name: Something ?>`, which previously could not be recognized correctly.
Props dd32, m_uysl, thomas-vitale, boblinthorst.
Fixes#33387.
git-svn-id: https://develop.svn.wordpress.org/trunk@51182 602fd350-edb4-49c9-b593-d223f7449a82
This resolves a "Deprecated: Required parameter follows optional parameter" notice on PHP 8.
Follow-up to [48794], [51122].
See #45708, #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@51172 602fd350-edb4-49c9-b593-d223f7449a82
Correct parameter description for `data_wp_widget_get_field_name()`.
Follow-up to [34780], [41555].
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@51140 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the array values being compared are equal, but also that their type is the same.
Going forward, stricter type checking by using `assertSameSets()` or `assertSameSetsWithIndex()` should generally be preferred, to make the tests more reliable.
Follow-up to [48939], [49925], [50157], [50959], [50960], [50995], [51079].
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@51137 602fd350-edb4-49c9-b593-d223f7449a82
Prevent unit tests from making HTTP requests to wordpress.org. Specify URLs as https rather than http.
Follow up to [51107].
Props hellofromTonya.
Fixes#53278.
git-svn-id: https://develop.svn.wordpress.org/trunk@51136 602fd350-edb4-49c9-b593-d223f7449a82
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.
Follow-up to [48466], [50995], [51079].
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@51135 602fd350-edb4-49c9-b593-d223f7449a82
These warnings will still be visible in the browser console. The majority of the warnings are coming from jQuery UI, which is still waiting for a new update to be released that is jQuery >= 3.0 friendly.
This change makes the E2E test results more readable without having to tread through the large number of warnings.
Props isabel_brison.
Fixes#52860.
git-svn-id: https://develop.svn.wordpress.org/trunk@51130 602fd350-edb4-49c9-b593-d223f7449a82
The filters `user_confirmed_action_email_content`, `user_erasure_complete_email_subject`, and `user_erasure_complete_email_headers` have been deprecated.
They have been replaced with `user_erasure_fulfillment_email_content`, `user_erasure_fulfillment_email_subject`, and `user_erasure_fulfillment_email_headers`.
Props desrosj, garrett-eclipse, birgire, DrewAPicture, lifeforceinst, ocean90, pbiron, pento, coffee2code, TZ-Media, SergeyBiryukov, johnbillion, audrasjb, davidbaumwald, hellofromTonya, helen, xkon, antpb, peterwilsoncc, lukecarbis.
Fixes#44314.
git-svn-id: https://develop.svn.wordpress.org/trunk@51129 602fd350-edb4-49c9-b593-d223f7449a82
In [51118], an attempt was made to add pagination limits. The added tests need to be updated to ensure that they pass with the new changes.
Reverts [51118].
See #50233.
git-svn-id: https://develop.svn.wordpress.org/trunk@51125 602fd350-edb4-49c9-b593-d223f7449a82
When an feed request is made to a non-existent page, surpress the notice.
Props dd32, SergeyBiryukov, mukesh27, hellofromTonya.
Fixes#52814.
git-svn-id: https://develop.svn.wordpress.org/trunk@51121 602fd350-edb4-49c9-b593-d223f7449a82
This version introduces support for the latest Emoji added in version Emoji 13.1, which includes “face in clouds”, “face exhaling”, and of course, “face with spiral eyes”.
A new corresponding folder has been pushed to WordPress.org in [dotorg:17419].
Rages deep within, ❤️🔥.
Props kraftbj., desrosj.
Fixes#52852.
git-svn-id: https://develop.svn.wordpress.org/trunk@51113 602fd350-edb4-49c9-b593-d223f7449a82
On a previous package update, this block's server-side code has been missed.
This was causing the block to not render properly.
Props Chouby, desrosj, mcsf.
Fixes#53309.
git-svn-id: https://develop.svn.wordpress.org/trunk@51105 602fd350-edb4-49c9-b593-d223f7449a82
This includes the following fixes:
- Fix inspector opening when clicking outside the widget areas
- Assume light theme when a transparent background is used
- Make Post blocks non editable inside Query block
- Rename QueryLoop to PostTemplate block
Props ntsekouras.
See #52991.
git-svn-id: https://develop.svn.wordpress.org/trunk@51101 602fd350-edb4-49c9-b593-d223f7449a82
Modifies `wp_install_defaults()` so that when you install a new WordPress site you
have block in your widget areas, not widgets.
Fixes#53324.
Props isabel_brison, hellofromtonya, andraganescu.
git-svn-id: https://develop.svn.wordpress.org/trunk@51088 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [50380], [50959], [50960], [50973], [50993], [51003], [51051], [51054].
See #52482.
git-svn-id: https://develop.svn.wordpress.org/trunk@51079 602fd350-edb4-49c9-b593-d223f7449a82
Removes the Meta and Nav Menu widgets from the set of widgets expected by the
test for get_default_block_editor_settings().
Follows [51067].
See #53301.
git-svn-id: https://develop.svn.wordpress.org/trunk@51069 602fd350-edb4-49c9-b593-d223f7449a82
Makes the `DELETE /wp/v2/widgets/:id?force=1` endpoint actually delete the
widget from the `"widget-$id_base"` option and not just remove it from
`'sidebars_widgets'`.
Fixes#53313.
Props TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@51059 602fd350-edb4-49c9-b593-d223f7449a82
In core, you can run `tests/gutenberg/run.js` script to run the Gutenberg e2e tests
against Core with the plugin being disabled. This test ensures that the integration
of the block editor with Core is working properly.
This commit updates the Gutenberg base branch to be used for the tests to be wp/trunk
which corresponds to the latest packages that are included in Core.
See #52991.
git-svn-id: https://develop.svn.wordpress.org/trunk@51052 602fd350-edb4-49c9-b593-d223f7449a82
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
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
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
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
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
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
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
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