48906 Commits

Author SHA1 Message Date
Riad Benguella
6daf853022 Script Loader: Load the modules to the footer in classic themes
Incremental import maps fail if the import map is printed after the module scripts.
This means, we should always render import maps first. This means that for classic themes, we need to move the import map and modules to the footer because we can't know before that which modules are needed.

Props luisherranz, cbravobernal.
Fixes #60240.

git-svn-id: https://develop.svn.wordpress.org/trunk@57345 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-24 10:37:54 +00:00
Pascal Birchler
28fd787c0c I18N: Improve docblocks after [57337].
Props mukesh27.
See #59656.

git-svn-id: https://develop.svn.wordpress.org/trunk@57344 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-24 07:55:53 +00:00
Dennis Snell
78ef4f749e HTML API: Support INPUT tags.
Adds support for the following HTML elements to the HTML Processor:

 - INPUT

Previously this element was not supported and the HTML Processor would bail when encountering one. Now, with this patch applied, it will proceed to parse the HTML document.

Developed in https://github.com/WordPress/wordpress-develop/pull/5907
Discussed in https://core.trac.wordpress.org/ticket/60283

Props jonsurrell
See #60283



git-svn-id: https://develop.svn.wordpress.org/trunk@57343 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-24 03:28:27 +00:00
Sergey Biryukov
86d4ac2815 Docs: Add missing full stop in WP_Comment_Query::parse_query() DocBlock.
Props hardik2221.
Fixes #60323.

git-svn-id: https://develop.svn.wordpress.org/trunk@57342 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 22:26:19 +00:00
Weston Ruter
5139923579 Script Loader: Only emit CDATA wrapper comments in wp_get_inline_script_tag() for JavaScript.
This avoids erroneously adding CDATA wrapper comments for non-JavaScript scripts, including those for JSON such as the `importmap` for script modules in #56313.

Props westonruter, flixos90, mukesh27, dmsnell.
See #56313.
Fixes #60320.


git-svn-id: https://develop.svn.wordpress.org/trunk@57341 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 17:54:25 +00:00
Riad Benguella
a21e447a14 Editor: Unset reference used in foreach statement.
In PHP it is a good practice to unset $value if it was created by reference in a foreach loop, as the reference is still valid outside the loop, and this avoids accidental bugs.

Props get_dave.
Fixes #60326.

git-svn-id: https://develop.svn.wordpress.org/trunk@57340 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 17:09:23 +00:00
Pascal Birchler
2f91b1f262 I18N: Improve edge case handling in WP_Translation_Controller.
Prevents PHP warnings for possibly undefined array keys.
Also fixes incorrect `@covers` annotations.

Follow-up to [57337].
See #59656.

git-svn-id: https://develop.svn.wordpress.org/trunk@57339 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 15:13:32 +00:00
Pascal Birchler
5a8e44ccb8 I18N: Add missing variable in string replacement.
Ensures the preferred file name for lookup has the correct extension.

Follow-up to [57337].
See #59656.

git-svn-id: https://develop.svn.wordpress.org/trunk@57338 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 14:01:59 +00:00
Pascal Birchler
e83f5a1a60 I18N: Introduce a more performant localization library.
This introduces a more lightweight library for loading `.mo` translation files which offers increased speed and lower memory usage.
It also supports loading multiple locales at the same time, which makes locale switching faster too.

For plugins interacting with the `$l10n` global variable in core, a shim is added to retain backward compatibility with the existing `pomo` library.

In addition to that, this library supports translations contained in PHP files, avoiding a binary file format and leveraging OPCache if available.
If an `.mo` translation file has a corresponding `.l10n.php` file, the latter will be loaded instead.
This behavior can be adjusted using the new `translation_file_format` and `load_translation_file` filters.

PHP translation files will be typically created by downloading language packs, but can also be generated by plugins.
See https://make.wordpress.org/core/2023/11/08/merging-performant-translations-into-core/ for more context.

Props dd32, swissspidy, flixos90, joemcgill, westonruter, akirk, SergeyBiryukov.
Fixes #59656.

git-svn-id: https://develop.svn.wordpress.org/trunk@57337 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 13:32:34 +00:00
bernhard-reiter
de0c4028c7 General: Add $schema property to block and theme JSON files.
Additionally, this changeset fixes some of the `block.json` and `theme.json` files in PHPUnit tests by adding missing `title` properties to satisfy the schema. Those changes have no impact on the runtime whatsoever and do not change the result of unit tests.

Note that some block and theme JSON files still aren't valid according to the schema. Fixing is underway; the required changes will be merged subsequently.

Props jonsurrell, dmsnell, gziolo.
Fixes #60255.

git-svn-id: https://develop.svn.wordpress.org/trunk@57336 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 13:05:08 +00:00
Riad Benguella
3bf2b25343 Editor: Fix back to items label capitalization for the pattern categories.
This uses the same capitalization used in Tags or Link Categories taxonomies.

Props mukesh27.
See #60322.

git-svn-id: https://develop.svn.wordpress.org/trunk@57335 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 10:08:49 +00:00
Riad Benguella
1381ad98cd Editor: Define the labels of the pattern category taxonomy.
In WordPress 6.5, the taxonomy is going to be rendered using a standard UI
in the editor, this means that all the labels need to be defined properly.

Props ntsekouras.
Fixes #60322.

git-svn-id: https://develop.svn.wordpress.org/trunk@57334 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 09:14:37 +00:00
Riad Benguella
e42e65def6 Editor: Update the ThemeJson unit test to cover custom CSS feature.
In #59499 a fix have been shipped to theme.json custom CSS
when applied to blocks with multiple CSS selectors.
This commit covers that fix with a unit test.

Props wildworks.
Fixes #60294.

git-svn-id: https://develop.svn.wordpress.org/trunk@57333 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 09:04:51 +00:00
Riad Benguella
d0262ec696 Editor: Ensure PHPUnit10 compatibility for ThemeJson unit test.
Expecting E_STRICT, E_NOTICE, and E_USER_NOTICE errors is deprecated in PHPUnit 10.
This updates the test to rely on an exception instead.

Props antonvlasenko.
Fixes #60305.

git-svn-id: https://develop.svn.wordpress.org/trunk@57332 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 08:57:48 +00:00
Riad Benguella
2e3b292924 Editor: Set show_tagcloud to false for Pattern Categories.
Pattern Categories is a taxonomy used to categories the patterns in the site editor.
It is not meant to be shown in the frontend and show tag clouds.

Props wildworks, mukesh27.
Fixes #60119.

git-svn-id: https://develop.svn.wordpress.org/trunk@57331 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 08:28:49 +00:00
Riad Benguella
d3ac623e2a Build Tools: Configure prettier properly.
Allows tools like prettier or VSCode to auto-format JS files propertly.
It pulls the prettier config that is used in the Gutenberg repository.

Props gziolo.
Fixes #60316.

git-svn-id: https://develop.svn.wordpress.org/trunk@57330 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 07:59:22 +00:00
Isabel Brison
ba4271374d Editor: fix fluid font division by zero error when min and max viewport widths are equal.
Fixes a division error by returning null when `minViewportWidth` - `maxViewportWidth` is zero in `wp_get_computed_fluid_typography_value`.

Props ramonopoly, mukesh27, andrewserong, audrasjb.
Fixes #60263.


git-svn-id: https://develop.svn.wordpress.org/trunk@57329 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 05:55:49 +00:00
Isabel Brison
c9f04d4053 Editor: fix classname output on blocks without layout.
Prevents layout classnames from being output on blocks with no layout support and no child layout classnames by returning early from `wp_render_layout_support_flag`.

Props andrewserong.
Fixes #60292.


git-svn-id: https://develop.svn.wordpress.org/trunk@57328 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 05:36:40 +00:00
Dennis Snell
3c4fbc353f Script Modules API: Rename wp_module to wp_script_module
Renames all mentions to "module" with "script module", including function names, comments, and tests.

Follow up to [57269]

The list of functions renamed are:

 - `wp_module()`          -> `wp_script_module()`.
 - `wp_register_module()` -> `wp_register_script_module()`.
 - `wp_enqueue_module()`  -> `wp_enqueue_script_module()`.
 - `wp_dequeue_module()`  -> `wp_dequeue_script_module()`.
 - `WP_Script_Modules::print_enqueued_modules()` -> `WP_Script_Modules::print_enqueued_script_modules()`.
 - `WP_Script_Modules::print_module_preloads()`  -> `WP_Script_Modules::print_script_module_preloads()`.

It also adds PHP 7 typing to all the functions and improves the types of the `$deps` argument of `wp_register_script_module()` and `wp_enqueue_script_module()` using `@type`.

Props luisherranz, idad5, costdev, nefff, joemcgill, jorbin, swisspidy, jonsurrel, flixos90, gziolo, westonruter, bernhard-reiter, kamranzafar4343
See #56313



git-svn-id: https://develop.svn.wordpress.org/trunk@57327 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 03:32:03 +00:00
Dennis Snell
6653002c21 HTML API: Support PARAM, SOURCE, and TRACK tags.
Adds support for the following HTML elements to the HTML Processor:

 - PARAM, SOURCE, TRACK

Previously these elements were not supported and the HTML Processor would bail when encountering them. Now, with this patch applied, it will proceed to parse an HTML document when encountering those tags.

Props jonsurrell, dmsnell
Fixes #60283



git-svn-id: https://develop.svn.wordpress.org/trunk@57326 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-23 01:49:06 +00:00
Sergey Biryukov
a1cf525cd6 Docs: Correct the WP_User Query location reference in query cache tests.
Follow-up to [1047/tests], [33749], [55657].

See #59651.

git-svn-id: https://develop.svn.wordpress.org/trunk@57325 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-22 19:40:18 +00:00
Pascal Birchler
b4eeefe786 Twenty Twenty-Four: Update license information in readme.
Adds missing license information for bundled fonts.

Props acosmin, shailu25, poena, sabernhardt.
Fixes #59838

git-svn-id: https://develop.svn.wordpress.org/trunk@57324 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-22 12:22:22 +00:00
Pascal Birchler
d8785e3c20 Bundled Theme: Fix a couple of incorrect theme name references.
Corrects the theme name used in docblocks in two places in Twenty Nineteen and Twenty Seventeen.

Props shailu25, mukesh27.
Fixes #60310.


git-svn-id: https://develop.svn.wordpress.org/trunk@57323 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-22 12:18:54 +00:00
Pascal Birchler
5cd843e235 Build/Test Tools: Expand "imagemin" Grunt task to cover default themes.
Runs `npm run grunt precommit:image` to minify/compress images in the repository.

Props desrosj.
Fixes #58996.

git-svn-id: https://develop.svn.wordpress.org/trunk@57322 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-22 11:41:33 +00:00
Sergey Biryukov
4a2eb5c23d Plugins: Correct table layout on smaller screens.
This ensures that the message about deleting a plugin or having no plugins installed is displayed in full width.

Follow-up to [26134], [33016].

Props shailu25, mukesh27, passoniate, JavierCasares, sabernhardt.
Fixes #50069.

git-svn-id: https://develop.svn.wordpress.org/trunk@57321 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-21 18:52:45 +00:00
Sergey Biryukov
74abf14b3d Docs: Correct the placement of @global tags in wp-settings.php.
Props shailu25, mukesh27.
Fixes #60146.

git-svn-id: https://develop.svn.wordpress.org/trunk@57320 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-20 16:06:31 +00:00
Dennis Snell
edcc85c31c HTML API: Cleanup tests and list of void elements.
This patch adds newly supported elements to tests that should have been updated
in recent PRs, but which were merged without that. Those PRs removed failing
tests showing that the elements were unsupported, but did not add the elements
to the list of supported ones.

It also removes some elements from the special-exclusion list of unsupported IN
BODY elements. These did not present in failing tests because earlier
conditions in the switch structure caught the tags before hitting the default
block.

Finally it adds some missing elements to the list of void elements. These
elements are not listed as void in the HTML specification because they are
deprecated. However, they are treated as void for the sake of HTML
serialization and the parsing rules indicate that they behave as void elements,
so it's safe to list them within the HTML API as void.

Developed in WordPress/wordpress-develop#5913

Fixes #60307



git-svn-id: https://develop.svn.wordpress.org/trunk@57319 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-20 00:13:19 +00:00
Peter Wilson
3d154d7a0f Media: Revert [57310].
This commit reintroduced a minor data exposure issue.

Props swissspidy.
See #59866, #57913.



git-svn-id: https://develop.svn.wordpress.org/trunk@57318 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-19 23:58:08 +00:00
Dennis Snell
85de4aa70d HTML API: Add support for PRE and LISTING elements.
Adds support for the following HTML elements to the HTML Processor:

 - PRE, LISTING

Previously, these elements were not supported and the HTML Processor would bail when encountering them. Now, with this patch applied, it will proceed to parse an HTML document when encountering those tags.

Developed in WordPress/wordpress-develop#5903

Props jonsurrell, dmsnell
Fixes #60283



git-svn-id: https://develop.svn.wordpress.org/trunk@57317 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-19 22:05:37 +00:00
Dennis Snell
91e51f92a8 HTML API: Add support for BR, EMBED, & other tags.
Adds support for the following HTML elements to the HTML Processor:

 - AREA, BR, EMBED, KEYGEN, WBR
 - Only the opening BR tag is supported, as the invalid closer `</br>`
   involves more complicated rules, to be implemented later.

Previously, these elements were not supported and the HTML Processor
would bail when encountering them. With this patch it will proceed to
parse an HTML document when encountering those tags as long as other
normal conditions don't cause it to bail (such as complicated format
reconstruction rules).

Props jonsurrell, dmsnell
Fixes #60283



git-svn-id: https://develop.svn.wordpress.org/trunk@57316 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-19 21:40:01 +00:00
Joe McGill
5815624ead Editor: Support deferred block variation initialization on the server.
When registering blocks on the server using `register_block_type()` or similar functions, a set of block type variations can also be registered. However, in some cases building this variation data during block registration can be an expensive process, which is not needed in most contexts. 

To address this problem, this adds support to the `WP_Block_Type` object for a new property, `variation_callback`, which can be used to register a callback for building variation data only when the block variations data is needed. The `WP_Block_Type::variations` property has been changed to a private property that is now accessed through the magic `__get()` method. The magic getter makes use of a new public method, `WP_Block_Type::get_variations` which will build variations from a registered callback if variations have not already been built.

Props spacedmonkey, thekt12, Mamaduka, gaambo, gziolo, mukesh27, joemcgill.
Fixes #59969.


git-svn-id: https://develop.svn.wordpress.org/trunk@57315 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-19 20:52:06 +00:00
Dennis Snell
ecbd1376a6 HTML API: Add support for HR element.
Adds support for the following HTML elements to the HTML Processor:

 - HR

Previously, this element was not supported and the HTML Processor would bail when encountering
it. Now, with this patch, it will proceed to parse an HTML document when encountering one.

Developed in WordPress/wordpress-develop#5897

Props jonsurrell, dmsnell
Fixes #60283



git-svn-id: https://develop.svn.wordpress.org/trunk@57314 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-19 19:01:29 +00:00
Sergey Biryukov
27ac620c7a Twenty Twenty: Add missing comma in twentytwenty_classic_editor_styles().
This resolves a WPCS error:
{{{
There should be a comma after the last array item in a multi-line array.
}}}

Follow-up to [57311].

See #48630.

git-svn-id: https://develop.svn.wordpress.org/trunk@57313 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-19 18:24:36 +00:00
Felix Arntz
d17afcc9dd Bootstrap/Load: Introduce functions to check whether WordPress is serving a REST API request.
This changeset introduces two functions:
* `wp_is_serving_rest_request()` returns a boolean for whether WordPress is serving an actual REST API request.
* `wp_is_rest_endpoint()` returns a boolean for whether a WordPress REST API endpoint is currently being used. While this is always the case if `wp_is_serving_rest_request()` returns `true`, the function additionally covers the scenario of internal REST API requests, i.e. where WordPress calls a REST API endpoint within the same request.

Both functions should only be used after the `parse_request` action.

All relevant manual checks have been adjusted to use one of the new functions, depending on the use-case. They were all using the same constant check so far, while in fact some of them were intending to check for an actual REST API request while others were intending to check for REST endpoint usage.

A new filter `wp_is_rest_endpoint` can be used to alter the return value of the `wp_is_rest_endpoint()` function.

Props lots.0.logs, TimothyBlynJacobs, flixos90, joehoyle, peterwilsoncc, swissspidy, SergeyBiryukov, pento, mikejolley, iandunn, hellofromTonya, Cybr, petitphp.
Fixes #42061.


git-svn-id: https://develop.svn.wordpress.org/trunk@57312 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-19 17:37:05 +00:00
Sergey Biryukov
3287684830 Twenty Twenty: Move the Inter font declaration to a separate file and enqueue the file.
This allows the font to be dequeued by a child theme or plugin.

Props poena, markhowellsmead, nielslange, Otto42, SGr33n, mukesh27, joemcgill.
Fixes #48630.

git-svn-id: https://develop.svn.wordpress.org/trunk@57311 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-19 17:36:18 +00:00
Peter Wilson
c5fff20a8f Media: Redirect inactive attachement pages for logged-out users.
Ensure logged out users are redirected to the media file when attachment pages are inactive. This removes the `read_post` capability check from the canonical redirects as anonymous users lack the permission.

Follow-up to [56657], [56658], [56711].

Props afercia, aristath, chesio, joppuyo, jorbin, lakshmananphp, poena, sergeybiryukov.
Fixes #59866.
See #57913.



git-svn-id: https://develop.svn.wordpress.org/trunk@57310 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-19 00:42:48 +00:00
Sergey Biryukov
0c7b78e99d Docs: Fix several typos in inline comments.
Follow-up to [7747], [27419], [55155].

Props shailu25, sabernhardt.
Fixes #60285.

git-svn-id: https://develop.svn.wordpress.org/trunk@57309 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-18 22:12:01 +00:00
Felix Arntz
d4a77a394c Build/Test Tools: Fix unstable query tests.
Three `WP_Query` tests could randomly fail due to an undefined order because two test posts were using the exact same `post_date`.

Props boonebgorges, flixos90.
Fixes #60288.


git-svn-id: https://develop.svn.wordpress.org/trunk@57308 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-18 18:38:23 +00:00
Aaron Jorbin
e707e37f23 Embeds: Ensure the deprecated function print_emoji_styles isn't used
Ensure that the proper new function wp_enqueue_emoji_styles is used in embeds.

Follow-up to: [56194].

Props peterwilsoncc, bobbingwide, hellofromTonya.
Fixes #59892. See: #58775.



git-svn-id: https://develop.svn.wordpress.org/trunk@57306 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-17 21:34:24 +00:00
Pascal Birchler
0b7165e60d I18N: Fix duplicate determine_locale() tests added in [57286].
Props johnbillion.
See #58696.

git-svn-id: https://develop.svn.wordpress.org/trunk@57305 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-17 18:54:36 +00:00
Sergey Biryukov
a64c96fe9f Twenty Twenty-Four: Remove extra tab character inside the text domain.
Follow-up to [57281].

Props sabernhardt.
Fixes #60245.

git-svn-id: https://develop.svn.wordpress.org/trunk@57304 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-17 17:58:09 +00:00
Pascal Birchler
c399654df6 I18N: Prevent PHP warning in WP_Textdomain_Registry.
Prevents a warning upon cache invalidation after language pack updates if the arguments don’t have the expected format.

Follow-up to [57287], [57290], [57298], [57299].

See #58919.

git-svn-id: https://develop.svn.wordpress.org/trunk@57303 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-17 14:30:47 +00:00
Jb Audras
935f4d1836 Docs: Fix var types of parameters in sanitize_option() and sanitize_option_{$option}.
The related docblocks were previously defining `$value` and `$original_value` as if they were of type `string`, but they can also be of other types, like `array`.

Props gerardreches, crstauf, mukesh27.
Fixes #60214.
See #59651.





git-svn-id: https://develop.svn.wordpress.org/trunk@57302 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-17 09:07:15 +00:00
Jb Audras
bb1c19f3b7 Twenty Twenty: Replace wp_date() with date_i18n().
Since WordPress 5.3 it is recommended to use `wp_date()` instead of `date_i18n()`. This changeset replaces the function in Twenty Twenty, with a fallback to `date_i18n()` for old versions of WordPress.

For more info, see https://make.wordpress.org/core/2019/09/23/date-time-improvements-wp-5-3/.

Props sachyya-sachet, joyously, sabernhardt, poena.
Fixes #48589.





git-svn-id: https://develop.svn.wordpress.org/trunk@57301 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-17 08:59:42 +00:00
Jb Audras
a4500a1807 Bundled Themes: Typo corrections in various themes docblocks.
Props shailu25.
Fixes #60268.
See #59651.





git-svn-id: https://develop.svn.wordpress.org/trunk@57300 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-17 08:52:00 +00:00
Sergey Biryukov
bfcf2936db I18N: Correctly invalidate language file paths in WP_Textdomain_Registry.
Since the cache key in `::get_language_files_from_path()` is based on a path that always includes a trailing slash, the path in `::invalidate_mo_files_cache()` should include the trailing slash as well.

Includes adjusting the test expectations accordingly.

Follow-up to [57287], [57290], [57298].

See #58919.

git-svn-id: https://develop.svn.wordpress.org/trunk@57299 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-16 21:43:11 +00:00
Sergey Biryukov
9d7bc5111f Tests: Remove leftover trailingslashit() calls in WP_Textdomain_Registry tests.
Follow-up to [57287], [57290].

See #58919.

git-svn-id: https://develop.svn.wordpress.org/trunk@57298 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-16 21:32:21 +00:00
Jonathan Desrosiers
68fd1e3b04 Bundled Themes: Version bump themes affected by #60241.
In order to release the fix for #60241, this bumps the version of the following themes:
- Twenty Seventeen: 3.5
- Twenty Twenty: 2.5
- Twenty Twenty-One: 2.2

Props sabernhardt, jorbin.
See #60267.

git-svn-id: https://develop.svn.wordpress.org/trunk@57296 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-16 19:23:42 +00:00
Joe Dolson
35add7378e Administration: Remove empty form action attributes.
Remove the `action` attribute in the login language selector, privacy forms, and classic widget forms.

An empty `action` attribute is invalid HTML4 and unsupported HTML5. The `action` attribute is optional, but must have a valid URL when provided.

Props Malae, audrasjb, bartkleinreesink, nicolefurlan, shubhamsedani, costdev, peterwilsoncc, rajinsharwar, joedolson.
Fixes #58226.

git-svn-id: https://develop.svn.wordpress.org/trunk@57295 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-16 17:29:58 +00:00
Felix Arntz
dd691394f2 Media: Consider inline image CSS width to backfill width and height attributes.
Prior to this changeset, WordPress core would use the original image size, which in the particular case of inline images would be severely off, as they are usually very small. This could lead to incorrect application of `fetchpriority="high"` and other performance optimizations.

Props westonruter, flixos90, joemcgill, mukesh27.
Fixes #59352.


git-svn-id: https://develop.svn.wordpress.org/trunk@57294 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-16 17:01:30 +00:00