Commit Graph

47795 Commits

Author SHA1 Message Date
Jb Audras
d638b012e8 Twenty Twenty: Revert [56034] pending further investigation.
This changeset reverts [56034] as the Test Default Themes & Create ZIPs workflow is failing.

Follow-up to [56034], [56039].

See #58396.




git-svn-id: https://develop.svn.wordpress.org/trunk@56040 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 17:27:55 +00:00
Jb Audras
902353c4a0 Twenty Twenty: Fix an RTL style issue leading to failed Test Default Themes & Create ZIPs workflow.
Follow-up to [56034].

Props sabernhardt, davidbaumwald.
Fixes #58396.




git-svn-id: https://develop.svn.wordpress.org/trunk@56039 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 16:58:43 +00:00
Weston Ruter
c7597fa62f Editor: Use static closures to avoid memory leaks.
Backports Gutenberg changes from https://github.com/WordPress/gutenberg/pull/50723.

Amends [55822].

Fixes #58323.
Props westonruter, spacedmonkey, flixos90. 


git-svn-id: https://develop.svn.wordpress.org/trunk@56038 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 16:58:38 +00:00
Felix Arntz
b6fde03ef7 Media: Automatically add fetchpriority="high" to hero image to improve load time performance.
This changeset adds support for the `fetchpriority` attribute, which is typically added to a single image in each HTML response with a value of "high". This enhances load time performance (also Largest Contentful Paint, or LCP) by telling the browser to prioritize this image for downloading even before the layout of the page has been computed. In lab tests, this has shown to improve LCP performance by ~10% on average.

Specifically, `fetchpriority="high"` is added to the first image that satisfies all of the following conditions:
* The image is not lazy-loaded, i.e. does not have `loading="lazy"`.
* The image does not already have a (conflicting) `fetchpriority` attribute.
* The size of of the image (i.e. width * height) is greater than 50,000 squarepixels.

While these heuristics are based on several field analyses, there will always be room for optimization. Sites can customize the squarepixel threshold using a new filter `wp_min_priority_img_pixels` which should return an integer for the value.

Since the logic for adding `fetchpriority="high"` is heavily intertwined with the logic for adding `loading="lazy"`, yet the features should work decoupled from each other, the majority of code changes in this changeset is refactoring of the existing lazy-loading logic to be reusable. For this purpose, a new function `wp_get_loading_optimization_attributes()` has been introduced which returns an associative array of performance-relevant attributes for a given HTML element. This function replaces `wp_get_loading_attr_default()`, which has been deprecated. As another result of that change, a new function `wp_img_tag_add_loading_optimization_attrs()` replaces the more specific `wp_img_tag_add_loading_attr()`, which has been deprecated as well.

See https://make.wordpress.org/core/2023/05/02/proposal-for-enhancing-lcp-image-performance-with-fetchpriority/ for the original proposal and additional context.

Props thekt12, joemcgill, spacedmonkey, mukesh27, costdev, 10upsimon.
Fixes #58235.


git-svn-id: https://develop.svn.wordpress.org/trunk@56037 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 16:15:12 +00:00
Jb Audras
fb9929cc26 Twenty Nineteen: Ensure Separator block supports theme colors in editor.
This fixes a bug in the Editor, where the Separator block did not support background color selections other than white and light gray.

Props nidhidhandhukiya, sabernhardt, shailu25, harshgajipara, mukesh27, costdev, zunaid321.
Fixes #58558.




git-svn-id: https://develop.svn.wordpress.org/trunk@56036 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 15:48:23 +00:00
Bernie Reiter
fbc337d7b2 Tools: Fix unresolvable conflicts computation in package sync script.
Computation of unresolvable version conflicts in the Gutenberg package
sync script had a few issues that were causing it to fail, among them
two type errors in the destructuring of function arguments.
Furthermore, de-duplication of required package versions was missing,
leading to false positives being reported, when multiple instances of
the same package all required the same version.

Props dmsnell.
Fixes #58628.

git-svn-id: https://develop.svn.wordpress.org/trunk@56035 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 15:41:25 +00:00
Jb Audras
7e6cd72166 Twenty Twenty: Fix left margin in Latest Posts & Latest Comments blocks.
This fixes a bug where the `margin-left: auto` property was being overwritten to `margin-left: 0` causing an inconsistency in the alignment of these blocks.

Props nkeller15, nadimcse, sabernhardt, tb1909, poena.
Fixes #58396.




git-svn-id: https://develop.svn.wordpress.org/trunk@56034 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 15:04:22 +00:00
Joe McGill
613b0e7dc9 Script Loader: Add support for HTML 5 "async" and "defer" attributes.
This allows developers to register scripts with an intended loading strategy by changing the `$in_footer` parameter of `wp_register_script` and `wp_enqueue_script` to an array that accepts both an `in_footer` and `strategy` argument. If present, the loading strategy attribute will be added to the script tag when that script is printed to the page as long as it is not a dependency of any blocking scripts, including any inline scripts attached to the script or any of its dependents.

Props 10upsimon, thekt12, westonruter, costdev, flixos90, spacedmonkey, adamsilverstein, azaozz, mukeshpanchal27, mor10, scep, wpnook, vanaf1979, Otto42.
Fixes #12009.


git-svn-id: https://develop.svn.wordpress.org/trunk@56033 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 13:40:31 +00:00
Sergey Biryukov
4d6c6eefae Code Modernization: Use str_contains() in a few more places.
`str_contains()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) contains the given substring (needle).

WordPress core includes a polyfill for `str_contains()` on PHP < 8.0 as of WordPress 5.9.

This commit replaces `false !== strpos( ... )` with `str_contains()` in core files, making the code more readable and consistent, as well as better aligned with modern development practices.

Follow-up to [55988], [56021], [56031].

See #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56032 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 10:42:54 +00:00
Sergey Biryukov
997abf4009 Code Modernization: Use str_contains() in a few more places.
`str_contains()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) contains the given substring (needle).

WordPress core includes a polyfill for `str_contains()` on PHP < 8.0 as of WordPress 5.9.

This commit replaces `false !== strpos( ... )` with `str_contains()` in core files, making the code more readable and consistent, as well as better aligned with modern development practices.

Follow-up to [55988], [56021].

See #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56031 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 10:15:04 +00:00
Isabel Brison
b524268be4 Editor: rename reusable blocks to patterns.
Renames the Reusable blocks to Patterns and adds an option to convert a block or collection of blocks to a non-synced Pattern.

Props glendaviesnz, ramonopoly, peterwilsoncc, timothyblynjacobs, flixos90.
Fixes #58577.


git-svn-id: https://develop.svn.wordpress.org/trunk@56030 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 08:55:31 +00:00
Isabel Brison
9d4f4a9b9a Editor: fix site editor layout bug.
Removes additional wrapper introduced in [56025], which interfered with the site editor flex layout.

Props ramonopoly, kevin940726, joedolson.
Fixes 56228.


git-svn-id: https://develop.svn.wordpress.org/trunk@56029 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 04:46:39 +00:00
Isabel Brison
f571f4519b Editor: add support for block-level link hover colors.
Adds the ability to set link hover colors for individual blocks from the block inspector color panel.

Props @youknowriad, @peterwilsoncc, @kebbet.
Fixes #58575.


git-svn-id: https://develop.svn.wordpress.org/trunk@56028 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 01:13:56 +00:00
Joe Dolson
3381afd631 Upgrade/Install: Update 'show details' button change.
Add a up/down arrow for visual affordance about the purpose of the button link; change button text from "Show details" to "More details".

Props krupajnanda, subrataemfluence, audrasjb, afercia, nrqsnchz, joedolson.
Fixes #44714.

git-svn-id: https://develop.svn.wordpress.org/trunk@56027 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-25 22:55:34 +00:00
Joe Dolson
c5a7371545 Administration: Fix visual regression in media search input.
Follow up to [r56023]. Improve handling of breakpoint between 782 and 1000px for media grid view & repair styles for media modal search input.

Props kebbet, joedolson.
Fixes #57949.

git-svn-id: https://develop.svn.wordpress.org/trunk@56026 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-25 21:11:51 +00:00
Joe Dolson
aef1cb9847 Editor: Add no-js fallback for site editor.
Add a fallback condition with heading and error notice to handle a no JavaScript state for the site editor, comparable to what already exists in the post editor. 

Props afercia, joedolson, fencermonir, zebaafiashama, alexstine, rudlinkon.
Fixes #56228.

git-svn-id: https://develop.svn.wordpress.org/trunk@56025 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-25 19:52:43 +00:00
Joe Dolson
ba4ada5d0b Upgrade/Install: Add aria-describedby for input descriptions.
Accessibly associate field description text with relevant input fields. Add `aria-describedby` and target IDs for each description field. Update privacy text note to better reflect relevancy to specific fields.

Props costdev, joedolson.
Fixes #58613.

git-svn-id: https://develop.svn.wordpress.org/trunk@56024 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-25 18:42:56 +00:00
Joe Dolson
ced07754fa Administration: Consistent positioning and size of search form.
Move the visual positioning of the posts search form into it's DOM position. Fixes an accessibility bug where the keyboard focus sequence did not match the visual order. Change the media search form in list view to match the format of other post views. Give search forms a consistent layout on mobile.

Props oglekler, sabernhardt, joedolson.
Fixes #57949.

git-svn-id: https://develop.svn.wordpress.org/trunk@56023 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-25 17:20:01 +00:00
Joe Dolson
ed54bb7444 Quick/Bulk Edit: Don't set publish date when editing drafts.
Ensure that quick edit does not define a publish date if the post status is one of 'draft', 'pending', or 'auto-draft'.

Props uxtremist, SergeyBiryukov, Denis-de-Bernardy, jane, rfischmann, mista-flo, rutviksavsani, oglekler, joedolson.
Fixes #19907.

git-svn-id: https://develop.svn.wordpress.org/trunk@56022 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-25 15:18:12 +00:00
Sergey Biryukov
7a6bff44fc Code Modernization: Use str_contains() in a few more places.
`str_contains()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) contains the given substring (needle).

WordPress core includes a polyfill for `str_contains()` on PHP < 8.0 as of WordPress 5.9.

This commit replaces `false !== strpos( ... )` with `str_contains()` in core files, making the code more readable and consistent, as well as better aligned with modern development practices.

Follow-up to [55988].

Props spacedmonkey.
See #58220.

git-svn-id: https://develop.svn.wordpress.org/trunk@56021 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-25 10:48:28 +00:00
Sergey Biryukov
89676d88a2 Code Modernization: Use str_starts_with() and str_ends_with() in a few more places.
`str_starts_with()` and `str_ends_with()` were introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) begins or ends with the given substring (needle).

WordPress core includes a polyfill for these functions on PHP < 8.0 as of WordPress 5.9.

Follow-up to [55990], [56014], [56019].

See #58220.

git-svn-id: https://develop.svn.wordpress.org/trunk@56020 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 17:15:06 +00:00
Sergey Biryukov
c226fa18f0 Code Modernization: Use str_starts_with() and str_ends_with() in a few more places.
`str_starts_with()` and `str_ends_with()` were introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) begins or ends with the given substring (needle).

WordPress core includes a polyfill for these functions on PHP < 8.0 as of WordPress 5.9.

Follow-up to [55990], [56014].

See #58220.

git-svn-id: https://develop.svn.wordpress.org/trunk@56019 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 16:48:25 +00:00
Joe Dolson
d932659aba Editor: Improve accessibility of new custom field UI.
Add labels; change Enter new/Cancel link to a button; move focus to input when creating new field; move Add Custom Field out of fields table. 

Props jane, batmoo, karmatosed, franrosa, sabernhardt, annashopina, oglekler, joedolson.
Fixes #15631.

git-svn-id: https://develop.svn.wordpress.org/trunk@56018 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 14:30:31 +00:00
Sergey Biryukov
ffc386bfbd Coding Standards: Use Yoda condition in str_ends_with().
This resolves a WPCS error:
{{{
Use Yoda Condition checks, you must.
}}}

Follow-up to [56015], [56016].

See #58220.

git-svn-id: https://develop.svn.wordpress.org/trunk@56017 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 13:52:11 +00:00
Sergey Biryukov
0fd9ee91ec General: Return early from str_ends_with() polyfill if both haystack and needle are empty.
Prior to PHP 7.0, `substr( '', -0, 0 )` returns `false` instead of an empty string, so the strict comparison further in the function did not work as expected.

This commit addresses a test failure on PHP < 7.0, making the function consistently return `true` if both haystack and needle are an empty string.

Follow-up to [52040], [56014], [56015].

See #58220.

git-svn-id: https://develop.svn.wordpress.org/trunk@56016 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 13:38:44 +00:00
Sergey Biryukov
0783feeeca General: Replace substr_compare() usage in the str_ends_with() polyfill.
This avoids a warning on PHP < 7.2.18 if haystack is an empty string:
{{{
Warning: substr_compare(): The start position cannot exceed initial string length
}}}

Follow-up to [52040], [55158], [55990], [56014].

See #58220.

git-svn-id: https://develop.svn.wordpress.org/trunk@56015 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 13:00:15 +00:00
Sergey Biryukov
b1ebb813bf Code Modernization: Use str_ends_with() in a few more places.
`str_ends_with()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) ends with the given substring (needle).

WordPress core includes a polyfill for `str_ends_with()` on PHP < 8.0 as of WordPress 5.9.

Follow-up to [55990].

See #58220.

git-svn-id: https://develop.svn.wordpress.org/trunk@56014 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 09:50:34 +00:00
Jb Audras
e628c736c8 Administration: Reduce translation calls after [55969].
Follow-up to [55969].

Props swissspidy, sabernhardt.
Fixes #57675.




git-svn-id: https://develop.svn.wordpress.org/trunk@56013 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 05:28:15 +00:00
Jb Audras
ef6c0b7e42 Twenty Seventeen: Make twentyseventeen_is_static_front_page() an alias of twentyseventeen_is_frontpage().
Since both functions return the exact same thing, this changeset makes `twentyseventeen_is_static_front_page()` an alias of `twentyseventeen_is_frontpage()` 
and updates the related docblocks and function callback.

Props mukesh27, soulseekah, swissspidy, sabernhardt, audrasjb, SergeyBiryukov, hareesh-pillai.
Fixes #43515.




git-svn-id: https://develop.svn.wordpress.org/trunk@56012 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 05:12:28 +00:00
Jb Audras
eb9f60f605 Coding Standards: Fix undeclared variable issue.
Follow-up to [56009], [56010].

See #40966.




git-svn-id: https://develop.svn.wordpress.org/trunk@56011 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 04:20:55 +00:00
Jb Audras
a259766796 Coding Standards: Fix missing semicolon after [56009].
See #40966.




git-svn-id: https://develop.svn.wordpress.org/trunk@56010 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 04:08:43 +00:00
Jb Audras
37494b0a4f Upgrade/Install: Prevent users from sending multiple bulk plugin updates.
This changeset improves `update.js` by adding `is-enqueued` class to enqueued plugin updates to prevent users from asking for several updates for the same 
plugin at the same time, which previously resulted to …an interesting experience.

Props bitnissen, swissspidy, MarcGuay, xkon, afercia, swissspidy, bookdude13, simonemanfre, vasilism, costdev, zunaid321.
Fixes #40966.




git-svn-id: https://develop.svn.wordpress.org/trunk@56009 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-24 03:58:37 +00:00
Joe Dolson
e97a67e7b8 Upgrade/Install: Show/hide toggle on password fields.
Add a show/hide toggle for new passwords in initial user creation and database access during install and setup process using the same model as on user profiles. Add a new password toggle script. Change setup config table to two columns, matching the install table layout.

Props xmarcos, matt, markjaquith, nazgul, akbigdog, intoxination, rob1n, MichaelH, empireoflight, rmccue, markoheijnen, r0uter, amansurov, bi0xid, DrewAPicture, Narthur, wpnook, markparnell, costdev, clorith, ryokuhi, sabernhardt, bgoewert, ironprogrammer, adeltahri, joedolson, mukesh27, audrasjb, sergeybiryukov.
Fixes #3534.

git-svn-id: https://develop.svn.wordpress.org/trunk@56008 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 23:07:10 +00:00
Sergey Biryukov
e5be84482e Bootstrap/Load: Require wp-includes/compat.php earlier in wp-settings.php.
This allows for using polyfill functions in more files, including the `advanced-cache.php` drop-in.

Follow-up to [6108], [46183], [55988], [55990], [56006].

See #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56007 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 20:04:30 +00:00
Sergey Biryukov
3fe8ea0c0c Bootstrap/Load: Require wp-includes/compat.php in wp-load.php.
This allows for using polyfill functions if the site is not installed yet.

Follow-up to [28978], [55988].

Props joedolson, dd32.
See #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56006 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 19:52:31 +00:00
Felix Arntz
915db312ab Editor: Fix block editor styles being registered with frontend stylesheets.
This changeset fixes a bug where WordPress core's own block editor styles (`wp-block-{$block_name}-editor`) were referencing the same CSS files as their frontend equivalents (`wp-block-{$block_name}`). This would result in incorrect frontend styles potentially being loaded in the block editor.

Tests for the related logic have been added.

Props flixos90, joemcgill, mukesh27, spacedmonkey.
Fixes #58605.


git-svn-id: https://develop.svn.wordpress.org/trunk@56005 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 18:59:53 +00:00
Joe Dolson
15a9bcad35 Administration: Backwards compatibility for new sortable keys.
Replace use of `list` to parse array keys into variables. `list` throws errors if the keys don't exist, and many extenders will not define the new array keys. The code path already falls back effectively for empty values.

Also add translator comments to screen reader hidden text, fix a docblock, and fix an HTML error.

Follow up to [r55971].

Props kebbet, chouby, joedolson.
Fixes #32170.

git-svn-id: https://develop.svn.wordpress.org/trunk@56004 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 17:47:34 +00:00
Pascal Birchler
85e6518189 I18N: Ensure determine_locale() does not potentially return an empty string.
Call `get_locale()` as a last resort in case the sanitized locale is an empty string.

Also swaps conditionals to cater for more typical use case and adds tests.

Follow-up to [55862]

Props Cybr, swissspidy.
Fixes #58317.

git-svn-id: https://develop.svn.wordpress.org/trunk@56003 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 16:01:08 +00:00
Sergey Biryukov
44e89612d0 Script Loader: Replace str_contains() usage in wp-includes/script-loader.php.
This avoids fatal errors on PHP < 8.0 if the file is included via `wp-admin/load-scripts.php` or `wp-admin/load-styles.php`, in which case the polyfills from `wp-includes/compat.php` are not loaded.

Follow-up to [55703], [55710], [55988].

Props ryelle.
See #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56002 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 15:43:31 +00:00
Jb Audras
3a340b69ca Upgrade/Install: Move location of $upgrade_notice for better consistency.
Since the `$auto_upgrade_notice` has been added to the `update-core.php` table listing if an `$upgrade_notice` is present by virtue of the `readme.txt` 
containing data in the `== Upgrade Notice ==` section, this text will appear in between the compatibility information and the auto update information.

This changeset provides a more consistent appearance in the interface.

Props afragen, costdev, zunaid321.
Fixes #57939.




git-svn-id: https://develop.svn.wordpress.org/trunk@56001 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 15:01:28 +00:00
Jb Audras
d51e1e66d0 Twenty Twenty: Fix Letter Case implementation.
This changeset fixes Letter Case control implementation on the Button block, on both front-end and in the Editor.

Props thakordarshil, pateljaymin, sabernhardt, panchalhimani711, mukesh27.
See #58526.




git-svn-id: https://develop.svn.wordpress.org/trunk@56000 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 14:51:44 +00:00
Jb Audras
92fc4b261c Twenty Sixteen: Fix Letter Case implementation.
This changeset fixes Letter Case control implementation on the Button block, on both front-end and in the Editor.

Props thakordarshil, pateljaymin, sabernhardt, panchalhimani711, mukesh27.
See #58526.




git-svn-id: https://develop.svn.wordpress.org/trunk@55999 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 14:43:14 +00:00
Jb Audras
4a81e71627 Twenty Fifteen: Fix Letter Case implementation.
This changeset fixes Letter Case control implementation on the Button block, on both front-end and in the Editor.

Props thakordarshil, pateljaymin, sabernhardt, panchalhimani711, mukesh27.
See #58526.




git-svn-id: https://develop.svn.wordpress.org/trunk@55998 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 14:40:31 +00:00
Jb Audras
898a98b8a3 Twenty Fourteen: Fix Letter Case implementation.
This changeset fixes Letter Case control implementation on the Button block, on both front-end and in the Editor.

Props thakordarshil, pateljaymin, sabernhardt, panchalhimani711, mukesh27.
See #58526.




git-svn-id: https://develop.svn.wordpress.org/trunk@55997 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 14:38:19 +00:00
Jb Audras
97be53bbce Themes: Allow non-block themes to add theme support for link color settings.
This changeset themes without theme.json to opt-in to block link color tools via `add_theme_support( 'link-color' );`.

Follow-up to [55067], [55273].

Props poena, audrasjb.
Fixes #58597.




git-svn-id: https://develop.svn.wordpress.org/trunk@55996 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 13:48:49 +00:00
Jb Audras
43e382ba7e Themes: Allow non-block themes to add theme support for border settings.
This changeset allows themes without `theme.json` to opt-in to block border tools via `add_theme_support( 'border' );`.

Follow-up to [55067], [55273].

Props poena, audrasjb.
Fixes #58598.




git-svn-id: https://develop.svn.wordpress.org/trunk@55995 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 13:35:32 +00:00
Sergey Biryukov
11df92738b Database: Replace str_contains() and str_ends_with() usage in wpdb methods.
This avoids fatal errors on PHP < 8.0 if the file is included directly outside of WordPress core, e.g. by HyperDB.

While WordPress core does include polyfills for these functions, they are not directly loaded in the `wpdb` class.

Follow-up to [54384], [55157], [55158], [55988], [55990].

Props dd32, ryelle, joedolson.
See #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@55994 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 12:15:06 +00:00
André
d25a8d62f7 Fix block template utils test: use template part instead of template object.
Note that the PHP unit tests didn't fail in the CI job because the date for both the template and template part was the same.

Props ramonopoly.
Fixes #58540.


git-svn-id: https://develop.svn.wordpress.org/trunk@55993 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 09:28:10 +00:00
Isabel Brison
09a7c6835b REST API: return post modified datetime for Templates.
Adds a `modified` field to the template and template part objects in the rest response for `WP_REST_Templates_Controller`.

Props ramonopoly, andrewserong, mukesh27, timothyblynjacobs.
Fixes #58540.


git-svn-id: https://develop.svn.wordpress.org/trunk@55992 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 06:27:45 +00:00
Peter Wilson
151621661b Build/Test Tools: Store artefacts of failing E2E test runs.
Modify the E2E workflow to store the screenshots and HTML files generated during failing tests as an artifact in the workflow.

No artefact is stored for passing test runs.

Props peterwilsoncc, isabel_brison.
Fixes #58596.



git-svn-id: https://develop.svn.wordpress.org/trunk@55991 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-22 22:35:44 +00:00