Commit Graph

22490 Commits

Author SHA1 Message Date
Felix Arntz
cc64ed22bd Options, Meta APIs: Fix bug with update_option() updating the wrong cache, leading to potentially stale values being returned.
When using the `$autoload` parameter of `update_option()` alongside an option value update, prior to this changeset the function would update the incorrect cache, not respecting the new autoload value. This could have severe implications such as returning a stale option value when the option in fact had already been deleted.

This changeset fixes the bug alongside test coverage that failed with `trunk` but now passes.

Props kkmuffme, pentatonicfunk, SergeyBiryukov, oglekler, azaozz, spacedmonkey, nicolefurlan, joemcgill, flixos90.
Fixes #51352.


git-svn-id: https://develop.svn.wordpress.org/trunk@56796 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-06 16:31:22 +00:00
Sergey Biryukov
478cd02dfe Editor: Move wp_navigation schema updating to WP_Navigation_Fallback class.
This aims to better align the navigation fallback implementation with core architecture and best practices.

The function that updates the `wp_navigation` post response schema is now a public method of the `WP_Navigation_Fallback` class, so an extra file previously used for that specific function is no longer necessary.

Follow-up to [56052].

Props ramonopoly, scruffian, isabel_brison, mukesh27, swissspidy, rajinsharwar, afercia, audrasjb, mikeschroder, JeffPaul, johnjamesjacoby, TimothyBlynJacobs, oglekler, SergeyBiryukov.
Fixes #58910.

git-svn-id: https://develop.svn.wordpress.org/trunk@56793 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-06 14:04:22 +00:00
Jb Audras
64b699e8e3 Twenty Twenty-Three: Add missing font licenses in readme.txt file.
Props benimub.
Fixes #59483.





git-svn-id: https://develop.svn.wordpress.org/trunk@56791 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-05 22:44:03 +00:00
Sergey Biryukov
7c12150a80 HTML API: Rename WP_HTML_Processor::createFragment() to follow WPCS.
`WP_HTML_Processor::create_fragment()` is the correct method name as per the WordPress PHP coding standards.

Follow-up to [56274].

Props dmsnell, jrf, hellofromTonya, SergeyBiryukov.
Fixes #59547.

git-svn-id: https://develop.svn.wordpress.org/trunk@56790 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-05 22:40:48 +00:00
Felix Arntz
b77b8fd822 Options, Meta APIs: Fix minor compatibility issue with update_option() change.
When calling `update_option()` with value `false` on a non-existent option, prior to [56681] the function would have returned `false` and not stored the value in the database, since the given value was the same as the default.

The aforementioned changeset broke that promise with good intention, however this particular change was a backward compatibility break and therefore is resolved here.

Props mukesh27, costdev.
Fixes #22192.


git-svn-id: https://develop.svn.wordpress.org/trunk@56788 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-05 16:13:38 +00:00
Joe McGill
23c811e59f Themes: Fix core block style paths on Windows.
This is a follow-up to [56528], which normalizes the `BLOCKS_PATH` for Windows prior to making paths relative for caches during the registration process. Prior to this change, incorrect file paths would lead to broken styles for core blocks on Windows.

Props wildworks, pbiron, flixos90, joemcgill.
Fixes #59489. See #59111.


git-svn-id: https://develop.svn.wordpress.org/trunk@56785 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-04 22:21:17 +00:00
Jb Audras
89da2ff3a9 Twenty Twenty: Fix style issues within iframed editor.
This changeset:
- Replaces `body` with `html` for the first CSS selector that makes text white against a dark background
- Moves `twentytwenty_block_editor_styles()` from the `enqueue_block_editor_assets` action to `enqueue_block_assets` for WordPress 6.3 and later
- Removes the obsolete `twentytwenty-block-editor-script` from the styles function to avoid an error in the iframe

Props floydwilde, poena, huzaifaalmesbah, greenshady, sabernhardt, audrasjb, pooja1210, shailu25, joemcgill.
Fixes #59086.





git-svn-id: https://develop.svn.wordpress.org/trunk@56783 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-04 20:54:34 +00:00
Jb Audras
058cd259bc Editor: Fix wrong @since mention in remove_insecure_properties().
Follow-up to [56502].

See #59108.





git-svn-id: https://develop.svn.wordpress.org/trunk@56778 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-04 19:01:49 +00:00
Tonya Mork
ddbce71885 Twenty Twenty-Four: Fix 6.4 Beta 2 image assets.
Fixes the image assets from [56764] for the images to properly render.

Adds binary file contents (resolves 0 bytes issue) and svn:mime-type property:
* abstract-geometric-art.webp
* building-exterior.webp
* hotel-facade.webp
* museum.webp
* tourist-and-building.webp
* windows.webp

Updates the binary file contents for renamed images:
* angular-roof.webp
* art-gallery.webp
* green-staircase.webp

Follow-up to [56764].

Unprops hellofromTonya.
Props onemaggie, luminuu, colorful-tones, desrosj, mukesh27, nendeb55, nicolefurlan, satishprajapati, shailu25.
Fixes #59526.
See #59524.

git-svn-id: https://develop.svn.wordpress.org/trunk@56775 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-04 17:00:12 +00:00
Sergey Biryukov
5fce177861 Docs: Use 3-digit, x.x.x style semantic versioning for two @since entries.
Follow-up to [41626], [56541].

See #58833.

git-svn-id: https://develop.svn.wordpress.org/trunk@56774 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-04 15:10:56 +00:00
Jonny Harris
5a58e171d4 Docs: Improve documentation for _prime_post_parents_caches().
Add in missing since PHPDoc block for `_prime_post_parents_caches` function added in [56763].

Props mukesh27.
See #59188

git-svn-id: https://develop.svn.wordpress.org/trunk@56773 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-04 12:14:50 +00:00
Sergey Biryukov
d9edabf016 Twenty Fourteen: Correct @since entry for an authors list query arguments filter.
Follow-up to [51943].

See #58833.

git-svn-id: https://develop.svn.wordpress.org/trunk@56772 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-04 12:12:56 +00:00
Felix Arntz
d8206d2167 Editor: Simplify return shape and logic of _wp_get_block_patterns().
Follow up to [56765].

Props spacedmonkey.
Fixes #59490.


git-svn-id: https://develop.svn.wordpress.org/trunk@56771 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-03 18:17:03 +00:00
Tonya Mork
046ce88332 Post WordPress 6.4 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@56769 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-03 17:07:21 +00:00
Tonya Mork
8c74bce2e4 WordPress 6.4 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@56768 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-03 16:30:41 +00:00
Sergey Biryukov
17e518ae0e Docs: Improve documentation for get_avatar() and related functions.
Includes:
* Expanding and synchronizing documentation for the `default` and `rating` arguments.
* Adding `@since` entries for the `loading`, `fetchpriority`, and `decoding` arguments.
* Wrapping long lines as per the documentation standards.
* Fixing a typo in the `identicon` value.
* Minor formatting edits for consistency.

Follow-up to [31107], [45632], [47554], [53480], [56037].

See #58833.

git-svn-id: https://develop.svn.wordpress.org/trunk@56767 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-03 16:13:43 +00:00
Jonny Harris
3ad20183b0 Editor: Improve performance of _register_theme_block_patterns function.
The `_register_theme_block_patterns` function imposed a significant resource overhead. This issue primarily stems from themes, such as TT4, that register a substantial number of block patterns. These patterns necessitate numerous file operations, including file lookups, file reading into memory, and related processes. To provide an overview, the _register_theme_block_patterns function performed the following file operations:

- is_dir
- is_readable
- file_exists
- glob
- file_get_contents (utilized via get_file_data)

To address these issues, caching using a transient has been added to a new function call `_wp_get_block_patterns`. If theme development mode is disabled and theme exists, the block patterns are saved in a transient cache. This cache is used all requests after that, saving file lookups and reading files into memory. Cache invalidation is done, when themes are switched, deleted or updated. Meaning that block patterns are not stored in the cache incorrectly. 

Props flixos90, joemcgill, peterwilsoncc, costdev, swissspidy, aristath, westonruter, spacedmonkey.
Fixes #59490

git-svn-id: https://develop.svn.wordpress.org/trunk@56765 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-03 15:16:55 +00:00
Tonya Mork
d5505fc3b3 Bundled Themes: Update TT4 for 6.4 Beta 2.
Twenty Twenty-Four (TT4) updates for 6.4 Beta 2.

Changes include bugfixes from the theme's development repo since Beta 1 such as: 
* Renamed patterns and images
* Improved image descriptions
* Polished a few of the templates to fit better the design
* Addressed some a11y concerns.
* Changed the required version to 6.4, aligning it with the last few default themes since we are making use of some of the features that will make it to 6.4, such as aspect ratio.

Follow-up to [56726], [56721], [56716].

Props onemaggie, desrosj, mukesh27.
Fixes #59524.

git-svn-id: https://develop.svn.wordpress.org/trunk@56764 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-03 15:12:30 +00:00
Jonny Harris
6ee34689ca Query: Improve caching behavior for WP_Query when retrieving id=>parent fields
In [53941], the addition of query caching to `WP_Query` brought about an unintended issue when querying for fields equal to id=>parent. Specifically, on websites with object caching enabled and a substantial number of pages, the second run of this query triggered the `_prime_post_caches` function for id=>parent. This led to the unnecessary priming of post, meta, and term caches, even when only id and parent information were requested.

This commit addresses this issue by introducing a new function, `_prime_post_parents_caches`, which primes a dedicated cache for post parents. This cache is primed during the initial query execution. Subsequently, the `wp_cache_get_multiple` function is employed to retrieve all post parent data in a single object cache request, optimizing performance.

Additionally, this commit extends the coverage of existing unit tests to ensure the reliability of the changes.

Props kevinfodness, joemcgill, peterwilsoncc, LinSoftware, thekt12, spacedmonkey.
Fixes #59188

git-svn-id: https://develop.svn.wordpress.org/trunk@56763 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-03 14:59:22 +00:00
Daniel Bachhuber
a1852bd49b Editor: Add function prefix to avoid conflicts.
Transforms `initialize_theme_preview_hooks` to `wp_initialize_theme_preview_hooks` to avoid conflicts with third-party code.

Follow up to [56529].

Props okat.
See #59000.


git-svn-id: https://develop.svn.wordpress.org/trunk@56757 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-02 22:40:36 +00:00
Felix Arntz
bc259ddd3f Media: Prevent PHP notice in get_avatar().
Follow up fix to [56690].

Props pereirinha, mukesh27, spacedmonkey.
Fixes #58892.


git-svn-id: https://develop.svn.wordpress.org/trunk@56756 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-02 20:12:13 +00:00
Tammie Lister
1d0876b676 Update npm packages to latest.
The npm packages needed a further update for beta 2 in preparation for 6.4.

Props @mmaattiiaass , @wildworks , @aaronrobertshaw, @bartkalisz, @mamaduka, @artemiosans, @youknowriad, @czapla, @richtabor, @glendaviesnz, @pbking, @cbravobernal, @madhudollu, @kevin940726, @adamsilverstein, @get_dave, @ntsekouras, @ramonopoly, @jffng, @swissspidy, @carlosgprim, @siobhyb, @mikachan.

See #59411.


git-svn-id: https://develop.svn.wordpress.org/trunk@56755 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-02 18:55:27 +00:00
Felix Arntz
e686e81122 Script Loader: Fix missing documentation for the $path argument of wp_enqueue_block_style().
See #59466.


git-svn-id: https://develop.svn.wordpress.org/trunk@56754 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-02 18:46:30 +00:00
Sergey Biryukov
f7d73158ac Coding Standards: Remove redundant ignore annotations, take 5.
The `VariableAnalysis` standard is not used by WP Core.

Follow-up to [50958], [51003], [52049], [52051], [52069], [53072], [54132], [55132], [56363], [56738], [56743], [56751], [56752].

Props jrf.
See #59161.

git-svn-id: https://develop.svn.wordpress.org/trunk@56753 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-02 11:25:35 +00:00
Sergey Biryukov
8bbeee43b6 Coding Standards: Remove redundant ignore annotations, take 4.
This removes ignore annotations related to sniffs which are not used by WP Core (like sniffs in the `WordPress-Extra` ruleset).

Follow-up to [48072], [51003], [55204], [56714].

Props jrf.
See #59161.

git-svn-id: https://develop.svn.wordpress.org/trunk@56752 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-01 00:20:53 +00:00
Sergey Biryukov
00ed25e2c9 Coding Standards: Remove redundant ignore annotations, take 3.
This removes ignore annotations about invalid function names for deprecated functions. Those are ignored by design in WPCS since version 2.2.0.

Follow-up to [45580], [47612], [47927].

Props jrf.
See #59161.

git-svn-id: https://develop.svn.wordpress.org/trunk@56751 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-30 07:37:34 +00:00
Weston Ruter
1092ac0ea7 Script Loader: Remove erroneous type attribute from script tag wrapper on login screen.
This was causing a `_doing_it_wrong()` notice from `wp_remove_surrounding_empty_script_tags()`. In fact, the `type` attribute was added in [56748] to test this incorrect usage notice. This commit reverts that change.

Follow-up to [56748].
Unprops westonruter.
See #58664.


git-svn-id: https://develop.svn.wordpress.org/trunk@56750 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-29 21:59:14 +00:00
Weston Ruter
1427d84abc Customize: Harden and modernize URL manipulation in WP_Customize_Manager::remove_frameless_preview_messenger_channel().
Since IE11 is no longer supported, the `URL` and `URLSearchParams` APIs can now be leveraged for simpler and more robust URL manipulation. This was done similarly in [56383] for `embed.js`.

Props nicolefurlan, dmsnell, westonruter.
Fixes #59480.


git-svn-id: https://develop.svn.wordpress.org/trunk@56749 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-29 21:37:06 +00:00
Weston Ruter
8c0adc93df Script Loader: Harden removal of script tag wrappers.
* Add `wp_remove_surrounding_empty_script_tags()` to more precisely remove script tag wrappers and warn when doing it wrong.
* Add clarifying comments for XML escaping logic in `wp_get_inline_script_tag()`.
* Leverage `WP_HTML_Tag_Processor` in `test_remove_frameless_preview_messenger_channel`.
* Reuse `assertEqualMarkup` in `test_blocking_dependent_with_delayed_dependency`.
* Normalize whitespace in `parse_markup_fragment` for `assertEqualMarkup`.

Follow-up to [56687].
Props dmsnell, westonruter, flixos90.
See #58664.


git-svn-id: https://develop.svn.wordpress.org/trunk@56748 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-29 19:45:53 +00:00
Jonny Harris
4baf0a1eda Comments: Improve WP_Comment_Query count query performance by setting 'order by' to 'none'.
In cases where `WP_Comment_Query` or `get_comments` is employed with the 'count' parameter set to true, specify 'order by' as 'none'. Since these queries serve solely to determine the count of comments matching specific query parameters, the 'order by' clause becomes redundant and places unnecessary strain on the database server, resulting in slower query execution. Given that count queries are executed on every admin request to retrieve comment counts, this change enhances the performance of the wp-admin interface.

Props guss77, davidbaumwald, SergeyBiryukov, westonruter, peterwilsoncc, foliovision, hareesh-pillai, spacedmonkey.
Fixes #58368

git-svn-id: https://develop.svn.wordpress.org/trunk@56747 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-29 17:11:21 +00:00
Adam Silverstein
1f914ecb2f Revisions: slash meta values for autosave (preview) revisions.
Correct an issue where meta values containing characters like quote `”` could not be previewed on published posts. The function `update_metadata` expects data to be slashed.

Also, add a test to confirm that storing JSON data which requires slashing in autosave meta works as expected, and improve naming for a data provider added in [56714].

Follow up to [56714].

Props mukesh27, spacedmonkey.
Fixes #20564.



git-svn-id: https://develop.svn.wordpress.org/trunk@56745 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-29 15:05:40 +00:00
Jonny Harris
345fb48865 Editor: Avoid Deferring Loading for Empty Block Script URI
In the context of register_block_script_handle, the get_block_asset_url function may return false when an empty string is provided as the input. This behavior is intended to prevent the generation of invalid URLs. However, when the script loading strategy is set to "defer" while passing false, it triggers a "doing it wrong" message.

This situation becomes problematic, especially for scenarios where the scripts haven't been built yet. In such cases, the realpath call returns an empty string because the file doesn't exist. To address this issue, we now perform a simple check to ensure that the script URI is not empty before applying the "defer" loading strategy. This adjustment prevents unnecessary deferral of loading for scripts with empty URIs.

Follow on from [56683] and [56033].

Props kebbet, mukesh27, swissspidy, westonruter, spacedmonkey.
Fixes #59475

git-svn-id: https://develop.svn.wordpress.org/trunk@56744 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-29 13:13:54 +00:00
Sergey Biryukov
0f0d34ed55 Coding Standards: Remove redundant ignore annotations, take 2.
This removes ignore annotations which are unnecessary due to the configuration in the `phpcs.xml.dist` ruleset already taking care of this.

Follow-up to [45611], [50146], [50148], [50586], [50822], [56738].

Props jrf.
See #59161.

git-svn-id: https://develop.svn.wordpress.org/trunk@56743 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-29 12:19:29 +00:00
Jonny Harris
71080fa580 Editor: Replace property_exists calls in block related functions with instanceof
Replace calls to `property_exists` with `instanceof WP_Block_Type` in block related functions. This change not only improves type safety but also enhances performance.

Follow on from [56678] and [56677].

Props gziolo, aristath, aaronrobertshaw, spacedmonkey.
Fixes #59453

git-svn-id: https://develop.svn.wordpress.org/trunk@56742 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-29 10:18:05 +00:00
Tonya Mork
f0a1369441 Code Modernization: Fix "passing null to non-nullable" deprecation from next_posts().
The `esc_url()` function expects to a string for `$url` parameter. There is no input validation within that function. The function contains a `ltrim()` which also expects a string. Passing `null` to this parameter results in `Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated` notice on PHP 8.1+.

Tracing the stack back, a `null` is being passed to it within `next_posts()` when `get_next_posts_page_link()` returns `null` (it can return a string or `null`).

On PHP 7.0 to PHP 8.x, an empty string is returned from `esc_url()` when `null` is passed to it. The change in this changeset avoids the deprecation notice by not invoking `esc_url()` when `get_next_posts_page_link()` returns `null` and instead sets the `$output` to an empty string, thus maintain the same behavior as before (minus the deprecation notice).

Adds a test to validate an empty string is returned and the absence of the deprecation (when running on PHP 8.1+).

Follow-up to [11383], [9632].

Props codersantosh, nihar007, hellofromTonya, mukesh27, oglekler, rajinsharwar.
Fixes #59154.

git-svn-id: https://develop.svn.wordpress.org/trunk@56740 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-28 21:24:35 +00:00
Greg Ziółkowski
e3a612a97c General: Set the correct script version for regenerator-runtime
Follow-up for [56710]. Brings back the version specified in the `package.json` file.

Props ockham.
See #59411.



git-svn-id: https://develop.svn.wordpress.org/trunk@56739 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-28 08:33:25 +00:00
Sergey Biryukov
ea5856efe8 Coding Standards: Remove redundant ignore annotations.
This removes ignore annotations which are ignoring an error which would not be thrown for that code.

Includes tidying up the format of the ignore annotation:
* Customary one space between the `//` and the start of the comment.
* There should be no spaces in the comma-separated sniff list.

Follow-up to [45607], [47185], [49200], [53152].

Props jrf.
See #59161.

git-svn-id: https://develop.svn.wordpress.org/trunk@56738 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-28 00:02:47 +00:00
Tonya Mork
6fa2ce424f Editor: Remove 'wp-edit-site' stylesheet enqueue from iframe.
Removes enqueuing the `'wp-edit-site'` stylesheet from the iframed assets in `_wp_get_iframed_editor_assets()`.

The global `$pagenow` is also removed as it is no longer used within the function.

References:
* [https://github.com/WordPress/gutenberg/pull/54254 Gutenberg PR 54254]

Props ellatrix, jorgefilipecosta, Mamaduka, mukesh27.

Follow-up to [56047], [53160].
Fixes #59456.

git-svn-id: https://develop.svn.wordpress.org/trunk@56736 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-27 17:38:38 +00:00
Colin Stewart
e34c8b7fbc Filesystem API: Free the archive in _unzip_file_ziparchive().
There are several early returns in `_unzip_file_ziparchive()` which don't close the archive prior to returning.

As this function is used in installation and upgrade processes which are memory-intensive, this calls `ZipArchive::close()` to free the archive prior to each early return. This excludes the first return which is a result of a failure to open the archive, which is [https://github.com/nih-at/libzip/blob/main/lib/zip_open.c#L62-L73 freed internally] when the failure occurs.

References:
- PHP.net: [https://www.php.net/manual/en/ziparchive.open.php ZipArchive::open()] and [https://www.php.net/manual/en/ziparchive.close.php ZipArchive::close()]
- libzip: [https://libzip.org/documentation/zip_open.html zip_open()] and [https://libzip.org/documentation/zip_close.html zip_close()]

Follow-up to: [13005], [13006], [13015], [13221], [14346] [25779].

Props azaozz, afragen, joemcgill, costdev.
Fixes #59467

git-svn-id: https://develop.svn.wordpress.org/trunk@56735 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-27 16:29:37 +00:00
Tonya Mork
d740727ea8 Text Changes: Remove empty space in Erase Personal Data help tab.
Improves the text by removing an empty space at the end of a string within the "Default Data" help tab of the "Erase Personal Data".

Props azharckra, kebbet, krupalpanchal, mukesh27.

Follow-up to [53182].
Fixes #59473.

git-svn-id: https://develop.svn.wordpress.org/trunk@56734 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-27 15:42:29 +00:00
Sergey Biryukov
711e4b9b97 Bootstrap/Load: Remove a redundant continue statement in add_magic_quotes().
Follow-up to [48205], [48440].

Props Cybr.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56732 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-27 09:40:43 +00:00
Isabel Brison
972632085f Editor: fix undefined array key warning.
Checks if `attrs` array key exists before using its value.

Props mukesh27, kafleg.
Fixes #59468.


git-svn-id: https://develop.svn.wordpress.org/trunk@56731 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-27 05:10:28 +00:00
Tammie Lister
7cf8998e46 Post WordPress 6.4 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@56730 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-26 20:16:38 +00:00
Tammie Lister
6b35688b82 WordPress 6.4 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@56729 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-26 19:52:42 +00:00
Tonya Mork
df17fdbd05 Editor: 2nd package updates for 6.4 Beta 1.
Round 2 of package updates for 6.4. Beta 1 which includes disabling the rendering of the Font Library in Core.

The full list of changes are found here 641b696cd6.

Follow-up to [56710], [56713].

Props mikachan, mmaattiiaass, mamaduka, desrosj, ockham, hellofromTonya.
See #59411.

git-svn-id: https://develop.svn.wordpress.org/trunk@56728 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-26 19:08:58 +00:00
Tammie Lister
1b1c6afd46 Bundled Themes: Twenty Twenty-Four is now the default theme.
Follow up to [56716].
Props desrosj.

See #59447.


git-svn-id: https://develop.svn.wordpress.org/trunk@56727 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-26 17:31:28 +00:00
Jonathan Desrosiers
0b3e704899 Twenty Twenty-Four: Fix issue with theme screenshot.
Follow up to [56716] and [56725].

Props karmatosed.
Fixes #59447.

git-svn-id: https://develop.svn.wordpress.org/trunk@56726 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-26 17:13:44 +00:00
Bernie Reiter
76c6b57867 Templates: Introduce _remove_theme_attribute_from_template_part_block.
Introduce a `_remove_theme_attribute_from_template_part_block()` function that can be used as a callback argument for `traverse_and_serialize_block(s)` on a parsed block tree in order to remove the `theme` attribute from all Template Part blocks found therein, and deprecate `_remove_theme_attribute_in_block_template_content()`.

Counterpart to `_inject_theme_attribute_in_template_part_block` from #59338 (which superseded `_inject_theme_attribute_in_block_template_content`, deprecated in #59452).

Props mukesh27.
Fixes #59460.

git-svn-id: https://develop.svn.wordpress.org/trunk@56724 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-26 16:59:11 +00:00
Sergey Biryukov
0ed8dcda72 HTTP API: Deprecate the http_api_transports filter.
The filter is only used within the `WP_Http::_get_first_available_transport()` method, which has been marked as deprecated in favor of `\WpOrg\Requests\Requests::get_transport_class()`.

Follow-up to [56655]

Props desrosj, hellofromTonya.
Fixes #58705.

git-svn-id: https://develop.svn.wordpress.org/trunk@56723 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-26 16:53:20 +00:00
Bernie Reiter
166e042683 Templates: Move old theme attr injection function to deprecated.php.
Move the now-deprecated function `_inject_theme_attribute_in_block_template_content` from `wp-includes/block-template-utils.php` to `wp-includes/deprecated.php`.

Follow-up [56719].
Props spacedmonkey, davidbaumwald, mukesh27.
See #59452.

git-svn-id: https://develop.svn.wordpress.org/trunk@56722 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-26 16:47:24 +00:00