Commit Graph

48148 Commits

Author SHA1 Message Date
Jonathan Desrosiers
35f7b9ec72 Build/Test Tools: Change the version of Node.js in the Codespaces container.
Follow up to [56378] and [56387].

Props jeffpaul.
See #56658.

git-svn-id: https://develop.svn.wordpress.org/trunk@56442 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 14:07:53 +00:00
Jb Audras
222af98bbe Docs: Correct default post type in page_template_dropdown() docblock.
The default post type used by `page_template_dropdown()` is `page`, not `post`.

Props maxinacube.
Fixes #58972.
See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56441 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 13:39:25 +00:00
Jonathan Desrosiers
c2ae255fe1 Build/Test Tools: Merge pre-commit changes missed in [56439].
Props l1nuxjedi.
See #30462.

git-svn-id: https://develop.svn.wordpress.org/trunk@56440 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 13:28:26 +00:00
Jonathan Desrosiers
a00b04bae7 Build/Test Tools: Expand database testing to account for all supported versions and types.
This modifies the PHPUnit workflow to add MySQL version 8.0 to the strategy matrix. It also adds an additional strategy matrix to expand testing to include several supported MariaDB versions.

To prevent repeating code, the business logic of the PHPUnit testing has been moved to a new, callable workflow.

Because callable workflows target a specific branch, branches created in the future will continue to benefit from improvements made to the workflow in `trunk` without requiring backports. If a breaking change is required, older branches will need to be updated to target the commit SHA representing the final commit of the previous state.

Props johnbillion, pento, boonebgorges, netweb, nacin, desrosj.
Fixes #30462.

git-svn-id: https://develop.svn.wordpress.org/trunk@56439 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 13:08:40 +00:00
Sergey Biryukov
f0ff124fe9 Coding Standards: Use strict comparison in wp-includes/ms-site.php.
Follow-up to [12603], [43548], [43654], [44472].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56438 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 11:17:06 +00:00
Jb Audras
f4b36d8941 Revisions: Add missing escaping function for $post_edit_link in wp-admin/revision.php.
Props nidhidhandhukiya, Presskopp, mukesh27, rajinsharwar, costdev.
Fixes #59141.




git-svn-id: https://develop.svn.wordpress.org/trunk@56437 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 09:30:17 +00:00
Jb Audras
7faabe4015 Docs: Clarify post_date_column_time filter description.
Props crstauf, mukesh27.
Fixes #59029.
See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56436 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 09:10:17 +00:00
Jb Audras
07b5588a88 Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56435 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 09:06:52 +00:00
Jb Audras
e7dd83bf97 Docs: Wrap inline @see tags in curly braces.
Props costdev, mukesh27.
Fixes #58858.
See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56434 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 08:59:36 +00:00
Jb Audras
ef0e58bf0f Docs: Add missing @param description in WP_Comment class.
Props armondal, hztyfoon, SergeyBiryukov.
Fixes #58890.
See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56433 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 08:42:23 +00:00
Sergey Biryukov
bf00a673a5 Coding Standards: Use strict comparison in wp-includes/ms-files.php.
Follow-up to [12603], [12936], [56395].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56430 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-23 15:51:12 +00:00
Sergey Biryukov
5a99ab468a Posts, Post Types: Remove redundant function calls in get_body_class().
As part of a previous change to add support for post type templates, the `$wp_query->get_queried_object_id()` method ended up being called twice, in both the `is_singular()` and `is_page()` conditional branches.

The `get_post()` function call was also unnecessary, as `$wp_query->get_queried_object()` is already called in the `is_singular()` branch above, which includes the `is_page()` branch too.

This commit removes the redundant calls. The first `$wp_query->get_queried_object_id()` call is removed as well, since the post ID is already available via `$wp_query->get_queried_object()`.

Follow-up to [10485], [10877], [12877], [13032], [21597], [38951].

Props mattkeys, spacedmonkey, oglekler.
Fixes #43661.

git-svn-id: https://develop.svn.wordpress.org/trunk@56424 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-22 12:28:52 +00:00
Tonya Mork
17e9e69bb6 Editor: Fix error handling of converting classic to block menus.
Fixes the error handling for when `WP_Classic_To_Block_Menu_Converter::convert()` returns an instance of `WP_Error`. `WP_Navigation_Fallback::create_classic_menu_fallback()` now checks for `is_wp_error()` and if `true`, returns the error. And the `@return` type is updated to `string|WP_Error`.

Also includes a fix in the return type in `WP_Classic_To_Block_Menu_Converter::convert()` to return an empty string instead of an array instead, i.e. when bailing out for no menu items returned by `wp_get_nav_menu_items()`. The return type is clearly documented as a `string`.

Follow-up to [56052].

Props dlh, get_dave, antonvlasenko, hellofromTonya.
Fixes #58823.

git-svn-id: https://develop.svn.wordpress.org/trunk@56422 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-21 17:49:09 +00:00
Sergey Biryukov
f0d53f8100 Build/Test Tools: Update PHPUnit Polyfills to version 1.1.0.
[https://github.com/sebastianbergmann/phpunit/blob/9.6/ChangeLog-9.6.md#961---2023-02-03 PHPUnit 9.6.1] deprecated the `assertObjectHasAttribute()` and `assertObjectNotHasAttribute()` methods, leading to deprecation notices in a number of tests.

[https://github.com/sebastianbergmann/phpunit/blob/10.1.3/ChangeLog-10.1.md#1010---2023-04-14 PHPUnit 10.1.0] brought the methods back by popular request, though renamed as `assertObjectHasProperty()` and `assertObjectNotHasProperty()`, to prevent confusion with PHP 8.0 attributes.

This meant that users which cannot (yet) upgrade to PHPUnit 10.1+ would always have deprecation notices for these methods without recourse. So, after much discussion, the new methods have been backported to [https://github.com/sebastianbergmann/phpunit/blob/9.6/ChangeLog-9.6.md#9611---2023-08-19 PHPUnit 9.6.11], leaving just the 10.0.x series with a deprecation notice and no recourse.

What does this mean for WordPress?

WordPress uses the [https://github.com/Yoast/PHPUnit-Polyfills PHPUnit Polyfills] to be able to write tests for the most recent versions of PHPUnit, with the Polyfills taking care of polyfilling any new PHPUnit methods on older PHPUnit versions.

* The PHPUnit Polyfills 1.x series supports PHPUnit 4.x to 9.x.
* The PHPUnit Polyfills 2.x series supports PHPUnit 5.x to 10.x.

WordPress currently runs against PHPUnit 6.x to 9.x with PHPUnit Polyfills 1.x, while the new methods were previously only included in PHPUnit Polyfills 2.0.0+, as they were introduced in PHPUnit 10.x.

Since the `assertObjectHasProperty()` and `assertObjectNotHasProperty()` methods have been backported to PHPUnit 9.x, the PHPUnit Polyfills will now include these methods in the 1.x series as well.

By upgrading to the latest [https://github.com/Yoast/PHPUnit-Polyfills/releases/tag/1.1.0 PHPUnit Polyfills 1.1.0] release, we can get rid of the deprecation notices related to the use of the `assertObjectHasAttribute()` and `assertObjectNotHasAttribute()` methods.

This could have implications for plugins or themes running integration tests with WordPress if they have set their PHPUnit Polyfills dependency to a fixed version or have a too strict version constraint (limiting the PHPUnit Polyfills to the 1.0.x series). The solution for those plugins or themes is to update their version constraints for the PHPUnit Polyfills to allow for the 1.1.x series.

Follow-up to [51559], [51598].

Props jrf, ayeshrajans.
Fixes #59150.

git-svn-id: https://develop.svn.wordpress.org/trunk@56421 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-21 15:53:04 +00:00
Sergey Biryukov
9b8a0d22b0 Coding Standards: Use strict comparison in wp-admin/includes/meta-boxes.php.
Follow-up to [38], [647], [2890], [3570], [11815], [11816], [31550], [52620].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56420 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-20 00:08:49 +00:00
Isabel Brison
cfe5a1e0a8 Editor: update npm packages with critical bug fixes for 6.3.1.
Includes fixes for footnotes and editor styles related crashes, as well as a cut and paste-related crash.

Props ramonopoly.
See #59151.


git-svn-id: https://develop.svn.wordpress.org/trunk@56419 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-19 23:20:25 +00:00
Sergey Biryukov
5d466a4d4a Docs: Correct punctuation in some instances of the $crop parameter description.
Follow-up to [56416].

See #58833.

git-svn-id: https://develop.svn.wordpress.org/trunk@56418 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-19 00:08:32 +00:00
Andrew Ozz
d1f72a6330 Revert the last use of str_starts_with() in update-core.php.
Fixes updating WordPress from 5.7 and earlier versions. When doing the update this file runs first in the old version where the polifills may not be available.

Porps: frankit.
Fixes: #59145.

git-svn-id: https://develop.svn.wordpress.org/trunk@56417 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 23:23:33 +00:00
John Blackbourn
dde16aab1c Media: Standardise documentation of the $crop parameter for various media functions and methods.
See #58833


git-svn-id: https://develop.svn.wordpress.org/trunk@56416 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 17:54:41 +00:00
John Blackbourn
9bb4369bc1 REST API: Correct the docblocks for various permission related methods.
See #58833


git-svn-id: https://develop.svn.wordpress.org/trunk@56415 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 17:44:29 +00:00
John Blackbourn
7aee3d35fb Docs: Miscellaneous docblock corrections and improvements.
See #58833


git-svn-id: https://develop.svn.wordpress.org/trunk@56414 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 17:27:16 +00:00
André
9110074a20 Themes: add wp_get_theme_data_custom_templates function.
Adds a new public function, `wp_get_theme_data_custom_templates` that returns the `customTemplates` defined by the active theme from `theme.json`. It also substitutes the usage of private APIs by this new 
API.

Props johnbillion, audrasjb.
Fixes #59137



git-svn-id: https://develop.svn.wordpress.org/trunk@56413 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 13:20:56 +00:00
André
e42bd867bc Add missing @ to the return tag in the wp_get_theme_data_template_parts function.
Props audrasjb, johnbillion.
Fixes #59003



git-svn-id: https://develop.svn.wordpress.org/trunk@56412 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 13:16:13 +00:00
Sergey Biryukov
79b01c6d81 Coding Standards: Improve variable names in wp_save_image().
This resolves a few WPCS warnings:
{{{
Variable "$sX" is not in valid snake_case format, try "$s_x"
Variable "$sY" is not in valid snake_case format, try "$s_y"
}}}

The `$sX` and `$sY` variables are renamed to `$original_width` and `$original_height`, respectively.

Additionally, the `$fwidth` and `$fheight` variables are renamed to `$full_width` and `$full_height`, for clarity.

Follow-up to [11965], [22094], [56400].

See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56411 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 10:07:25 +00:00
Joe Dolson
2acd0aca78 Administration: Invalid argument passed in additional_classes.
Fix `additional_classes` argument passed as a string instead of an array. Follow up to [56409].

Props joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56410 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 21:34:21 +00:00
Joe Dolson
8ef111843b Administration: Apply admin notice functions in multisite.
Use `wp_get_admin_notice` and `wp_admin_notice` to handle multisite settings notices.

Props costdev.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56409 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 21:01:17 +00:00
Joe Dolson
c60cfe92b4 Administration: Add function to standardize admin notices.
Add functions `wp_get_admin_notice()` and `wp_admin_notice()` to create and output admin notices & tests for usage. New functions accept a message and array of optional arguments. This commit does not implement the functions. Include new filters: `wp_admin_notice_args`, `wp_admin_notice_markup` and action: `wp_admin_notice`. 

Props joedolson, costdev, sakibmd, dasnitesh780, sabernhardt.
Fixes #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56408 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 20:27:35 +00:00
Jonathan Desrosiers
5b517ae3a6 Build/Test Tools: Revert Slack messaging changes.
This reverts [56404], [56405], [56406].

More testing is needed to ensure multiple messages are not sent unintentionally.

Unprops desrosj.
See #58867.

git-svn-id: https://develop.svn.wordpress.org/trunk@56407 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 17:56:06 +00:00
Jonathan Desrosiers
dca4cc00bd Build/Test Tools: Send a failure notice in Slack when a run fails to start.
This adds `startup_failure` to the list of conclusions that the Slack workflow looks for when determining whether to send a failure notice.

See #58867.

git-svn-id: https://develop.svn.wordpress.org/trunk@56406 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 17:34:06 +00:00
Jonathan Desrosiers
7cd891845e Build/Test Tools: Use the correct variable for checking the previous conclusion.
Follow up to [56404].
See #58867.

git-svn-id: https://develop.svn.wordpress.org/trunk@56405 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 17:17:23 +00:00
Jonathan Desrosiers
d3f193f741 Build/Test Tools: Don’t send a Slack notice when a workflow fails once.
[53947] introduced a callable workflow that allowed a workflow run to be retried automatic. By default all workflows are retried once.

Since a run is not considered “failed” until after the automatic retry, the first Slack message is unnecessary and can cause a lot of noise when there are network hiccups.

This alters the logic to skip a failure notice in Slack until the second failure.

See #58867.

git-svn-id: https://develop.svn.wordpress.org/trunk@56404 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 16:59:49 +00:00
Weston Ruter
2bd2a2fe84 Editor: Ensure defer loading strategy is only applied to a block's viewScript.
Amends [56398].
Props gziolo, westonruter.
Fixes #59115.


git-svn-id: https://develop.svn.wordpress.org/trunk@56403 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 16:37:46 +00:00
Jonathan Desrosiers
cc828e2619 Build/Test Tools: Simplify the required prerequisite jobs for the failed-workflow job.
Because `slack-notifications` job requires all preceding jobs in each workflow to complete, there’s no need to include the same jobs in the `needs` configuration for the `failed-workflow` one.

See #58867.

git-svn-id: https://develop.svn.wordpress.org/trunk@56402 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 14:42:58 +00:00
Sergey Biryukov
3131800198 Site Health: Correct the check for disk space available to safely perform updates.
If the available disk space exceeds the `PHP_INT_MAX` value, i.e. a 32-bit PHP version is in use with more than 2 GB free, the type casting to `(int)` could cause an overflow, and the Site Health test would then erroneously report that there is not enough free space. 

This commit removes the unnecessary type casting and uses the result from `disk_free_space()` directly.

Includes optimizing the logic to skip further checks if the available disk space could not be determined.

Follow-up to [55720].

Props mathsgrinds, Presskopp, rajinsharwar, SergeyBiryukov.
Fixes #59116.

git-svn-id: https://develop.svn.wordpress.org/trunk@56401 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 11:16:08 +00:00
Sergey Biryukov
8cd9907462 Coding Standards: Use strict comparison in wp-admin/includes/image-edit.php.
Follow-up to [11911], [11965], [11984], [12155], [12163], [22094].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56400 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-16 14:03:44 +00:00
Pascal Birchler
59a4df1339 Build/Test Tools: Measure additional load time metrics in performance tests.
Three new metrics are being collected and reported as part of this change:

- Time To First Byte (TTFB) - the time between the request for a resource and when the first byte of a response begins to arrive
- Largest Contentful Paint (LCP) — the render time of the largest image or text block visible within the viewport
- The difference between the two (LCP minus TTFB)

Props joemcgill, flixos90, oandregal, mukesh27, youknowriad, swissspidy.
Fixes #58360.

git-svn-id: https://develop.svn.wordpress.org/trunk@56399 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-16 08:46:22 +00:00
Weston Ruter
5fab140511 Editor: Use defer loading strategy for block view scripts.
Props westonruter, joemcgill.
Fixes #59115.


git-svn-id: https://develop.svn.wordpress.org/trunk@56398 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-16 00:13:45 +00:00
Sergey Biryukov
f6dde69ea3 Docs: Fix typo in duplicate hook references for views_{$this->screen->id}.
Follow-up to [29218], [29625].

Props nithins53, NekoJonez, mukesh27.
Fixes #59102. See #58833.

git-svn-id: https://develop.svn.wordpress.org/trunk@56397 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-15 10:07:30 +00:00
Sergey Biryukov
f107073f39 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-importer.php.
Follow-up to [14760], [50658].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56396 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-14 09:57:54 +00:00
Sergey Biryukov
25443d3a7f Coding Standards: Bring more consistency to Last-Modified and ETag checks.
This updates two fragments for sending a `304 Not Modified` header to better align with each other by using consistent variable names and formatting. 

Follow-up to [1036], [1037], [1043], [2534], [2584], [2627], [12603], [12936], [56362].

See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56395 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-13 10:29:04 +00:00
Sergey Biryukov
6929fd876f Coding Standards: Use strict comparison in wp-includes/cron.php.
Includes minor code layout fixes for better readability.

Follow-up to [3634], [4189].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56394 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-12 12:00:27 +00:00
Jonathan Desrosiers
0c96ba106c External Libraries: Update imagesLoaded to version 5.0.0.
This release drops support for IE and moves to using ES6.

A full list of changes can be found on GitHub: https://github.com/desandro/imagesloaded/compare/v4.1.4...v5.0.0.

Props nazsabuz, arnedb, costdev, audrasjb, ahmedgeek , valmedia2023 , hareesh-pillai.
Fixes #56731.

git-svn-id: https://develop.svn.wordpress.org/trunk@56393 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-11 18:16:25 +00:00
John Blackbourn
78c78cb20b Editor: Only exclude auto-generated block files from coding standards checks.
Prior to this change, all block files were excluded from coding standards checks, but there's no reason these files shouldn't adhere to core's coding standards.

Props lopo, Rahe, adamsilverstein 

Fixes #50010


git-svn-id: https://develop.svn.wordpress.org/trunk@56392 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-11 17:01:32 +00:00
Jonathan Desrosiers
5fa0387707 External Libraries: Update Backbone.js to version 1.5.0.
This release contains bug fixes and documentation improvements.

A full list of changes can be found on GitHub: https://github.com/jashkenas/backbone/compare/1.4.1...1.5.0.

Props rajinsharwar, hareesh-pillai.
Fixes #58930.

git-svn-id: https://develop.svn.wordpress.org/trunk@56391 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-11 16:10:38 +00:00
Jonathan Desrosiers
dd764d3fe6 Build/Test Tools: Update all build tool related dependencies.
This updates the following dependencies to their latest versions:
- `chalk`
- `cssnano`
- `dotenv`
- `grunt-contrib-cssmin`
- `grunt-contrib-qunit`
- `grunt-webpack`
- `jest-image-snapshot`
- `postcss`
- `sass`
- `sinon`
- `webpack`

Additionally, `npm audit fix` has been run to automatically fix as many issues as possible.

See #58863.

git-svn-id: https://develop.svn.wordpress.org/trunk@56390 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-11 16:02:43 +00:00
Jonathan Desrosiers
0ca83e91ab External Libraries: Update the whatwg-fetch polyfill library.
This updates the `whatwg-fetch` library from version `3.6.2` to `3.6.17`, the latest current version.

This library is included and registered within WordPress as the `wp-polyfill-fetch` script and is no longer used by WordPress itself.

Props rajinsharwar, hareesh-pillai.
Fixes #59066.

git-svn-id: https://develop.svn.wordpress.org/trunk@56389 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-11 14:42:58 +00:00
Jonathan Desrosiers
8d56facbeb Build/Test Tools: Update 3rd-party GitHub Actions.
This updates all 3rd-party GitHub Actions to their latest versions.

See #58867.

git-svn-id: https://develop.svn.wordpress.org/trunk@56388 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-11 13:03:21 +00:00
Jonathan Desrosiers
25f00597ec Build/Test Tools: Update the README file to reflect new Node.js/npm versions.
Follow up to [56378].

Props dantovbein, hbhalodia.
Fixes #59071. See #56658.

git-svn-id: https://develop.svn.wordpress.org/trunk@56387 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-11 12:47:42 +00:00
Sergey Biryukov
27da228e90 Docs: Correct duplicate hook reference for wp_min_priority_img_pixels.
The original filter location is `wp_maybe_add_fetchpriority_high_attr()` in `wp-includes/media.php`.

This commit updates the instance in `wp_get_loading_optimization_attributes()` to point to the correct file.

Follow-up to [56037], [56143], [56347].

Props tmatsuur, rajinsharwar, khokansardar.
Fixes #59067.

git-svn-id: https://develop.svn.wordpress.org/trunk@56386 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-11 11:33:27 +00:00
André
92521d79e3 Themes: add wp_get_theme_data_template_parts function.
Adds a new public function, `wp_get_theme_data_template_parts` that returns the `templateParts` defined by the active theme from `theme.json`. It also substitutes the usage of private APIs by this new API.

Props felixarntz.
Fixes #59003


git-svn-id: https://develop.svn.wordpress.org/trunk@56385 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-11 11:22:54 +00:00