46614 Commits

Author SHA1 Message Date
Jb Audras
5b5e1bb8c9 Build/Test Tools: Add unit test for non-existing block-styles registration.
Follow-up to [54155].

Props aristath, mukesh27.
Fixes #56664.


git-svn-id: https://develop.svn.wordpress.org/trunk@54472 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 09:58:27 +00:00
John Blackbourn
e5ad18117c Taxonomy: Correct an invalid @param tag.
See #55646


git-svn-id: https://develop.svn.wordpress.org/trunk@54471 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 09:54:12 +00:00
John Blackbourn
a99a48c3b9 Docs: Various improvements to inline docblocks.
See #55646


git-svn-id: https://develop.svn.wordpress.org/trunk@54470 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 09:00:33 +00:00
Jb Audras
c8a7216896 I18N: Use wp.i18n._n() for plural forms in wp_print_admin_notice_templates().
This changeset adds better support for plural forms in update admin notices generated on the Themes and Plugins screens. This fixes issues when translating into languages that have more than one plural form, or more complicated rules for singular form usage.

Props ideag, SergeyBiryukov, daledupreez, audrasjb.
Fixes #37287.


git-svn-id: https://develop.svn.wordpress.org/trunk@54469 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 08:46:00 +00:00
Jonathan Desrosiers
4f62b4eb66 XML-RPC: Avoid loopback request in blogger.getUsersBlogs.
The `blogger.getUsersBlogs` endpoint does not currently work on Multisite environments which require HTTPS.

This changes `wp_xmlrpc_server::_multisite_getUsersBlogs()` to call the method directly instead of relying on a new `IXR_Client` request, which only supports HTTP.

Props dd32.
Fixes #56492.

git-svn-id: https://develop.svn.wordpress.org/trunk@54468 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 01:44:09 +00:00
Jonathan Desrosiers
4d75282dee Twenty Twenty-Three: Bug fixes and improvements for RC1.
Most notably in this update, Twenty Twenty-Three becomes the second default theme to have the “Accessibility Ready” tag.

For a full list of changes being included, see the `twentytwentythree` repository on GitHub: ca662828b7...4ea5d832ec.

Follow up to [54235], [54236], [54312], [54372].

Props mikachan, madhudollu, tahmidulkarim, joen, poena, scruffian, beafialho, colorful-tones, audrasjb, critterverse, luminuu, wildworks, hiyascout, desrosj.
Fixes #56383.

git-svn-id: https://develop.svn.wordpress.org/trunk@54467 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 00:42:28 +00:00
Jb Audras
8dede96705 Twenty Nineteen: Add missing compiled CSS declarations after [54413].
Follow-up to [54413].

Props sabernhardt, whaze.
Fixes #55981.


git-svn-id: https://develop.svn.wordpress.org/trunk@54466 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 23:13:25 +00:00
Peter Wilson
8f26450fba Embeds: Revert Google Data Studio as trusted provider.
Remove Google Data Studio's status as a trusted oEmbed provider pending upstream implementation of the oEmbed specification.

See #55771.



git-svn-id: https://develop.svn.wordpress.org/trunk@54465 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 23:09:53 +00:00
Jb Audras
5ef83659d0 Query: Prevent PHP notice when get_post_type_object() returns null in is_post_type_archive().
This changeset avoids potential PHP notices caused by `get_post_type_object()` returning `null` when called inside `is_post_type_archive()`.

Props sean212, costdev.
Fixes #56287.


git-svn-id: https://develop.svn.wordpress.org/trunk@54464 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 23:01:08 +00:00
Jb Audras
ce7c0362bf Twenty Seventeen: Prevent scaling issues on featured images using Safari on iPadOS.
This changeset ensures `background-attachment` is set to `scroll` for parallax images when the browser is iOS Safari and the screen is at least 48em (768px) wide. Narrower screens have the default `scroll` value regardless of the browser. It prevents from scaling issues on the images featured on the front page using Twenty Seventeen.

Props JarretC, sabernhardt, mrfoxtalbot, dkotter.
Fixes #48195.


git-svn-id: https://develop.svn.wordpress.org/trunk@54450 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 21:54:55 +00:00
Jb Audras
aad26ece43 General: Remove instances of _wp_http_referer from GET forms in the admin.
This changeset removes all instances of `_wp_http_referer` variable from the URL when creating a hidden input for `_wp_http_referer`. It prevents the hidden field from having an additional version of `_wp_http_referer` each time the form is submitted.

Props msolution, justinahinon, pbearne, mikeschroder, mukesh27, audrasjb, Clorith, chaion07, robinwpdeveloper, hztyfoon, davidbaumwald, costdev, adamsilverstein.
Fixes #54106.


git-svn-id: https://develop.svn.wordpress.org/trunk@54449 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 18:57:44 +00:00
Sergey Biryukov
832b6c35f3 Cache API: Introduce wp_cache_supports() function.
WordPress has recently introduced a variety of caching API improvements:

* `wp_cache_add_multiple()`
* `wp_cache_set_multiple()`
* `wp_cache_get_multiple()`
* `wp_cache_delete_multiple()`
* `wp_cache_flush_runtime()`
* `wp_cache_flush_group()`

Although WordPress core provides a compatibility layer if these functions are missing from third-party object cache implementations, there should be a method of checking whether the cache backend supports a particular feature.

This commit aims to improve developer experience by allowing third-party object cache plugins to declare a `wp_cache_supports()` function and correctly list their supported features:

* `add_multiple`
* `set_multiple`
* `get_multiple`
* `delete_multiple`
* `flush_runtime`
* `flush_group`

Note: The `wp_cache_supports()` function replaces and supersedes the `wp_cache_supports_group_flush()` function added earlier.

Follow-up to [47938], [47944], [52700], [52703], [52706], [52708], [53763], [53767], [54423].

Props johnjamesjacoby, tillkruess, spacedmonkey, SergeyBiryukov.
Fixes #56605.

git-svn-id: https://develop.svn.wordpress.org/trunk@54448 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 18:20:28 +00:00
Sergey Biryukov
5cbf7edcc8 Login and Registration: Rename is_login_screen() function to is_login().
As the function can be used in a variety of contexts, the `_screen` suffix may not always be appropriate.

This commit aims to reduce confusion by renaming the newly added `is_login_screen()` function to `is_login()`, which better aligns with `is_admin()` and the related `is_*_admin()` function family.

While it does not save a lot of lines of code, this function aims to save developers some time that would otherwise be spent investigating the most reliable way to determine whether the current request is for the login screen.

Implementation details:
* By checking `wp_login_url()`, the function accounts for custom login locations set via the `login_url` filter.
* By checking `$_SERVER['SCRIPT_NAME']` directly, instead of `did_action( 'login_form_login' )` or `$pagenow` global, the function can work as early as possible, for example in a must-use plugin.

Follow-up to [53884].

Props azaozz.
Fixes #19898. See #56400.

git-svn-id: https://develop.svn.wordpress.org/trunk@54447 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 17:57:52 +00:00
Sergey Biryukov
bd001e80df Tests: Use assertSame() in some WP_Theme_JSON tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Previously committed in [54402], these instances appear to be accidentally reverted to `assertEquals()` in [54443].

Follow-up to [52275], [54162], [54402], [54443].

See #55654.

git-svn-id: https://develop.svn.wordpress.org/trunk@54446 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 15:57:11 +00:00
David Baumwald
6d9701a6f0 Editor: Dynamic site editor template names performance improvements.
This change updates `get_(posts|terms)()` to direct `WP_Query` calls and adds additional parameters to each query to improve performance.

Follow-up to [54280], [54333], [54370], and [54388].

Props spacedmonkey, peterwilsoncc.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54445 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 15:15:31 +00:00
Jb Audras
db94aaa31c Build/Test Tools: Add missing newline character on unit tests files after [54443].
Follow-up to [54443].

See #56611.


git-svn-id: https://develop.svn.wordpress.org/trunk@54444 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 15:01:03 +00:00
Jb Audras
22f5f109bc Build/Test Tools: Expand unit tests for theme.json.
This changeset adds unit test coverage for the following features:

- Gradients
- `filter` (Duotones)
- `blockGap`
- `shadow`
- `useRootPaddingAwareAlignments`
- `appearanceTools`

Props gunterer, johnregan3, audrasjb, mukesh27.
Fixes #56611.


git-svn-id: https://develop.svn.wordpress.org/trunk@54443 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 14:52:21 +00:00
Jb Audras
308a2fc31f Upgrade/Install: Provide dirpath in error messages when _unzip_file_pclzip() cannot create directories.
This changeset ensures the directory path is provided in error messages when `_unzip_file_pclzip()` is unable to create a directory. This removes `substr()` which was returning an empty string in some use cases.

Props gunterer, SergeyBiryukov, n8finch, peterwilsoncc, audrasjb, rsiddharth, costdev , desrosj, mukesh27.
Fixes #54477.


git-svn-id: https://develop.svn.wordpress.org/trunk@54442 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 12:46:19 +00:00
Jb Audras
0d9ba6cb1a Docs: Improve wp_get_object_terms() return type.
Props dd32, audrasjb, desrosj, mukesh27.
Fixes #56327.
See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@54441 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 12:28:20 +00:00
Jb Audras
5fc77340a7 Users: Fix Users list bottom filters margins on small screens.
This changeset fixes bottom filters margins of the Users list screen on small screens.

Props sumitsingh, sabernhardt, shreyasikhar26, audrasjb.
Fixes #54813.


git-svn-id: https://develop.svn.wordpress.org/trunk@54429 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-09 23:00:44 +00:00
Sergey Biryukov
21c38bb6b3 Tests: Minimize file copying in WP_REST_Attachments_Controller tests.
The tests use two images that were deleted on teardown and recreated on setup for every single test. This appears to be unnecessary, as the files can instead only be recreated if they are missing, and deleted after the test run is complete.

This commit reduces ~200 redundant file copying operations to ~5 when running this test class.

Follow-up to [38832], [48291], [54424].

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54428 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-09 17:45:54 +00:00
Sergey Biryukov
f1396626d1 External Libraries: Upgrade PHPMailer to version 6.6.5.
This is a maintenance release with minor changes:
* Don't try to issue `RSET` if there has been a connection error.
* Reject attempts to add folders as attachments.
* Don't suppress earlier error messages on `close()`.
* Handle `Host === null` better.

Release notes:
https://github.com/PHPMailer/PHPMailer/releases/tag/v6.6.5

For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.6.4...v6.6.5

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500], [53535], [53917].

Props ayeshrajans, Synchro.
Fixes #56772.

git-svn-id: https://develop.svn.wordpress.org/trunk@54427 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-09 17:10:22 +00:00
SergeyBiryukov
e8f4e448c9 Coding Standards: Correct alignment in test_import_theme_starter_content().
This fixes an `Equals sign not aligned correctly` WPCS warning.

Follow-up to [54425].

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54426 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-09 16:37:01 +00:00
Sergey Biryukov
2517aff837 Tests: Clean up test images in WP_Customize_Manager tests.
The test for `WP_Customizer_Manager::import_theme_starter_content()` creates two attachments that remain in the `uploads` directory after the test run is complete.

This commit follows the approach from `WP_REST_Posts_Controller` tests and utilizes an `$attachments_created` property to track any files uploaded in the current test run and clean them up afterwards.

This makes sure there are no leftover images after the test class is run.

Follow-up to [39276], [39346], [39411], [40142], [53935], [54424].

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54425 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-09 16:26:57 +00:00
Sergey Biryukov
323ac54d4b Tests: Remove unnecessary file copying in WP_Customize_Manager tests.
This was added to avoid creating leftover image sub-sizes in the version-controlled `DIR_TESTDATA` directory.

However, this does not appear to be necessary:
* `WP_Customizer_Manager::import_theme_starter_content()` already [source:tags/6.0.2/src/wp-includes/class-wp-customize-manager.php?marks=1370-1374#L1367 makes a copy of the image] before sideloading, so the test was essentially working with a copy of a copy.
* The images were only used in one test out of 70 and do not need to be copied for every single test.

Upon further investigation, there is also no evidence that creating these copies actually resolved the reported issue:
* `WP_UnitTest_Factory_For_Attachment::create_object()` inserts an attachment, but does not create image sub-sizes.
* `media_handle_sideload()` does create image sub-sizes, but the file is already in the media library by that time, and sub-sizes are created in the `uploads` directory, not in the version-controlled `DIR_TESTDATA` directory.

This commit removes ~140 redundant file copying operations when running the test suite.

Follow-up to [39276], [39346], [39411], [40142].

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54424 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-09 13:45:23 +00:00
Sergey Biryukov
8d25a65892 Tests: Add wp_cache_*_multiple() functions to Memcached implementation used in the test suite.
Since this object cache implementation was added, WordPress has introduced a variety of caching API improvements:
* `wp_cache_add_multiple()`
* `wp_cache_set_multiple()`
* `wp_cache_get_multiple()`
* `wp_cache_delete_multiple()`

Although WordPress core provides a compatibility layer if these functions are missing from third-party object caches, this commit updates the Memcached object cache used in the test suite to implement these new functions directly.

Follow-up to [40561], [47938], [47944], [52700], [52703], [52706], [52708].

Props petitphp, spacedmonkey, tillkruss, SergeyBiryukov.
Fixes #54864.

git-svn-id: https://develop.svn.wordpress.org/trunk@54423 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-08 13:39:43 +00:00
Jb Audras
ec7a7c3f16 Build/Test Tools: Add tests coverage for _wp_check_alternate_file_names().
This changeset adds missing unit tests for this function.

Props pbearne, costdev, peterwilsoncc.
Fixes #55199.


git-svn-id: https://develop.svn.wordpress.org/trunk@54422 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-08 09:16:35 +00:00
Jb Audras
d53d13d6ce Build/Test Tools: Add tests for WP_List_Util::pluck and WP_List_Util::sort.
This changeset adds additional unit tests for these two functions.

Props pbearne, costdev, afragen.
Fixes #55300.


git-svn-id: https://develop.svn.wordpress.org/trunk@54421 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-08 08:44:45 +00:00
Jb Audras
a904cf42f8 Build/Test Tools: Add tests for wp_nonce_field() and wp_referer_field().
This changeset adds missing unit tests for these two functions.

Props pbearne, costdev, audrasjb.
Fixes #55578.


git-svn-id: https://develop.svn.wordpress.org/trunk@54420 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 22:17:06 +00:00
Weston Ruter
6d43d90b5f Customize: Prevent PHP notice in Customizer when using block theme.
Use the `customize_panel_active` filter to deactivate the Menus panel instead of overriding the `check_capabilities` method. This ensures the panel remains registered but is still hidden.

See #54888.
Fixes #54905.


git-svn-id: https://develop.svn.wordpress.org/trunk@54419 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 20:46:39 +00:00
Jb Audras
50a705a443 Twenty Twenty: Improve Separator Block rendering.
This changeset fixes inconsistent alignment behavior of the Separator Block in the editor.

Props kmadhak, sabernhardt, mukesh27, nidhidhandhukiya, kajalgohel.
Fixes #55910.


git-svn-id: https://develop.svn.wordpress.org/trunk@54418 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 20:40:31 +00:00
Adam Silverstein
16f127dff7 Media: ensure the wp_editor_set_quality filter consistently passes the correct output mime type.
Ensure that the mime type passed to the `wp_editor_set_quality` filter is correct when the output format is altered with the `image_editor_output_format` filter and the image is saved multiple times, for example when generating sub sizes. Previously, the original image mime type was passed instead of the output type after the initial save.

Props flixos90, peterwilsoncc.
Fixes #56442.




git-svn-id: https://develop.svn.wordpress.org/trunk@54417 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 19:15:59 +00:00
Adam Silverstein
72a43bca8f Media: improve image engine detection when using the output format filter.
When the output format is altered with the `image_editor_output_format` filter, prefer the image engine that supports both input an output types, falling back to the engine that supports the input type.

Correct an issue where the output format filter wasn't respected because the selected engine didn't support the output format.

Props mikeschroder, ironprogrammer.
Fixes #54476.




git-svn-id: https://develop.svn.wordpress.org/trunk@54416 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 19:01:32 +00:00
Sergey Biryukov
461f0b4887 Blocks: Avoid extra calls to realpath() in block scripts and styles registration.
This affects:
* `register_block_script_handle()`
* `register_block_style_handle()`

Both functions set a variable with this code:
{{{
$wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) );
}}}

That value never changes during page load, so we can save it to a static variable. By doing so, we can avoid ~200 calls to `realpath()` and `wp_normalize_path()`, or even more if third-party plugins register scripts or styles.

Follow-up to [52291], [52939], [54290], [54291], [54309], [54327].

Props aristath, mukesh27, SergeyBiryukov.
Fixes #56758.

git-svn-id: https://develop.svn.wordpress.org/trunk@54415 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 15:44:31 +00:00
David Baumwald
494d20c469 Administration: Guard against undefined $GLOBALS['hook_suffix'] in WP_Screen::get().
When initially defaulting the screen `$id` in `WP_Screen::get()`, if the `$hook_name` parameter is not supplied, an `else` fallback uses `$GLOBALS['hook_suffix']`.  However, in some cases, `hook_suffix` doesn't exist in the global scope.  This produces an "Undefined index" notice on < PHP 8, and a warning in >= PHP 8.

This change ensures `$GLOBALS['hook_suffix']` has a value before using it as a fallback for the screen ID.

Props splendorstudio, SergeyBiryukov, htdat, mukesh27, dd32, costdev.
Fixes #49089.

git-svn-id: https://develop.svn.wordpress.org/trunk@54414 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 14:23:58 +00:00
Jb Audras
9bbdd27b13 Twenty Nineteen: Ensure Pullquote Block text color is reflected on front-end.
This changeset ensures Pullquote Block text is consistent between the editor a on front-end.

Props nithins53, umesh84, sabernhardt, deepakvijayan, poena.
Fixes #55981.


git-svn-id: https://develop.svn.wordpress.org/trunk@54413 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 12:10:19 +00:00
Jb Audras
d74ed551cc Docs: Various docblock fixes in global-styles-and-settings.php, as per documentation standards.
Follow-up to [54408].

See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@54412 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 12:07:09 +00:00
Jb Audras
e89286a4a7 Docs: Various docblock fixes in WP_Theme_JSON class, as per documentation standards.
Follow-up to [54408].

See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@54411 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 11:59:18 +00:00
Jonny Harris
fd60449f92 Query: Move call to update_menu_item_cache in WP_Query
Move call to `update_menu_item_cache` in `WP_Query` to after post meta caches for menu items are primed. 

Props spacedmonkey, peterwilsoncc, mukesh27.
See #55620.

git-svn-id: https://develop.svn.wordpress.org/trunk@54410 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 09:58:32 +00:00
Jorge Costa
f3c0f743b3 Fix: cite styles declared via theme.json not working.
Fixes an issue where cite elements declared on theme.json are not being output on the front end of the website.

Props oandregal, carolinan, scruffian.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54409 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 09:44:25 +00:00
Jb Audras
78ae395fa6 Editor: Add missing blocks origin to theme.json.
This changeset updates the blocks origin name from core to blocks and adds it to the list of valid origins for `theme.json`.
(See the original fix in [https://github.com//pull/3319 Gutenberg's PR 44363]).

Why?

- This new origin was missing from the list.
- The `core` name is not reflective of what it does, as this data origin is related to block styles, whether they come with WordPress or third-party blocks.
- The existing filter for this piece of data is called `theme_json_blocks`, to reflect it filters "block" data.
- Though `core` origin was used in the past for `default`, this commit reverts it. Why? It was confusing. The goal is to use names that communicate what part of the pipeline are processing (`default > blocks > theme > custom`).

How?

- Renames the string, from `core` to `blocks`.
- Adds `blocks` to the list of valid origins.
- Verifies that the `$theme_json->get_stylesheet()` call uses the proper `$origins` at all times.

Follow-up to [54162], [54251].

Props oandregal, czapla, jorgefilipecosta, scruffian, bernhard-reiter hellofromTonya.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54408 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 09:38:15 +00:00
Peter Wilson
426d20a60a Build/Test tools: Add tests for wp_nonce_url().
Props pbearne, costdev.
See #55652.
Fixes #54870.


git-svn-id: https://develop.svn.wordpress.org/trunk@54407 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 02:49:24 +00:00
Jonathan Desrosiers
f96d9ade2d Build/Test Tools: Use require_once instead of require.
The `sync-stable-blocks.js` file is used to compile the contents of `require-dynamic-blocks.php`, which includes the PHP files required for dynamic Core blocks.

Since these files define PHP functions, `require_once` should be used instead of `require` to guard against fatal errors.

Follow up to [53688].

Props aristath, SergeyBiryukov, desrosj.
Fixes #56738. See #56179.

git-svn-id: https://develop.svn.wordpress.org/trunk@54406 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 01:56:31 +00:00
Jonathan Desrosiers
75a4551107 Bundled Themes: Properly escape URLs.
This adds output escaping to several theme related URLs.

Props alberuni-azad, sabernhardt.
Fixes #56696.

git-svn-id: https://develop.svn.wordpress.org/trunk@54405 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 01:32:55 +00:00
Jonathan Desrosiers
ef488dcd42 Twenty Eleven: Pass template directory URLs through esc_url().
Props alberuni-azad, sabernhardt, costdev.
Fixes #56717. See #56696.

git-svn-id: https://develop.svn.wordpress.org/trunk@54404 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 01:23:02 +00:00
Sergey Biryukov
063f946989 Tests: Clean up test image for site icon in Tests_REST_Server on teardown.
This makes sure there are no leftover images after the test class is run.

Follow-up to [52080], [53463], [53920].

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54403 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 01:07:28 +00:00
Jonathan Desrosiers
28fdf705dc Tests: Replace some occurrences of assertEquals() with assertSame().
This ensures that not only the return values match the expected results, but also that their type is the same.

Props costdev, desrosj.
See #55654.

git-svn-id: https://develop.svn.wordpress.org/trunk@54402 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 01:02:07 +00:00
Sergey Biryukov
8128f19599 Tests: Bring some consistency to WP_Image_Editor_GD and WP_Image_Editor_Imagick tests.
Includes:
* Adjusting test method descriptions and comments per the documentation standards.
* Creating image editor class instances directly, instead of calling `wp_get_image_editor()`.
* Cleaning up temporary files before performing assertions, where possible.
* Using more consistent variable names for image editor class instances.
* Reordering some test methods.

Follow-up to [1182/tests], [1188/tests], [27794], [30549], [30990], [31040], [39580], [40123], [49230], [49488], [49542], [49751].

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54401 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-07 00:40:07 +00:00
Jonathan Desrosiers
b26d9a0b32 Build/Test Tools: Update npm dependencies to their latest versions.
This updates the following `devDependencies`:

- `chalk` from `5.0.1` to `5.1.0`
- `dotenv` from `16.0.2` to `16.0.3`
- `sinon` from `14.0.0` to `14.0.1`
- `uglify-js` from `3.17.1` to `3.17.3`

This is the final dependency bump for 6.1.

See #56641.

git-svn-id: https://develop.svn.wordpress.org/trunk@54400 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-06 18:55:05 +00:00
David Baumwald
a93789208f Editor: Ensure block styles in theme.json are rendered.
This change removes the caching of theme data in `WP_Theme_JSON_Resolver::get_theme_data()`, instead freshly compiling theme data on each call.

Also, to prevent any performance degradation by the removal, the file contents of `theme.json` files are now cached in `WP_Theme_JSON_Resolver::read_json_file()`, preventing multiple filesystem reads.

Follow-up to [54385].

Props ndiego, bph, mikachan, andrewserong, oandregal, cbravobernal, bernhard-reiter, aristath.
Fixes #56736.

git-svn-id: https://develop.svn.wordpress.org/trunk@54399 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-06 18:00:21 +00:00