Commit Graph

37589 Commits

Author SHA1 Message Date
Sergey Biryukov a319916e26 External Libraries: Upgrade PHPMailer to version 6.9.3.
This is a maintenance release, adding support for the release version of PHP 8.4, and experimental support for PHP 8.5.

References:
* [https://github.com/PHPMailer/PHPMailer/releases/tag/v6.9.3 PHPMailer 6.9.3 release notes]
* [https://github.com/PHPMailer/PHPMailer/compare/v6.9.2...v6.9.3 Full list of changes in PHPMailer 6.9.3]

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500], [53535], [53917], [54427], [54937], [55557], [56484], [57137], [59246].

Props desrosj, yogeshbhutkar, ayeshrajans.
Fixes #62632.
Built from https://develop.svn.wordpress.org/trunk@59481


git-svn-id: http://core.svn.wordpress.org/trunk@58867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-03 15:22:18 +00:00
Sergey Biryukov ab2697f8bf Customize: Begin HTML markup before Customizer script hooks.
This prevents printing styles and scripts before the `<!DOCTYPE>`.

The `_wp_admin_html_begin()` function should precede Customizer script hooks, in case a plugin prints markup inside a hook such as `admin_enqueue_scripts`.

Follow-up to [19995], [27907].

Props sabernhardt.
Fixes #62629.
Built from https://develop.svn.wordpress.org/trunk@59480


git-svn-id: http://core.svn.wordpress.org/trunk@58866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-02 23:36:18 +00:00
Pascal Birchler 789d1d9c2e Plugins: Make more plugin-related functions available early on.
This is a follow-up to [59461], which moved `get_plugin_data()` from `wp-admin/includes/plugin.php` to `wp-includes/functions.php` so it's available during the plugin loading process.

Related functions like `is_plugin_active()` are often used together and should therefore be moved as well, to improve backward compatibility for plugins which load `wp-admin/includes/plugin.php` only conditionally.

Props johnbillion, dd32, swissspidy.
See #62244.
Built from https://develop.svn.wordpress.org/trunk@59479


git-svn-id: http://core.svn.wordpress.org/trunk@58865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-02 17:10:15 +00:00
Pascal Birchler 8f08a8e2e1 I18N: Load admin translations for auto update emails.
As a follow-up to [59460], make sure that admin strings are loaded when switching locales for auto update notification emails, as those strings are in a separate translation file.

Props benniledl, swissspidy.
Fixes #62496.
Built from https://develop.svn.wordpress.org/trunk@59478


git-svn-id: http://core.svn.wordpress.org/trunk@58864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-02 17:08:20 +00:00
gziolo 369a675488 Interactivity API: Support length property on strings and arrays on the server
The Interactivity API tries to align client and server rendering so that the behavior is the same. Adds missing handling for `.length` to directives processing on the server on strings and numeric arrays which is inherently supported through JavaScript language on the client.

Props jonsurrell, gziolo, luisherranz.
Fixes #62582.


Built from https://develop.svn.wordpress.org/trunk@59477


git-svn-id: http://core.svn.wordpress.org/trunk@58863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-02 08:10:17 +00:00
poena 8f8ffaab84 Twenty Thirteen & Twenty Sixteen: Correct the border of the latest comments block in the editor.
This change hides the top border of the first comment in the latest comments block, so that the design
in the editor and the front looks the same.

Props viralsampat, sabernhardt, aishwarryapande, parthvataliya, imranhasanraaz.
Fixes #62282.
Built from https://develop.svn.wordpress.org/trunk@59476


git-svn-id: http://core.svn.wordpress.org/trunk@58862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-02 05:44:19 +00:00
Sergey Biryukov e6f29b4c0e Date/Time: Add `d.m.Y` to date format presets on General Settings screen.
This gives users another option when selecting how dates are displayed on their site. This change is relevant for better localization, providing more date format choices for users in regions where this format is common.

The `array_unique()` call ensures that if this format was already added by a plugin or theme, it won't be duplicated.

Follow-up to [9131], [22299], [28820], [28848].

Props Daedalon, pbearne, fierevere, im3dabasia1, SergeyBiryukov.
Fixes #55685.
Built from https://develop.svn.wordpress.org/trunk@59475


git-svn-id: http://core.svn.wordpress.org/trunk@58861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-01 18:39:20 +00:00
Sergey Biryukov 0749661c97 Docs: Correct DocBlock formatting for `WP_Theme_JSON::FONT_FAMILY_SCHEMA`.
Follow-up to [57496].

Props marian1.
Fixes #62621.
Built from https://develop.svn.wordpress.org/trunk@59474


git-svn-id: http://core.svn.wordpress.org/trunk@58860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-30 13:53:20 +00:00
Adam Silverstein c08c2e28cc Media: improve filter to enable setting output quality by image size.
Add a new $size parameter to the  wp_editor_set_quality filter. $size is an array with 'width' and 'height' keys. Developers can use this information to set image quality based on the image size.

Props adamsilverstein, joemcgill, Mte90, codekraft, birgire, azaozz, sppramodh.
Fixes #54648.



Built from https://develop.svn.wordpress.org/trunk@59473


git-svn-id: http://core.svn.wordpress.org/trunk@58859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-29 23:48:15 +00:00
Sergey Biryukov 47bb776fd7 Editor: Add description for Banners block pattern category.
Follow-up to [55098].

Props parinpanjari, youknowriad, Joen, dhruvang21, apermo, mukesh27.
Fixes #62115.
Built from https://develop.svn.wordpress.org/trunk@59472


git-svn-id: http://core.svn.wordpress.org/trunk@58858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-29 22:46:21 +00:00
Sergey Biryukov dd967e2a2e Coding Standards: Cast `gmdate( 'w' )` to `int` before using as integer.
This addresses several instances of `gmdate( 'w' )` being used directly as an integer, when it's actually a numeric string. The issue is remediated by casting the value to `int` before use.

Affected functions:
* `get_calendar()`
* `get_weekstartend()`

Follow-up to [508], [1632].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59471


git-svn-id: http://core.svn.wordpress.org/trunk@58857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-28 22:52:17 +00:00
Tammie Lister 1806172d05 Twenty-Twenty: Fixes space between post content on front.
The post author and post date did not have space between them and the post content. This brings in 1em of top margin. Of note is that this only is if the first element is a paragraph that the issue was caused.  
  
Props abcd95, sabernhardt, desrosj, sainathpoojary, viralsampat.  
Fixes #62243.

Built from https://develop.svn.wordpress.org/trunk@59470


git-svn-id: http://core.svn.wordpress.org/trunk@58856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-28 18:41:16 +00:00
Bernhard Reiter fd9519e7b2 HTML API: Make non-body fragment creation methods private.
The current implementation of `create_fragment` (and the underlying `create_fragment_at_current_node`) allows passing in a context that might result in a tree that cannot be represented by HTML. For example, a user might use `<p>` as context, and attempt to create a fragment that also consists of a paragraph element, `<p>like this`. This would result in a paragraph node nested inside another -- something that can never result from parsing HTML.

To prevent this, this changeset makes `create_fragment_at_current_node` private and limits `create_fragment` to only `<body>` as context, while a comprehensive solution to allow other contexts is being worked on.

Follow-up to [59444], [59467].
Props jonsurrell, dmsnell, bernhard-reiter.
Fixes #62584.
Built from https://develop.svn.wordpress.org/trunk@59469


git-svn-id: http://core.svn.wordpress.org/trunk@58855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-28 14:27:18 +00:00
Bernhard Reiter e174cbef2e HTML API: Allow more contexts in `create_fragment`.
This changeset modifies `WP_HTML_Processor::create_fragment( $html, $context )` to use a full processor and `create_fragment_at_node` instead of the other way around. This makes more sense and makes the main factory methods more clear, where the state required for fragments is set up in `create_fragment_at_node` instead of in both `create_fragment` and `create_fragment_at_current_node`.

This allows for more HTML contexts to be provided to the basic `create_fragment` where the provided context HTML is appended to `<!DOCTYPE html>`, a full processor is created, the last tag opener is found, and a fragment parser is created at that node via `create_fragment_at_current_node`.

The HTML5lib tests are updated accordingly to use this new method to create fragments.

Props jonsurrell, dmsnell, bernhard-reiter.
Fixes #62584.
Built from https://develop.svn.wordpress.org/trunk@59467


git-svn-id: http://core.svn.wordpress.org/trunk@58853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-27 14:35:16 +00:00
Pascal Birchler 42bd4e9761 I18N: Do not reuse `$theme` variable name after loading a theme's `functions.php` file.
The file could declare its own `$theme` variable, which would override the one used in the `foreach` loop.

To prevent this, call `wp_get_theme()` before loading the file and store the instance in a different variable.

Props neo2k23, swissspidy.
See #62244.
Built from https://develop.svn.wordpress.org/trunk@59466


git-svn-id: http://core.svn.wordpress.org/trunk@58852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-27 14:30:20 +00:00
Sergey Biryukov 001cc12b71 Coding Standards: Cast `gmdate( 'Z' )` to an integer before addition.
This addresses two instances of the (numeric string) `gmdate( 'Z' )` being added to an `int` value.

Affected functions:
* `upgrade_110()`
* `WP_Date_Query::validate_date_values()`

Follow-up to [942], [29925], [45424].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59465


git-svn-id: http://core.svn.wordpress.org/trunk@58851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-27 11:40:18 +00:00
cbravobernal ee60151913 HTML API: Recognize all uppercase tag names in tag processor.
Fixes a missing "D" in the character list used by strspn to find tag openers, causing tags starting with D to be skipped by the tag processor in some circumstances.

Follow-up to [58613].

Props jonsurrell, santosguillamot, wongjn, cbravobernal.
Fixes #62522.

Built from https://develop.svn.wordpress.org/trunk@59464


git-svn-id: http://core.svn.wordpress.org/trunk@58850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-27 09:57:15 +00:00
gziolo c9d9ddb4d8 HTML API: Remove unused processor state context_node property
The HTML Processor State `context_node` is redundant and can be deprecated. The property has been superseded by `WP_HTML_Processor->context_node` since [58304].

Props jonsurrell, gziolo.
Fixes #62518.



Built from https://develop.svn.wordpress.org/trunk@59463


git-svn-id: http://core.svn.wordpress.org/trunk@58849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-27 09:54:17 +00:00
Sergey Biryukov 869f9b1df5 Coding Standards: Cast `wp_count_terms()` result to `int` before using in `ceil()`.
This addresses two instances of the (numeric string) return value from `wp_count_terms()` being used directly in `ceil()`, which expects an `int|float`.

Affected methods:
* `WP_Sitemaps_Taxonomies::get_max_num_pages()`
* `wp_nav_menu_item_taxonomy_meta_box()`

Reference: [https://www.php.net/manual/en/function.ceil.php PHP Manual: ceil()].

Follow-up to [14248], [14291], [14569], [14943], [48072], [57648].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59462


git-svn-id: http://core.svn.wordpress.org/trunk@58848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-26 21:17:25 +00:00
Pascal Birchler 117b935b89 I18N: Load translations just-in-time for custom themes and plugins.
In #34114, just-in-time (JIT) translation loading was implemented for projects hosted on WordPress.org. This is now expanded to all other plugins/themes.

Projects with a custom `Text Domain` and `Domain Path` header no longer need to call `load_plugin_textdomain()` or `load_theme_textdomain()`.

This reduces the risk of calling them too late, after some translation calls already happened, and generally makes it easier to properly internationalize a plugin or theme.

This moves the `get_plugin_data()` from `wp-admin/includes/plugin.php` to `wp-includes/functions.php` so it's available during the plugin loading process.

Props swissspidy.
Fixes #62244.
Built from https://develop.svn.wordpress.org/trunk@59461


git-svn-id: http://core.svn.wordpress.org/trunk@58847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-26 10:16:17 +00:00
Pascal Birchler 6e38205391 I18N: Switch locale to admin locale when sending auto update emails.
If sending an auto update email to the site administrator's email address, look up if a user with the same email exists and switch to that user's locale. If not, explicitly switches to the site locale.

This is a follow-up to [59128] where this was previously added for other types of emails.

Props benniledl, swissspidy.
Fixes #62496.
Built from https://develop.svn.wordpress.org/trunk@59460


git-svn-id: http://core.svn.wordpress.org/trunk@58846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-26 10:03:17 +00:00
Sergey Biryukov 6f6ddfc80f Coding Standards: Cast `$expired` to an integer in `wp_validate_auth_cookie()`.
This resolves an issue where the string `$expired` value is used both in a comparison and addition with integer values.

Follow-up to [6387], [28424], [45590].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59459


git-svn-id: http://core.svn.wordpress.org/trunk@58845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-25 19:03:18 +00:00
Bernhard Reiter f03be09041 REST API: Terms: Respect taxonomy's default query args.
It is possible to supply a set of default query `args` to `register_taxonomy()` which will be used when querying a list of terms -- for example, `orderby` in order to specify how the resulting list of terms should be sorted.

The Terms REST API controller previously respected these default query args only if the request included a post ID. This changeset makes it so that the default args will also be respected if no post ID is provided.

Props bernhard-reiter, jsnajdr.
Fixes #62500.
Built from https://develop.svn.wordpress.org/trunk@59458


git-svn-id: http://core.svn.wordpress.org/trunk@58844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-25 11:16:22 +00:00
Pascal Birchler 8f303471a4 REST API: Remove trailing slashes when preloading requests and there is a query string.
Follow-up to [51648], see #51636.

Props antonvlasenko, swissspidy, spacedmonkey.
Fixes #57048.
Built from https://develop.svn.wordpress.org/trunk@59457


git-svn-id: http://core.svn.wordpress.org/trunk@58843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-25 10:10:17 +00:00
Sergey Biryukov c67b970348 Coding Standards: Remove extra `unset()` in `rest_handle_options_request()`.
`$args` is defined in the immediately preceding code block, and only contains non-integer keys, so there is never an `$args[0]` to unset.

Follow-up to [44933].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59456


git-svn-id: http://core.svn.wordpress.org/trunk@58842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-24 18:37:20 +00:00
Sergey Biryukov 6bf8fa1514 Coding Standards: Replace usage of deprecated `wp_get_duotone_filter_svg()`.
This updates `WP_Theme_JSON::get_svg_filters()` to use `WP_Duotone::get_filter_svg_from_preset()` instead of the `wp_get_duotone_filter_svg()` function, deprecated in WordPress 6.3.

Follow-up to [52757], [56101].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59455


git-svn-id: http://core.svn.wordpress.org/trunk@58841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-23 22:58:21 +00:00
Andrew Ozz 683505a121 Editor: Fix selecting/deselecting multiple unwanted categories when clicking on a Category checkbox on the old Edit Post screen.
Props ffffelix, desrosj, ironprogrammer, neotrope, narenin, zaoyao, im3dabasia1, cbravobernal, azaozz.
Fixes #62504.
Built from https://develop.svn.wordpress.org/trunk@59454


git-svn-id: http://core.svn.wordpress.org/trunk@58840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-22 20:10:24 +00:00
Sergey Biryukov 7a78121aa0 Coding Standards: Explicitly return `null` instead of coercing `void`.
This addresses two instances where a function that is documented as returning `{someType}|null` doesn't explicitly return `null`.

Affected functions:
* `array_key_first()`
* `WP_REST_Posts_Controller::handle_terms()`

Follow-up to [38832], [52038].

Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59453


git-svn-id: http://core.svn.wordpress.org/trunk@58839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-22 19:19:20 +00:00
desrosj e80371660d Build/Test Tools: Create reusable workflow for parsing `.version-support-*.json` files.
This extracts the logic responsible for parsing the `.version-support-*.json` files and returning a list of supported PHP and MySQL versions for a given branch of WordPress into a reusable workflow so that other workflows can make use of the functionality without repeating code.

See #62221.
Built from https://develop.svn.wordpress.org/trunk@59452


git-svn-id: http://core.svn.wordpress.org/trunk@58838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-22 17:00:21 +00:00
desrosj b29834538e Bundled Theme: Pin schema version to rest of Twenty Twenty-Five.
All JSON files in the theme should be pinned to the appropriate schema version, not just `theme.json`.

Follow up to [59448].

Props im3dabasia1, poena.
Fixes #62455.
Built from https://develop.svn.wordpress.org/trunk@59451


git-svn-id: http://core.svn.wordpress.org/trunk@58837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-22 13:50:18 +00:00
cbravobernal 261373653c HTML API: Prevent fragment creation on close tag.
Prevent fragments from being created at tag closers.

Follow-up to [59444].

Props jonsurrell, bernhard-reiter.
Fixes #62357.

Built from https://develop.svn.wordpress.org/trunk@59450


git-svn-id: http://core.svn.wordpress.org/trunk@58836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-22 12:52:19 +00:00
mikachan e0d58b3987 Editor: Warn about empty templates on the frontend for logged in users.
Adds a new function, `wp_render_empty_block_template_warning`, that renders a warning for logged-in users when a block template is empty.

Reviewed by get_dave, richtabor.
Props vcanales, mikachan, peterwilsoncc, richtabor, get_dave, mrfoxtalbot, matveb, arielmaidana, seifradwane, annezazu.
Fixes #62053.
Built from https://develop.svn.wordpress.org/trunk@59449


git-svn-id: http://core.svn.wordpress.org/trunk@58835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-22 10:57:19 +00:00
desrosj 04111ef54f Bundled Theme: Pin a `theme.json` schema version to Twenty Twenty-Five.
Each theme’s `theme.json` schema version should be pinned to the version that was valid at the time it was released.

Props im3dabasia1, poena, mukesh27.
Fixes #62455.
Built from https://develop.svn.wordpress.org/trunk@59448


git-svn-id: http://core.svn.wordpress.org/trunk@58834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-21 19:02:23 +00:00
Bernhard Reiter ff3fde39ee HTML API: Add method to create fragment at node.
HTML Fragment parsing always happens with a context node, which may impact how a fragment of HTML is parsed. HTML Fragment Processors can be instantiated with a `BODY` context node via `WP_HTML_Processor::create_fragment( $html )`.

This changeset adds a static method called `create_fragment_at_current_node( string $html_fragment )`. It can only be called when the processor is paused at a `#tag`, with some additional constraints:

- The opening and closing tags must appear in the HTML input (no virtual tokens).
- No "self-contained" elements are allowed ( `IFRAME`, `SCRIPT`, `TITLE`, etc.).

If successful, the method will return a `WP_HTML_Processor` instance whose context is inherited from the node that the method was called from.

Props jonsurrell, bernhard-reiter, gziolo.
Fixes #62357.
Built from https://develop.svn.wordpress.org/trunk@59444


git-svn-id: http://core.svn.wordpress.org/trunk@58830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-21 13:29:18 +00:00
John Blackbourn 8f1dc00b4d Build/Test Tools: Improve the error message shown when fetching Twemoji fails.
This allows the full error message to be shown from the connection attempt instead of a generic error message.

Fixes #62382

Built from https://develop.svn.wordpress.org/trunk@59443


git-svn-id: http://core.svn.wordpress.org/trunk@58829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-21 13:18:19 +00:00
Joe McGill 134e355f13 Editor: Avoid unnecessary array_merge in WP_Style_Engine::parse_block_styles().
This adds an `! empty()` check for classnames and declarations to avoid calling array_merge() with an empty value.

Props mukesh27, ramonopoly, aaronrobertshaw.
Fixes #62317.

Built from https://develop.svn.wordpress.org/trunk@59442


git-svn-id: http://core.svn.wordpress.org/trunk@58828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-20 21:29:22 +00:00
desrosj 37c8e1ae21 Build/Test Tools: Correctly check for Dependabot.
This updates the conditions added in [59370] to skip unnecessary pull request comments when Dependabot is the opening contributor to check for the correct `github.actor` value.

Follow up to [59380].

See #62221.
Built from https://develop.svn.wordpress.org/trunk@59441


git-svn-id: http://core.svn.wordpress.org/trunk@58827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-20 18:10:23 +00:00
desrosj 6efab4c237 Editor: update npm packages in trunk for 6.7.1.
Syncs Editor packages for WordPress 6.7.1 RC1. Includes the following PRs:

- https://github.com/WordPress/gutenberg/pull/66945
- https://github.com/WordPress/gutenberg/pull/66889
- https://github.com/WordPress/gutenberg/pull/67139 

Reviewed by desrosj.
Merges [59437] to trunk.

Props mmaattiiaass, ramonopoly, mamaduka, get_dave, poena, ntsekouras, mcsf, jsnajdr, 0mirka00, desrosj, joemcgill, cbravobernal, azaozz, room34, mayanktripathi32, im3dabasia1, jonsurrell.
Fixes #62478, #62447. 
Built from https://develop.svn.wordpress.org/trunk@59438


git-svn-id: http://core.svn.wordpress.org/trunk@58824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-20 16:20:31 +00:00
Sergey Biryukov d37c855db1 I18N: Adjust translator comments in `nav-menu.js`.
Includes:
* Moving the comments directly above `wp.i18n._x()` so that they can be picked up properly.
* Simplifying the context to avoid unnecessarily translating the string twice for the same use case.
* Using the established translator comments format for consistency.

Follow-up to [59428].

See #62402.
Built from https://develop.svn.wordpress.org/trunk@59431


git-svn-id: http://core.svn.wordpress.org/trunk@58817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-20 11:22:19 +00:00
desrosj c557605794 i18n: Account for `load_*_textdomain()` after JIT loading.
When `load_*_textdomain()` functions are called after WordPress has already attempted just-in-time loading of translations, nothing happens. 

This updates the related logic to retry translation loading when a custom path is set to ensure all translations are available.

Additionally, this also fixes cases where an `en_US.mo` file is provided with non-English strings to override the default language.

Follow up to [59157].

Props swissspidy, peterwilsoncc, desrosj, apermo, sergeybiryukov, wildworks, tigriweb, twvania, looswebstudio, stimul, audrasjb, finntown, bluantinoo, timwhitlock, albigdd.
See #62337.
Built from https://develop.svn.wordpress.org/trunk@59430


git-svn-id: http://core.svn.wordpress.org/trunk@58816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-20 02:50:24 +00:00
desrosj 85928dc39a Options, Meta APIs: Ensure duplicate salts are properly flagged.
Improvements were made in 6.7 to ensure that salts stored in the database were primed more efficiently.

The logic added to accomplish this suffered from an edge case where array indexes were unexpectedly missing when `wp_salt()` was called recursively.

Follow up to [58837].

Props juliobox, ankitkumarshah, dilipbheda, johnbillion, joemcgill, desrosj.
Fixes #62424.
Built from https://develop.svn.wordpress.org/trunk@59427


git-svn-id: http://core.svn.wordpress.org/trunk@58813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-20 01:39:19 +00:00
joedolson 41226f1164 Menus: i18n: Fix untranslatable strings in `nav-menu.js`.
Wrap three untranslatable strings in nav menus in JS translation functions.

Follow up to [59265].

Props juliemoynat, swissspidy, yogeshbhutkar, sergeybiryukov, desrosj, tobifjellner, audrasjb, joedolson.
Fixes #62402.
Built from https://develop.svn.wordpress.org/trunk@59426


git-svn-id: http://core.svn.wordpress.org/trunk@58812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-19 23:25:20 +00:00
Sergey Biryukov e8741c53c8 Toolbar: Allow the Learn WordPress link to be localized.
The Learn WordPress website is supposed to automatically redirect to the correct locale according to the browser's language settings, however that may not work as expected in some cases.

This commit brings consistency with the other WordPress.org links, which can be localized as appropriate.

Follow-up to [56720].

Props timse201, ruturajraval2305, yogeshbhutkar, ajayghaghretiya-multidots, swissspidy, sabernhardt, im3dabasia1, mukesh27.
Fixes #62459.
Built from https://develop.svn.wordpress.org/trunk@59425


git-svn-id: http://core.svn.wordpress.org/trunk@58811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-19 22:18:21 +00:00
joedolson 70842372b1 Login: Revert selector change in login heading CSS.
In [59138], the login screens were updated to change the `h1` heading from the logo to screen-reader hidden text. Along with that HTML change, we changed the CSS selectors from `.login h1` to `.login .wp-login-logo`. This unnecessary change increased specificity and broke the CSS selectors used by a wide variety of plugins to replace the login logo.

Commit reverts the change in selector back to using the `.login h1` pattern.

Props leecollings, sabernhardt, im3dabasia1, roytanck, sailpete, joedolson. 
Fixes #62410.
Built from https://develop.svn.wordpress.org/trunk@59424


git-svn-id: http://core.svn.wordpress.org/trunk@58810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-19 21:24:22 +00:00
czapla d54b7924ef HTML API: Use case insensitive tag_name comparison in `::next_tag`.
The HTML API `::next_tag` method now performs case-insensitive matching when searching for tags by name. For example, searching for 'DIV' will match both '<div>' and '<DIV>' tags.

Props jonsurrell, dmsnell.
Fixes #62427.

Built from https://develop.svn.wordpress.org/trunk@59422


git-svn-id: http://core.svn.wordpress.org/trunk@58808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-19 16:05:17 +00:00
youknowriad e09a15b011 Admin Color Scheme: Update the highlight color in the Modern color scheme.
In the Modern color scheme, the font color on hover in the admin bar is bright green. However, in the WordPress.org site itself, the color used is Blueberry 2. This commits aligns both colors on the more balanced Blueberry color.

Props fushar, Joen.
Fixes #62219.
Built from https://develop.svn.wordpress.org/trunk@59419


git-svn-id: http://core.svn.wordpress.org/trunk@58805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-19 08:02:16 +00:00
ramonopoly 70b4a18c97 Theme JSON: include block style variations in path only output of get_block_nodes
An `$include_node_paths_only` option to `get_block_nodes()` was introduced to improve performance.

When set to `true`, this option tells the function to only return paths, and not selectors, for consumers that only needed paths to style values.

For one of the conditional blocks, block style variations wasn't included.

This commit adds them to the array of paths following the existing model `$node[]['path' => [], 'variations' => ['path' => []]]`.

Follow-up to [61858].

Props aaronrobertshaw, ramonopoly.
Fixes #62399.



Built from https://develop.svn.wordpress.org/trunk@59418


git-svn-id: http://core.svn.wordpress.org/trunk@58804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-19 04:44:19 +00:00
Sergey Biryukov c6e76c3c5b Users: Correct “Add New User” page reference on Network Settings screen.
Follow-up to [56515].

Props timse201.
Fixes #62458.
Built from https://develop.svn.wordpress.org/trunk@59417


git-svn-id: http://core.svn.wordpress.org/trunk@58803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-18 23:38:20 +00:00
czapla c0baa82edc Interactivity API: Remove redundant server state from Interactivity Router
Remove the workaround for a bug that was fixed in https://github.com/WordPress/gutenberg/pull/66183. Previously, if the store was not initialized with a minimal navigation object, the interactivity-router script module would error.

Props jonsurrell, czapla, gziolo.
Fixes 62465#.

Built from https://develop.svn.wordpress.org/trunk@59416


git-svn-id: http://core.svn.wordpress.org/trunk@58802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-18 20:06:24 +00:00
Felix Arntz a7dda35133 Media: Avoid images with `sizes=auto` to be displayed downsized in supporting browsers.
Based on the user agent stylesheet rules outlined in https://html.spec.whatwg.org/multipage/rendering.html#img-contain-size, images that have `sizes=auto` while applying `width: auto` or `width: fit-content` would be constrained to only 300px width.

This changeset overrides said user agent stylesheet rule with a much larger constraint, to avoid the problem.

Additionally, it introduces a filter `wp_img_tag_add_auto_sizes` which can be used to opt out of the functionality, as an additional measure.

Props joemcgill, flixos90, dooperweb, SirLouen, azaozz, mukesh27, apermo.
Fixes #62413.
See #61847, #62345.

Built from https://develop.svn.wordpress.org/trunk@59415


git-svn-id: http://core.svn.wordpress.org/trunk@58801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-18 19:52:19 +00:00