4622 Commits

Author SHA1 Message Date
Peter Wilson
6ff649472b Media: Ensure wp_crop_image() returns correct file type.
Return the correct file path from `wp_crop_image()` when a developer modifies the file type with via the `image_editor_output_format` filter.

Previously the function would return a broken file reference containing the original file extension rather than the one specified via the filter.

Props mat-lipe, adamsilverstein.
Fixes #55403.



git-svn-id: https://develop.svn.wordpress.org/trunk@53292 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 05:19:52 +00:00
Peter Wilson
2b16e7fc01 Comments: Avoid DB error in comment meta queries.
In `WP_Comment_Query` always include the table name when referencing `wp_comments.comment_ID`. This avoids ambiguity in when making meta queries as `wp_commentmeta` includes a column of the same name.

Follow up to [47887].

Props genosseeinhorn, azouamauriac, audrasjb, peterwilsoncc.
Fixes #55218.


git-svn-id: https://develop.svn.wordpress.org/trunk@53291 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 04:08:16 +00:00
Tonya Mork
02414638ce Themes: Add internal-only theme.json's webfonts handler (stopgap).
Adds `_wp_theme_json_webfonts_handler()` for handling `fontFace` declarations in a theme's `theme.json` file to generate the `@font-face` styles for both the editor and front-end.

Design notes:
* It is not a public API, but rather an internal, Core-only handler.
* It is a stopgap implementation that will be replaced when the public Webfonts API is introduced in Core.
* The code design is intentional, albeit funky, with the purpose of avoiding backwards-compatibility issues when the public Webfonts API is introduced in Core.
   * It hides the inter-workings.
   * Does not exposing API ins and outs for external consumption.
   * Only works for `theme.json`.
   * Does not provide registration or enqueuing access for plugins.

For more context on the decision to include this stopgap and the Webfonts API, see:
* Core's PR 40493 https://github.com/WordPress/gutenberg/pull/40493
* Gutenberg's tracking issue 40472 https://github.com/WordPress/gutenberg/issues/40472

Props aristath, hellofromTonya, peterwilsoncc, costdev, jffng, zieladam, gziolo, bph, jonoaldersonwp, desrosj.

See #55567, #46370.

git-svn-id: https://develop.svn.wordpress.org/trunk@53282 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 14:46:37 +00:00
Greg Ziółkowski
26413556c9 Editor: Update WordPress packages for 6.0 Beta 3
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 Beta 2.

Props zieladam, ndiego.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53278 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 13:39:57 +00:00
Greg Ziółkowski
c88553d076 Editor: Register 'lock' attribute for every block on the server
Backports changes from https://github.com/WordPress/gutenberg/pull/40468.

The lock attribute needs to be supported by every block, but currently, it is only done on the client site. As a result, it was causing block rendered API requests to fail when blocks are locked.

Props mamaduka, peterwilsoncc.
See #55567.




git-svn-id: https://develop.svn.wordpress.org/trunk@53268 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 09:48:20 +00:00
Greg Ziółkowski
3cc94be23b Tests: Update Gallery block unit tests to new gallery format
The Gallery block unit tests still use the old format, so this updates it to the new format that uses nested Image blocks.

Props glendaviesnz.
Fixes #55571.



git-svn-id: https://develop.svn.wordpress.org/trunk@53261 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 16:55:45 +00:00
Greg Ziółkowski
0cb3193616 Editor: Fix styles for nested elements (link color)
This fixes an issue by which link color behaves differently in the editor and front end.

Related Gutenberg PR: https://github.com/WordPress/gutenberg/pull/37728.

Props oandregal.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53260 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 16:35:16 +00:00
Greg Ziółkowski
dbda79e341 Tests: Add missing unit tests to Comment Template block
Follow-up for [53138], [53172].
Props darerodz.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53258 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 16:10:54 +00:00
Jb Audras
bb76c79a44 Users: Make sure WP_User_Query can be filtered using the fields parameter.
This change ensures the `fields` parameter is taken into account when running `WP_User_Query` by fixing the conditional statement used to process the `fields` param.

Props rilwis, peterwilsoncc, NomNom99, hellofromTonya, audrasjb, rilwis, Boniu91.
Fixes #53177.


git-svn-id: https://develop.svn.wordpress.org/trunk@53255 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 12:55:35 +00:00
Jb Audras
6189d64f31 Themes: Ensure WP_Theme::get_files() doesn't return unexpected values.
This change filters out empty entries from `WP_Theme::get_files()` before returning the array of files. This avoid returning an entry with `false` value when the directory of the theme does not exist.

Props dd32, opurockey, Rahmohn, audrasjb.
Fixes #53599.


git-svn-id: https://develop.svn.wordpress.org/trunk@53253 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 09:45:00 +00:00
Jb Audras
6d23d07e80 Build/Test Tools: Typo correction in rss2 unit tests.
Follow-up to [53233].

Props SergeyBiryukov.
Fixes #47968.


git-svn-id: https://develop.svn.wordpress.org/trunk@53241 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-21 23:11:10 +00:00
Peter Wilson
f341d73ad9 Posts, Post Types: Fix option validation in stick_post().
Normalize an invalid `sticky_posts` option to an empty array within `stick_post()`. This fixes a bug in which an unexpected option value would prevent new posts from being made sticky.

Follow up to [50380].

Props azouamauriac, denishua, kajalgohel, sergeybiryukov, costdev.
Fixes #55176.



git-svn-id: https://develop.svn.wordpress.org/trunk@53238 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-21 06:02:21 +00:00
Peter Wilson
d80d27b4cc Tests, Build Tools: Improve version compatibility tests.
Improve tests for `is_wp_version_compatible()` and `is_php_version_compatible()`.

Follow up to [53227].

Props costdev, SergeyBiryukov.
Fixes #54257.



git-svn-id: https://develop.svn.wordpress.org/trunk@53237 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-21 01:00:24 +00:00
Jb Audras
8cb291cbd0 Feeds: Use latest comment date for the Last-Modified header of comments feed.
Previously, the `Last-Modified` header of comments feed was using the date/time of the last comment. This behavior was breaking caching and causing feed readers to believe there is no new content even when there might be new posts.

This commit changes this behavior to use the newest date from both `get_lastcommentmodified()` and `get_lastpostmodified()` functions instead of only using the result from `get_lastcommentmodified()`.

Props xiven, mauteri, costdev, audrasjb.
Fixes #47968.


git-svn-id: https://develop.svn.wordpress.org/trunk@53233 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 12:46:01 +00:00
Sergey Biryukov
eb5612ddf7 Tests: Update the test for wp_install() signature.
Follow-up to [53230].

See #55327.

git-svn-id: https://develop.svn.wordpress.org/trunk@53231 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 11:04:23 +00:00
Peter Wilson
c690f60df4 Build, Test Tools: Test PHP and WP compatibility functions.
Introduce tests for `is_php_version_compatible()` and `is_wp_version_compatible()`.

Props pbearne, hellofromTonya, mikeschroder, peterwilsoncc, toro_unit.
Fixes #54257.


git-svn-id: https://develop.svn.wordpress.org/trunk@53227 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 05:59:45 +00:00
Greg Ziółkowski
5ae266fdc4 REST API: Respect _fields query arg in preloaded requests
Ensures that preloaded request can include a `_fields` query param that asks that only selected response fields are returned.

Props jsnajdr, timothyblynjacobs. 
Fixes #55213.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53217 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 14:38:16 +00:00
Greg Ziółkowski
c755258903 Editor: Fix Comment Query block isn't lazy loading meta data
Related GitHub issue: https://github.com/WordPress/gutenberg/issues/40241.
Primes comment meta data cache within calls to WP_Comment_Query.

Props peterwilsoncc, cbravobernal.
See #55567.
Follow-up [53138].




git-svn-id: https://develop.svn.wordpress.org/trunk@53214 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 12:37:53 +00:00
Greg Ziółkowski
8fafc11932 Editor: Correctly register the dynamic Cover block
The new "Featured Image" enhancement is handled dynamically, so we need to update how the Cover block is handled in the build processa and registered in the code.

Props ironprogrammer, costdev, Mamaduka, chaion07.
Fixes #55580.



git-svn-id: https://develop.svn.wordpress.org/trunk@53212 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 11:35:50 +00:00
Jb Audras
685a843614 Docs: Update a link to the Custom Elements spec in unsupported_valid_tag_names() unit test docblock.
This changeset replaces a link to the outdated W3C specs on Custom Elements with a link to the corresponding WhatWG specification.

Follow-up to [53204].

See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53205 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-18 14:41:17 +00:00
Greg Ziółkowski
34dcf862de Tests: Add unit tests for rendering in Comment Template block
Follow-up [53138].

Props darerodz.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53172 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-13 07:47:15 +00:00
Peter Wilson
487347fa54 Cache API: Improve cache key generation in WP_Comment_Query.
Discard the parameters `update_comment_meta_cache` and `update_comment_post_cache` when generating the cache key as neither have an effect on the database query generated.

Props uday17035, spacedmonkey.
Fixes #55460.



git-svn-id: https://develop.svn.wordpress.org/trunk@53169 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-13 02:55:34 +00:00
Joe Dolson
51d2b2924a Administration: Add unit test for term supplementary notice.
Adds a new test assertion to handle the supplemental data array passed in `ajax-response.js`. 

Follow up to [53123].

Props SergeyBiryukov, peterwilsoncc.
Fixes #55078.

git-svn-id: https://develop.svn.wordpress.org/trunk@53159 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 15:59:45 +00:00
Greg Ziółkowski
bab610091d Editor: Update WordPress packages based based on Gutenberg v13.0 RC3
This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included:

- Avatar
- Comment Author Name
- Comment Content
- Comment Date
- Comment Edit Link
- Comment Rely Link
- Comment Template
- Comments Pagination
- Comments Pagination Next
- Comments Pagination Previous
- Comments Query Loop
- Home Link
- Post Author Biography
- Query No Results
- Read More
See more details in https://github.com/WordPress/wordpress-develop/pull/2564.

Props zieladam, ramonopoly, ocean90.
Fixes #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53157 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 15:10:30 +00:00
Greg Ziółkowski
731a120463 Tests: Improve test cleanup for block supports
Let's unregister the block in the tear_down method. The block will be unregistered even if the test fails.

Props ramonopoly, antonvlasenko.
See #55505.
Follow-up [53085], [53076].



git-svn-id: https://develop.svn.wordpress.org/trunk@53153 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 09:38:18 +00:00
Greg Ziółkowski
a807e86391 REST API: Bring new endpoints for Block Patterns from Gutenberg plugin
Related Gutenberg issue: https://github.com/WordPress/gutenberg/issues/39889.

Backporting changes from the Gutenberg plugin:
- new Block Patterns REST API endpoint
- new Block Pattern Categories REST API endpoint
- updates to Query Loop related patterns
- support for custom taxonomies in Query Loop block

Props hellofromtonya, peterwilsoncc, ntsekouras, zieladam, ironprogrammer, spacedmonkey, timothyblynjacobs, antonvlasenko, jsnajdr.
See #55505.




git-svn-id: https://develop.svn.wordpress.org/trunk@53152 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 09:24:51 +00:00
Peter Wilson
e3ead9f54c Emoji: Update the Twemoji to version 14.0.2.
This version introduces support for the latest Emoji added in Emoji 14. 

"Insert witty comment newly supported emoji."

Props kraftbj, desrosj, dd32, milana_cap.
Fixes #55395.




git-svn-id: https://develop.svn.wordpress.org/trunk@53150 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 05:54:29 +00:00
Peter Wilson
a2b13439ea Media: Run the wp_content_img_tag filter once per image.
Prevent multiple identical `img` tags in a block of content causing the `wp_content_img_tag` filter to fire multiple times for that image.

Follow up to [53028].

Props superpoincare, flixos90, pbearne, peterwilsoncc.
Fixes #55510.
See #55347.


git-svn-id: https://develop.svn.wordpress.org/trunk@53149 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 05:16:46 +00:00
David Baumwald
0ce91f72d9 Formatting: Make get_the_author_link pluggable.
Adds a new filter to alter the output of `get_the_author_link`.  This change also adds unit tests for the new filter.

Props dshanske, donmhico, audrasjb, peterwilsoncc, SergeyBiryukov.
Fixes #51859.

git-svn-id: https://develop.svn.wordpress.org/trunk@53147 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 23:36:56 +00:00
Jb Audras
4ee40e3ff1 Formatting: Avoid escaping valid XML values in esc_xml().
This change improves the `esc_xml()` function by replacing two `empty()` checks with `isset()` to cover values that are not equal to `''` but still returning `true` when checked with `empty()`, like `'0'`, `0` or `false`. It also updates the related unit tests accordingly.

Props rumpel2116, pbiron.
Fixes #55399.


git-svn-id: https://develop.svn.wordpress.org/trunk@53144 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 19:58:04 +00:00
Jb Audras
d6703bbb33 Administration: Replace "can not" with "cannot" after [53131].
Follow-up to [53132], [53131], [52979].


git-svn-id: https://develop.svn.wordpress.org/trunk@53136 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 12:06:15 +00:00
Jb Audras
60e372dd2e Administration: Remove self-reference ("we") in WordPress Admin.
This changes updates many strings to remove self-references to an undefined "we" collective across the WordPress Administration.

The goal of this change is to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word "we" should be avoided (…) unless its made very clear which group is speaking.

Props johnbillion, shital-patel, audrasjb, marybaum, SergeyBiryukov, peterwilsoncc, johnjamesjacoby, kebbet, costdev, chaion07, davidbaumwald.
Fixes #46057.


git-svn-id: https://develop.svn.wordpress.org/trunk@53131 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 11:40:38 +00:00
Greg Ziółkowski
a5a6d0d0e0 Editor: Add functionality required for theme export in the site editor
This bring across changes to theme export functionality, and related code, and tests. Relates issue in Gutenberg: https://github.com/WordPress/gutenberg/issues/39889.

Props scruffian, timothyblynjacobs, oandregal, ajlende, zieleadam.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53129 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 10:36:02 +00:00
Greg Ziółkowski
43aba3b36f Tests: Improve code comments for block supports tests
Follow-up for [53085].

Props ramonopoly, antonvlasenko, peterwilsoncc.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53128 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 10:12:56 +00:00
Peter Wilson
affb0bcb0c Posts, Post Types/Taxonomies: Add object type specific registration filters.
Add post type and taxonomy specific registration argument hooks. 

Introduces the filters `register_{$post_type}_post_type_args` and `register_{$taxonomy}_taxonomy_args`. Introduces the actions `registered_post_type_{$post_type}` and `registered_taxonomy_{$taxonomy}`.

Props pbiron, dlh, davidbaumwald, hellofromTonya, milana_cap.
Fixes #53212.



git-svn-id: https://develop.svn.wordpress.org/trunk@53126 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 05:09:53 +00:00
Peter Wilson
3c804bbead Feeds: Remove comment feed HTML headers when empty.
Remove the `link[rel=alternate]` element from the HTML header when the comment feeds are disabled. Previously the HTML element was output with an empty `href` attribute.

The element is removed if `get_post_comments_feed_link()` returns an empty string or the feed is disabled via the `feed_links_show_comments_feed` filter.

Props barryceelen, audrasjb, costdev, rachelbaker, Boniu91.
Fixes #54703.



git-svn-id: https://develop.svn.wordpress.org/trunk@53125 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 05:01:04 +00:00
Jonathan Desrosiers
c38eafc785 Build/Test Tools: Update some NPM dependencies to the latest versions.
This updates several NPM dependencies to the latest versions, including:

- `check-node-version` from `4.1.0` to `4.2.1`.
- `dotenv` from `10.0.0` to `16.0.0`.
- `dotenv-expand` from `5.1.0` to `8.0.3`.
- `grunt-contrib-concat` from `2.0.0` to `2.1.0`.
- `grunt-contrib-jshint` from `3.1.1` to `3.2.0`.
- `grunt-contrib-uglify` from `5.0.1` to `5.1.0`.
- `qunit` from `2.17.2` to `2.18.1`.
- `sass` from `1.43.4` to `1.50.0`.
- `sinon` from `12.0.1` to `13.0.1`.
- `sinon-test` from `3.1.1` to `3.1.3`.
- `uglify-js` from `3.14.3` to `3.15.3`.
- `wait-on` from `6.0.0` to `6.0.1`.

The updates to `dotenv` and `dotenv-expand` required a minor change to files using these packages.

Additionally, this contains several updates to the `package-lock.json` file as a result of running `npm audit fix`.

See #54727.

git-svn-id: https://develop.svn.wordpress.org/trunk@53113 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 20:05:03 +00:00
Jonny Harris
5486f3b06a REST API: Use rest_parse_embed_param function in WP_REST_Server class.
Ensure that the value get parameter `_embed ` that is passed to the `envelope_response` method, is run through the `rest_parse_embed_param` function. 

Props Spacedmonkey, johnbillion, TimothyBlynJacobs. 
Fixes #54015.



git-svn-id: https://develop.svn.wordpress.org/trunk@53110 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 17:27:42 +00:00
Peter Wilson
4f290ecd64 Administration: Allow floats for menu positions.
Permit plugin authors to pass the menu position as a float in `add_menu_page()` and `add_submenu_page()`. This allows for a common practice within major plugins to avoid menu collisions by passing a float.

Follow up to [52569].

Props justinbusa, dd32, welcher, SergeyBiryukov, kirtan95, audrasjb, Cybr, chaion07, costdev, peterwilsoncc.
See #40927.



git-svn-id: https://develop.svn.wordpress.org/trunk@53104 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 06:15:02 +00:00
Jonny Harris
761fb95954 Networks and Sites: Improve cache key generation in WP_Network_Query class.
Improve cache key generation in the `WP_Network_Query` class by removing `update_network_cache` element in the array used to generate the cache key.  This 
element does not affect that cache and by removing it, it improves the likelihood of reusing an existing cache. 

Props Spacedmonkey, furi3r, johnbillion, johnjamesjacoby, flixos90.
Fixes #55461.



git-svn-id: https://develop.svn.wordpress.org/trunk@53098 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 17:57:59 +00:00
Jonny Harris
4b177da5da Networks and Sites: Improve cache key generation in WP_Site_Query class.
Improve cache key generation in the `WP_Site_Query` class by removing `update_site_cache` and `update_site_meta_cache` elements in the array used to generate 
the cache key.  These elements do not affect that cache and by removing them, improve the likelihood of reusing an existing cache. 

Props Spacedmonkey, furi3r, johnbillion, johnjamesjacoby, flixos90.
Fixes #55462.



git-svn-id: https://develop.svn.wordpress.org/trunk@53097 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 17:44:34 +00:00
Greg Ziółkowski
e3cf5c4183 Site Editor: Resolve homepage template on server-side
Backports change from Gutenberg to support server-side home template resolution in the Site Editor. Original PR https://github.com/WordPress/gutenberg/pull/38817.

Props Mamaduka.
See #55505.




git-svn-id: https://develop.svn.wordpress.org/trunk@53093 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 13:33:03 +00:00
Greg Ziółkowski
9a7a11a74f Editor: Allow registration of blocks that include assets from within a theme
Fixes the issue when you register blocks with `block.json` in your theme. There is no longer an assets's URL error because it resolves correctly in relation to the theme where it is located.

Props fabiankaegy, ocean90, whoisnegrello, audrasjb, peterwilsoncc, 
Fixes #54647, #55513.



git-svn-id: https://develop.svn.wordpress.org/trunk@53091 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 11:57:16 +00:00
Greg Ziółkowski
f187393d0a Editor: Update layout handling for block supports
Backports changes applied in the Gutenberg plugin planned for WordPress 6.0 release. See https://github.com/WordPress/gutenberg/issues/39889.

Props ramonopoly, youknowriad.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53085 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-06 11:39:55 +00:00
Greg Ziółkowski
815441077c Editor: Make block type aware of the ancestor field
The `ancestor` field was recently added to the `block.json` schema in Gutenberg. See: https://github.com/WordPress/gutenberg/pull/39894.

Props darerodz.
Fixes #55531.



git-svn-id: https://develop.svn.wordpress.org/trunk@53084 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-06 09:45:31 +00:00
Greg Ziółkowski
3a9abc810a Editor: Backport block support changes from the Gutenberg plugin
Migrate spacing, border, color, dimensions, elements and typography and associated tests for block supports in the block editor.

Related changes in Gutenberg:
- Include individual serialization changes from 6de16981c7
- Skip Style Engine integration from 44925a947f%60

Props ramonopoly, aaronrobertshaw.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53076 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 12:06:48 +00:00
Riad Benguella
ed1f411c56 Block Editor: Backport the Global Styles Variations endpoint.
This include the /global-styles/themes/{theme}/variations rest endpoint into core.
The endpoint will be used by the site editor to display alternative theme styles to the user.

Props gziolo, oandregal.
See #55505.


git-svn-id: https://develop.svn.wordpress.org/trunk@53072 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 09:50:13 +00:00
Peter Wilson
d613ac5555 Query: Add tests following [53065].
Props spacedmonkey, boonebgorges, pbearne.
See #36904.



git-svn-id: https://develop.svn.wordpress.org/trunk@53066 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 01:59:52 +00:00
Peter Wilson
a20c20774f Formatting: Account for HTML entities in wp_extract_urls().
Prevent `wp_extract_urls()` trimming HTML entities within URLs. Correctly escaped URLs such as https://youtube.com/watch?v=dQw4w9WgXcQ&t=1 will now be extracted as https://youtube.com/watch?v=dQw4w9WgXcQ&t=1 rather than truncated.

Props trex005, voldemortensen, johnbillion, ironprogrammer, costdev, hellofromtonya.
Fixes #30580



git-svn-id: https://develop.svn.wordpress.org/trunk@53044 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 03:38:55 +00:00
Peter Wilson
afc55a72de Canonical: Include all public status in 404 redirects.
In `redirect_guess_404_permalink()` search for posts using all publicly queryable statuses rather than limiting options to the `publish` status.

Props goaroundagain, costdev, htdat, audrasjb, chaion07.
Fixes #47911.



git-svn-id: https://develop.svn.wordpress.org/trunk@53043 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 03:23:07 +00:00