Commit Graph

24413 Commits

Author SHA1 Message Date
desrosj
316d28f0a5 Build/Test Tools: Update 3rd-party GitHub Actions.
This updates the following GitHub Actions to their latest versions:
- `actions/cache`
- `actions/checkout`
- `actions/setup-node`
- `actions/upload-artifact`
- `codecov/codecov-action`
- `shivammathur/setup-php`

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


git-svn-id: http://core.svn.wordpress.org/trunk@59058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-28 00:45:24 +00:00
spacedmonkey
c32b20fa60 Revisions: Use WP_Query in wp_get_post_autosave.
Replaced the raw SQL query in the `wp_get_post_autosave` function with a `WP_Query` call. This change improves code maintainability and replaces the raw SQL query with a cacheable query via `WP_Query`.

Props narenin, swissspidy, mukesh27, spacedmonkey, im3dabasia1.
Fixes #62658.
Built from https://develop.svn.wordpress.org/trunk@59715


git-svn-id: http://core.svn.wordpress.org/trunk@59057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-27 23:07:23 +00:00
joedolson
2011617834 Administration: Fix typo in code documentation in wp/sanitize.js.
Change "Text to have the HTML tags striped out of." to "Text to strip the HTML tags from."

Replaces an unclear statement with a typo with a more clear statement.

Props joedolson, mukesh27, dhruvang21.
Fixes #62851.
Built from https://develop.svn.wordpress.org/trunk@59714


git-svn-id: http://core.svn.wordpress.org/trunk@59056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-27 19:25:25 +00:00
Sergey Biryukov
16ee06cba1 Coding Standards: Use strict comparison in wp_xmlrpc_server::mw_newPost().
Follow-up to [5281].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59713


git-svn-id: http://core.svn.wordpress.org/trunk@59055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-27 15:45:23 +00:00
John Blackbourn
b7a73d6a45 Security: Enable the referrer policy header on the login screen.
This sets the same referrer policy of `strict-origin-when-cross-origin` that's used in the admin area to prevent a referrer being sent to other origins. This helps prevent unwanted exposure of potentially sensitive information that may be contained within the URL.

The header can be disabled if necessary by removing the `wp_admin_headers` action from the `login_init` hook.

Props kkmuffme, sagarlakhani, albatross10

Fixes #62273
See #42036
Built from https://develop.svn.wordpress.org/trunk@59712


git-svn-id: http://core.svn.wordpress.org/trunk@59054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-27 14:41:22 +00:00
audrasjb
48ed5b3159 General: Get rid of title attributes used by get_calendar().
This changeset replaces `title` attributes with `aria-label` for weekdays in `get_calendar()` table cells.

Props sabernhardt, audrasjb, mukesh27, shailu25.
Fixes #62860.
See #24766.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-26 22:22:24 +00:00
Sergey Biryukov
906810c2db Coding Standards: Use strict comparison in wp_xmlrpc_server::_prepare_comment().
Follow-up to [20856].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59710


git-svn-id: http://core.svn.wordpress.org/trunk@59052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-26 18:53:23 +00:00
audrasjb
cf2aebff7f Administration: Use a lighter font-weight value for settings labels.
This changeset lowers the font-weight value from `600` to `400` for labels located in the Settings screens.
This is an initial implementation of the WordPress design system, aligning with the broader goal of achieving a more consistent and unified design across the administration.

Props karmatosed, audrasjb.
Fixes #62865.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-25 23:51:24 +00:00
audrasjb
ffa50f3c7b Themes: Improve theme count behavior in the Add Themes screen.
This changeset fixes an UI issue where the theme count in the "Add Themes" screen touches the top border on small screens.

Props sukhendu2002, diliphingarajiya, dilipbheda, ankitkumarshah, dhruvang21, im3dabasia1.
Fixes #62499.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-25 17:11:23 +00:00
Sergey Biryukov
b74968d542 Coding Standards: Use strict comparison in wp_xmlrpc_server::_insert_post().
Follow-up to [19848].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59707


git-svn-id: http://core.svn.wordpress.org/trunk@59049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-25 14:34:20 +00:00
audrasjb
130a7a8567 Plugins: Improve search box margin behavior in the Add Plugins screen.
This changeset fixes a margin issue in the search input box on the Add New Plugins screen, which was previously breaking below 1138px. Specifically, the top margin was set to 0px, and the overall appearance of the search box was inconsistent between 1000px and 1138px. Now, the margin is consistent across all breakpoints.

Props jomonthomaslobo1, narenin, iflairwebtechnologies, peterwilsoncc, audrasjb, shailu25.
Fixes #61785.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-25 14:12:19 +00:00
audrasjb
471cffffcc Administration: Introduce a lighter background for WP Admin.
This changeset replaces the light grey background color with the white color defined in the Editor Storybook. This change also impacts admin color schemes that previously utilized the default admin background color.
This is an initial implementation of the WordPress design system, aligning with the broader goal of achieving a more consistent and unified design across the administration.

Props karmatosed, audrasjb.
Fixes #62831.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-25 14:07:23 +00:00
audrasjb
e4229833fe Docs: Improve @return docblock section for get_category().
This changeset adds more details on the `WP_Term` returned by `get_category()` as it contains additional backwards compatible aliases for the era before WP 4.4 and 2.3.

Props apermo, audrasjb.
Fixes #62842.
See #62281.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 23:28:23 +00:00
audrasjb
b7a285e101 Posts, Post Types: Remove title attribute from the_shortlink().
Since [13683], `the_shortlink()` has included a `title` attribute. By default, that gives the sanitized post title, and it does not sanitize custom text. Given the low value of this attribute, this changeset removes it.

Props sabernhardt, audrasjb, joedolson.
Fixes #62838.
See #24766.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 23:00:22 +00:00
audrasjb
5a26f1452c Docs: Various Docblock fixes in wp-includes/widgets.php, as per WP Docs standards;
Props ankitpatel1578, sabernhardt.
Fixes #62859.
See #62281.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 21:20:23 +00:00
audrasjb
492dd1ba34 Import: Add the import_filters action hook to the Import screen.
This changeset introduces the new `import_filters` action hook at the end of the Import screen, consistently with other admin screens like `export.php`.

Props audrasjb, lenasterg.
Fixes #54419.
See #19863.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 14:02:21 +00:00
Pascal Birchler
6a84867ba3 Posts, Post Types: Embeds: Add new embeddable argument to post types.
This new argument, which defaults to the value of `public`, can be used to determine whether a post can be embedded using oEmbed. A new `is_post_embeddable()` function is added to easily check this.

Props pampfelimetten, swissspidy, bradleyt, DrewAPicture, gadelhas, mukesh27.
Fixes #35567.
Built from https://develop.svn.wordpress.org/trunk@59700


git-svn-id: http://core.svn.wordpress.org/trunk@59042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 13:32:21 +00:00
Sergey Biryukov
e28810b49b XML-RPC: Correctly pass the ID value to wp_update_post() in ::mw_editPost().
Follow-up to [59697].

Props johnbillion.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59699


git-svn-id: http://core.svn.wordpress.org/trunk@59041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 12:30:24 +00:00
audrasjb
4de28b054d Themes: Add wp-theme-<name> and wp-child-theme-<name> classes to body_class.
This changeset introduces new classes to the body tag. The classes `wp-theme-<name>` and `wp-child-theme-<name>` (when the current theme is a child theme) are added, where `<name>` represents the sanitized name of the active theme.

Props cais, GaryJ, nacin, SergeyBiryukov, johnjamesjacoby, nirajgirixd, poena, audrasjb, rinkalpagdar.
Fixes #19736.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 10:58:24 +00:00
Sergey Biryukov
9b1fa5c2d6 Coding Standards: Rename the $ID variable in wp_xmlrpc_server methods.
This resolves a WPCS warning:
{{{
Variable "$ID" is not in valid snake_case format, try "$i_d"
}}}

Follow-up to [28448].

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59697


git-svn-id: http://core.svn.wordpress.org/trunk@59039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-24 00:04:22 +00:00
joedolson
a429f0e6c2 Editor: Change the Text editor label to Code.
Rename the 'Text' tab of the classic editor to 'Code', mimicking the labels used in the block editor: "Visual editor" and "Code editor".
 
Update code comment and Help documentation to reference the editor using the new label.

Props lukecavanagh, ctienshi, travel_girl, audrasjb, sabernhardt, joedolson, rseigel, mark-k, sergeybiryukov, presskopp, giuriani, afercia, knutsp, audrasjb, sukhendu2002.
Fixes #38061.
Built from https://develop.svn.wordpress.org/trunk@59696


git-svn-id: http://core.svn.wordpress.org/trunk@59038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-23 23:54:23 +00:00
joedolson
e3ae09cc69 Editor: Remove option to disable the visual editor.
Remove the option "Disable the visual editor when writing" from the user profile if it is currently false. If enabled, the option will stay available until disabled.

This was blocked due to issues with tab order and focusability in the classic editor environment until [59188].

Props mark-k, SergeyBiryukov, joedolson, pento, iseulde, chriscct7, afercia, prasadkarmalkar, rcreators, jamieblomerus.
Fixes #34681.
Built from https://develop.svn.wordpress.org/trunk@59695


git-svn-id: http://core.svn.wordpress.org/trunk@59037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-23 22:49:23 +00:00
John Blackbourn
de74a2bbad Build/Test Tools: Correct the usage of the conclusion of the previous run within the Slack notifications workflow.
Prior to r59679 this value was echoed to GitHub output which meant that its surrounding double quotes lost their significance. Now this value is used directly in the job output it needs to be treated as a plain string.

This concludes the conclusion confusion.

See #82221

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


git-svn-id: http://core.svn.wordpress.org/trunk@59035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-23 17:14:22 +00:00
Sergey Biryukov
0fc515b005 Docs: Correct description for the_time(), get_the_time(), and get_post_time().
This aims to avoid confusion with `the_date()` and `get_the_date()`.

Includes synchronizing the description for `the_weekday()` and `the_weekday_date()`, which have very similar functionality, except that the latter will only output the weekday if the current post's weekday is different from the previous one output.

Follow-up to [59691].

See #51289.
Built from https://develop.svn.wordpress.org/trunk@59692


git-svn-id: http://core.svn.wordpress.org/trunk@59034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-23 00:47:22 +00:00
audrasjb
98657c10d5 Docs: Clarify the purpose of post date/time functions.
This changeset clarifies the purpose of these functions and make the documentation more accurate and flexible. Instead of referring to the "date the post was written," the functions and filter descriptions now refer to the "date of the post." This change accommodates scenarios where the displayed date might not strictly correspond to the writing date (e.g. scheduled posts, backdated posts, or content where the "date" represents something other than creation).

Props casiepa, audrasjb, SergeyBiryukov, Rarst, helen, azouamauriac, pbearne.
Fixes #51289.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 23:31:24 +00:00
audrasjb
b863373e3c Administration: Remove useless arrow icon from WordPress admin menu.
This changeset deletes the arrow that is typically added next to WordPress admin menu items that have submenus. The `.wp-menu-arrow` element is no longer visible since the WP 3.8 redesign, but the HTML and CSS remained. With this changeset, the HTML generating the arrow is removed, and the corresponding CSS styling is deleted.

Props helen, azaozz, jbkkd, pbearne, flixos90.
Fixes #26960.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 22:33:22 +00:00
audrasjb
c72b77f1ee Themes: Add wp-singular to the list of body classes when viewing a single post object.
The `wp-singular` class includes a `wp` prefix to avoid conflicts with existing classes. This changeset also updates the `Tests_Post_GetBodyClass` PHPUnit test to include the new CSS class.

Props danielpataki, peterwilsoncc, swissspidy, johnbillion, eceleste, poena, audrasjb, raj198, shailu25.
Fixes #35164.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 21:18:23 +00:00
audrasjb
692f6d4b9e General: Stop direct loading of files in /wp-includes that should only be included.
This changeset restricts direct access call in `/wp-includes` and its sub directories.

Follow-up to [11768], [59678].

Props deepakrohilla.
Fixes #61314.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 19:48:25 +00:00
John Blackbourn
67b029cbc1 Build/Test Tools: Coerce the run_id input to a string before passing it to the "Failed Workflow" workflow.
Follow-up to [59679].

See #62221

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


git-svn-id: http://core.svn.wordpress.org/trunk@59029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 19:26:26 +00:00
desrosj
3012d6ea80 Build/Test Tools: Update @playwright/test.
This updates `@playwright/test` to the latest version, currently `1.49.1`.

In older branches using Playwright, the E2E and Performance workflows have recently started failing. This is due to changes in the GitHub Actions runner images. Updating Playwright ensures more modern dependency trees are used when installing browsers for testing and fixes the issue.

Props swissspidy.
See #62843.
Built from https://develop.svn.wordpress.org/trunk@59682


git-svn-id: http://core.svn.wordpress.org/trunk@59025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 17:51:31 +00:00
desrosj
efaefdc79d Build/Test Tools: Fix Slack message payload generation.
The JSON string set as an output for the Slack message payload needs to be one line to prevent causing errors. This ensures `jq` returns a compact JSON string.

Follow up to [59679].

Props johnbillion.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59681


git-svn-id: http://core.svn.wordpress.org/trunk@59024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 17:05:25 +00:00
Sergey Biryukov
60f95c14fd Coding Standards: Rename $thisEnclosure variable in wp_xmlrpc_server methods.
This resolves a WPCS warning:
{{{
Variable "$thisEnclosure" is not in valid snake_case format, try "$this_enclosure"
}}}

Follow-up to [16824], [19848].

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59680


git-svn-id: http://core.svn.wordpress.org/trunk@59023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 15:40:20 +00:00
John Blackbourn
140cfa6d5d Build/Test Tools: Improve the security and correctness of the GitHub Actions workflows files.
This includes removing use of dangerous inline GitHub Actions expressions, preventing word splitting, further tightening permissions, and generally improving many aspects of the workflows.

This also introduces a new workflow that runs Actionlint to detect incorrect and insecure code and configuration in workflow files.

Props johnbillion, swissspidy, flixos90, desrosj.

See #62221

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


git-svn-id: http://core.svn.wordpress.org/trunk@59022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 15:15:21 +00:00
audrasjb
0619c6d95a General: Stop direct loading of files in /wp-admin that should only be included.
This changeset restricts direct access call in `/wp-admin` and its sub directories.

Follow-up to [11768].

Props deepakrohilla.
See #61314.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-22 14:06:22 +00:00
audrasjb
a79b4ef4c9 Formatting: Preserve target="_blank" in Biographical Info and Category Description.
This changeset ensures the `target="_blank"` attribute is preserved when adding links in the Biographical Info and Category Description fields. Previously, this attribute was being stripped by the KSES sanitization process.

Additionally, new unit tests have been added to verify the preservation of the `target="_blank"` attribute in these specific contexts.

Props lovewpmu, miqrogroove, bsutcliffe, sjefen6, nofearinc, nacin, harmr, blogitsolutions, stefahn, nirajgirixd, martinkrcho, spacedmonkey, sukhendu2002, audrasjb, gaellebesson, nuryko, guillaumeturpin, maximemeganck, ranafge, azaozz, joedolson, rinkalpagdar, mikinc860.
Fixes #12056.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 22:59:18 +00:00
audrasjb
c84a324ab2 Customize: Show sidebar's description below its name in Customizer Widgets sidebar list.
This is part of an effort to reduce `title` attribute usage in WordPress Admin. This changeset updates the Customizer Widgets sidebar list to show sidebar name and description (as these informations may benefit to everyone), and remove the `title` attribute.

Follow-up to [22439], [27548], [31513], [32991], [50804], [53414], [59675].

Props karlgroves, sabernhardt, mukesh27, joedolson.
Fixes #62836.
See #24766.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 22:38:23 +00:00
audrasjb
37e2744105 Themes: Remove title attributes from theme list tables.
This changeset updates the old list tables for themes and theme installation to remove `title` attributes or replace them with a more acessible implementation:
- Removes `title` attributes from `span` elements
- Replaces `title` with `aria-label` for links whose visible text starts with the same word, consistently with links on the "Add Plugins" screen
- Reuses the `$preview_title` variable to keep ARIA labels consistent for both Preview links

Follow-up to [22439], [27548], [31513], [32991], [50804], [53414].

Props karlgroves, sabernhardt, audrasjb, alh0319.
Fixes #62834.
See #24766.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 21:49:22 +00:00
Weston Ruter
091d5e460e Menus: Improve performance by calling get_privacy_policy_url() once per Walker_Nav_Menu instance rather than for every nav menu item.
The `start_el()` method in `Walker_Nav_Menu` was calling `get_privacy_policy_url()` for every menu item when building menus. This resulted in redundant queries, particularly for menus with many items. This obtains the `get_privacy_policy_url()` value in the constructor for reuse in the `start_el()` method to improve performance.

Redundant code to construct the privacy policy page is also refactored into the `set_up()` method during tests.

Props arzola, swissspidy, westonruter, mukesh27.
Fixes #62818.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 21:26:23 +00:00
John Blackbourn
1cd758d2ee Build/Test Tools: Switch to using local references for reusable workflows.
The benefit of this is that when PRs are made to make changes to a reusable workflow, the references doesn't need to be updated to point to the fork in order for the changed workflow to run.

A `npm run grunt replace:workflow-references-local-to-remote` command has also been introduced in order to convert these local references back to remote ones. This command can be used to switch release branches over to using remote workflows, as they are currently, so they continue to benefit from workflow changes in trunk without the need for continual backporting to all the branches.

Props desrosj, johnbillion

Fixes #62416

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


git-svn-id: http://core.svn.wordpress.org/trunk@59016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 15:42:21 +00:00
Sergey Biryukov
0f51cfd3b4 Coding Standards: Rename the $errorString variable in wp_xmlrpc_server methods.
This resolves a WPCS warning:
{{{
Variable "$errorString" is not in valid snake_case format, try "$error_string"
}}}

Follow-up to [5054].

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59672


git-svn-id: http://core.svn.wordpress.org/trunk@59015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 15:34:20 +00:00
John Blackbourn
783c6905dd Security: Set the HttpOnly flag for the test cookie and the wp_lang cookie on the login screen.
These cookies are only accessed server-side and don't need to be exposed to JavaScript in the browser.

Props earthman100, kevinlearynet

Fixes #61322

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


git-svn-id: http://core.svn.wordpress.org/trunk@59014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 13:19:21 +00:00
Pascal Birchler
78c401da14 I18N: Set textdomain registry information before loading plugins/theme.
This way, warnings for early translation calls can be emitted that aren't attached to any hook.

Follow-up to [59461].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 11:44:21 +00:00
Pascal Birchler
f036ffa43a Build/Test Tools: Do not download extra browsers in performance tests.
Props euthelup, johnbillion, mukesh27.
Fixes #62822.
Built from https://develop.svn.wordpress.org/trunk@59669


git-svn-id: http://core.svn.wordpress.org/trunk@59012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-21 08:34:21 +00:00
John Blackbourn
6fb84ace49 Build/Test Tools: Pass the working directory path from the host to the dev environment containers.
This allows development tools to read the host path information from the `HOST_PATH` environment variable in order to, for example, map a path in a stack trace from the path in the container to the path on the host machine.

Fixes #62833

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


git-svn-id: http://core.svn.wordpress.org/trunk@59011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-20 22:08:19 +00:00
John Blackbourn
d93f38e360 Administration: Clarify some references to "we" and "our" in the administration area.
This changes some text to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word “we” should be avoided (...) unless its made very clear which group is speaking

Fixes #62295

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


git-svn-id: http://core.svn.wordpress.org/trunk@59010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-20 22:04:28 +00:00
John Blackbourn
33729cf0db Build/Test Tools: Instruct git and svn to ignore SQLite files
This prevents users of the SQLite Database Integration plugin from seeing untracked files in the `src/wp-content/database` directory.

Props sukhendu2002, johnbillion

Fixes #62813

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


git-svn-id: http://core.svn.wordpress.org/trunk@59009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-20 21:51:25 +00:00
Sergey Biryukov
5c35a5f4c5 Coding Standards: Rename the $isPrimary variable in wp_xmlrpc_server methods.
This resolves a few WPCS warnings:
{{{
Variable "$isPrimary" is not in valid snake_case format, try "$is_primary"
}}}

Additionally, this commit renames `$catids` to `$cat_ids` for consistency.

Follow-up to [1671].

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59665


git-svn-id: http://core.svn.wordpress.org/trunk@59008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-20 14:32:26 +00:00
Sergey Biryukov
3a140bb318 Coding Standards: Rename the $dateCreated variable in wp_xmlrpc_server methods.
This resolves a few WPCS warnings:
{{{
Variable "$dateCreated" is not in valid snake_case format, try "$date_created"
}}}

Follow-up to [1563], [1659], [5888], [6691], [8543], [19848].

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59664


git-svn-id: http://core.svn.wordpress.org/trunk@59007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-19 16:57:22 +00:00
Sergey Biryukov
a8196960bc Coding Standards: Use strict comparison in wp_xmlrpc_server::pingback_ping().
Follow-up to [2983], [55365].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59663


git-svn-id: http://core.svn.wordpress.org/trunk@59006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-18 23:43:25 +00:00
Joe McGill
89adfd4acc Editor: Improve consistency of render_block_context filter.
This ensures that when block context is filtered via `render_block_context`, the filtered value is provided as available context to inner blocks.

For backwards compatibility reasons, filtered context is added to inner block context regardless of whether that block has declared support via the `uses_context` property.

Props mukesh27, flixos90, gziolo, dlh, joemcgill, santosguillamot.
Fixes #62046.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-17 21:37:21 +00:00
desrosj
570c050e53 Build/Test Tools: Auto-close linked PRs on GitHub.
There are currently ~2,000 open pull requests on GitHub for `wordpress-develop`. Many of these were for testing changes that have already been merged.

To help prevent orphaned pull requests, this new workflow will search for any pull requests referencing the `Fixed` Trac tickets as noted in the commit message and close them out. For now, this only happens for `push` events.

Props peterwilsoncc, swissspidy, johnbillion, davidbaumwald.
Fixes #62817.
Built from https://develop.svn.wordpress.org/trunk@59661


git-svn-id: http://core.svn.wordpress.org/trunk@59004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-17 14:03:22 +00:00
Sergey Biryukov
52a592e1b8 Coding Standards: Use strict comparison in wp_xmlrpc_server::wp_deleteCategory().
Follow-up to [20157], [32733].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59660


git-svn-id: http://core.svn.wordpress.org/trunk@59003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-17 10:39:18 +00:00
John Blackbourn
6629610493 Build/Test Tools: Hide the Node.js error message when a Docker command produces a non-zero exit code.
When running a command that goes via docker.js and produces a non-zero exit code, the error message and stack trace from node an safely be hidden because the stack trace only points to the `execSync()` call and is of no use.

Fixes #62814

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


git-svn-id: http://core.svn.wordpress.org/trunk@59002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-17 10:37:19 +00:00
John Blackbourn
958e52f4cb Build/Test Tools: Use quiet pulls during local environment installation and WP-CLI commands.
This reduces the noise of the output -- both locally and on CI -- when first pulling containers during local environment installation and the first time the cli container is pulled for WP-CLI commands.

See #62280

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


git-svn-id: http://core.svn.wordpress.org/trunk@59001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-17 10:34:26 +00:00
Peter Wilson
cf9594c4ae Options/Meta APIs: Document type juggling of meta data.
Document that unserialised data types are stored as strings in the database and returned as such by the meta data functions. For example, setting meta data to the integer value `1` will be returned as `"1"` when subsequently queried via `get_metadata()` and the related functions.

Props sukhendu2002, azaozz, jrf, rodrigosprimo.
Fixes ticket:61950.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-17 00:12:26 +00:00
desrosj
2e64ee9f0d Administration: Modernize admin color scheme SASS files.
This updates the admin color scheme `.sass` files to address some deprecated notices caused by upstream changes.

- `string` and `colors` are no longer globally available functions.
- `@import` is deprecated in favor of `@use`.

There are still a few notices that are output, however this will require an update to the `grunt-sass` package to resolve.

Props MattyRob.
Fixes #62323.
Built from https://develop.svn.wordpress.org/trunk@59656


git-svn-id: http://core.svn.wordpress.org/trunk@58999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-16 21:05:33 +00:00
desrosj
3ed22fda3a Build/Test Tools: Add input for disabling AppArmor.
Old branches requiring outdated versions of Chromium to run JavaScript tests have recently started failing as a result of the `ubuntu-latest` container being updated to point to `ubuntu-24`.

This introduces a new input to the reusable JavaScript testing workflow to allow a fix to be used without having to update Chromium or tests in these branches.

Props swissspidy.
See #62808.
Built from https://develop.svn.wordpress.org/trunk@59635


git-svn-id: http://core.svn.wordpress.org/trunk@58998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-16 20:21:23 +00:00
Sergey Biryukov
201d79b06e Upload: Remove redundant check for ABSPATH in wp-admin/async-upload.php.
This aims to bring consistency with a similar fragment in other files, since relocating `wp-admin` or `wp-load.php` is not supported at this time.

Follow-up to [6659], [7971], [8315].

Props hussain896, swissspidy, knutsp, SergeyBiryukov.
Fixes #62809.
Built from https://develop.svn.wordpress.org/trunk@59634


git-svn-id: http://core.svn.wordpress.org/trunk@58997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-16 16:18:24 +00:00
John Blackbourn
3579e69fe2 Users: Retain the current session when a user changes their password.
Prior to this change a new session was unnecessarily created when a user changed their own password.

Existing authentication cookies for the user will still be invalidated regardless of whether they share the same session token because session cookie keys contain a substring of the password hash.

Props snicco, narenin, johnbillion

Fixes #61366

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


git-svn-id: http://core.svn.wordpress.org/trunk@58996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-16 15:35:27 +00:00
Sergey Biryukov
5765a2eb1b Coding Standards: Use strict comparison in wp_xmlrpc_server::_multisite_getUsersBlogs().
Follow-up to [https://mu.trac.wordpress.org/changeset/1218 mu:1218], [12852].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59632


git-svn-id: http://core.svn.wordpress.org/trunk@58995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-16 12:04:23 +00:00
Peter Wilson
5351aabea8 Options/Meta APIs: Optimize cache hits for non-existent options.
Optimize the order of checking the various options caches in `get_option()` to prevent hitting external caches each time it is called for a known non-existent option.

The caches are checked in the following order when getting an option:

1. Check the `alloptions` cache first to prioritize existing loaded options.
2. Check the `notoptions` cache before a cache lookup or DB hit.
3. Check the `options` cache prior to a DB hit.

Follow up to [56595].

Props adamsilverstein, flixos90, ivankristianto, joemcgill, rmccue, siliconforks, spacedmonkey.
Fixes #62692.
See #58277.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-15 22:13:24 +00:00
Felix Arntz
b742570d1b REST API: Fix PHP warning about undefined paged argument in various REST API endpoints.
This bug could occur in `WP_REST_Posts_Controller`, `WP_REST_Global_Styles_Revisions_Controller`, `WP_REST_Revisions_Controller`, and any of their child classes. This changeset fixes it throughout.

Props apermo, pbearne, hemant-ahir, flixos90.
Fixes #62292.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-15 18:36:24 +00:00
Pascal Birchler
8e649f1a2e Undo accidental svn:mergeinfo property change in [59605].
See #61970.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-15 12:55:16 +00:00
Sergey Biryukov
b01086811d Coding Standards: Use strict comparison in paginate_links().
Follow-up to [4275], [28785].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59606


git-svn-id: http://core.svn.wordpress.org/trunk@58991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-15 12:52:17 +00:00
Pascal Birchler
7dcc7f8d32 REST API: Improve autosave and revision endpoints for templates and template parts.
Fixes those endpoints for file-based templates and template parts, as templates based on theme files can't be revisioned or autosaved.

Props antonvlasenko, swissspidy, spacedmonkey, kadamwhite.
Fixes #61970.
Built from https://develop.svn.wordpress.org/trunk@59605


git-svn-id: http://core.svn.wordpress.org/trunk@58990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-15 12:46:25 +00:00
Sergey Biryukov
5372b3ffa2 Tests: Restore the environment before performing assertions in download_url() tests.
This aims to avoid affecting other tests in case of failure.

Follow-up to [42773], [51939].

See #62280.
Built from https://develop.svn.wordpress.org/trunk@59604


git-svn-id: http://core.svn.wordpress.org/trunk@58989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-14 15:37:31 +00:00
John Blackbourn
7c245831e8 Docs: Correct a translator comment that was added in [59578].
See #62005

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


git-svn-id: http://core.svn.wordpress.org/trunk@58988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-14 11:38:24 +00:00
Sergey Biryukov
08ffc54083 Docs: Correct @return value for update_attached_file().
Follow-up to [4612], [21967], [24490], [47611], [48214].

Props arnoutblueshell, karthickmurugan, SergeyBiryukov.
Fixes #62803.
Built from https://develop.svn.wordpress.org/trunk@59602


git-svn-id: http://core.svn.wordpress.org/trunk@58987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-13 22:22:25 +00:00
desrosj
6658e0eb76 Coding Standards: Add missing space for self-closing tags.
Props laxman-prajapati, sabernhardt.
Fixes #62799.
Built from https://develop.svn.wordpress.org/trunk@59600


git-svn-id: http://core.svn.wordpress.org/trunk@58986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-13 14:57:23 +00:00
Sergey Biryukov
6f097ada4b Coding Standards: Use strict comparison in get_page_by_path().
Follow-up to [3511], [18541], [19075], [21845].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59599


git-svn-id: http://core.svn.wordpress.org/trunk@58985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-12 18:14:23 +00:00
Pascal Birchler
b9a1723711 Embeds: Add Canva to oEmbed provider allowlist.
Props swissspidy.
Fixes #58840.
Built from https://develop.svn.wordpress.org/trunk@59598


git-svn-id: http://core.svn.wordpress.org/trunk@58984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-11 13:44:25 +00:00
Sergey Biryukov
c38d71bcc0 Coding Standards: Use strict comparison in wp_check_post_hierarchy_for_loops().
Follow-up to [10129], [15806].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59597


git-svn-id: http://core.svn.wordpress.org/trunk@58983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-11 00:37:24 +00:00
Sergey Biryukov
b273bbf538 Coding Standards: Use strict comparison in get_posts_by_author_sql().
Follow-up to [13576], [25669].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59596


git-svn-id: http://core.svn.wordpress.org/trunk@58982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-10 18:14:23 +00:00
Sergey Biryukov
504d02539f Login and Registration: Check that the $_POST values are strings in wp_signon().
This prevents a fatal error from `trim()` via `wp_authenticate()` if an array is passed instead.

Follow-up to [6643], [58093].

Props leedxw, audrasjb, SergeyBiryukov.
Fixes #62794.
Built from https://develop.svn.wordpress.org/trunk@59595


git-svn-id: http://core.svn.wordpress.org/trunk@58981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-09 19:43:23 +00:00
poena
0086f4ba40 Twenty Twenty: Correct the font weight of the quote block in the editor.
This change removes the font weight of the paragraph inside the quote block,
so that the design in the editor and the front looks the same.

Props sainathpoojary, ankitkumarshah, sabernhardt, krupajnanda.
Fixes #62753.
Built from https://develop.svn.wordpress.org/trunk@59594


git-svn-id: http://core.svn.wordpress.org/trunk@58980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-09 09:23:23 +00:00
Sergey Biryukov
19d5011bff Coding Standards: Use strict comparison in wp_check_for_changed_dates().
Follow-up to [42401].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59593


git-svn-id: http://core.svn.wordpress.org/trunk@58979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-08 17:48:21 +00:00
Pascal Birchler
c90837121a I18N: Mail: Make PHPMailer messages translatable.
Adds a new `WP_PHPMailer` class to leverage the WordPress i18n system with PHPMailer, so that any user-visible error messages can be properly translated.

Props sukhendu2002, swissspidy, audrasjb, iandunn, nacin, mark-k.
Fixes #23311.
Built from https://develop.svn.wordpress.org/trunk@59592


git-svn-id: http://core.svn.wordpress.org/trunk@58978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-08 12:54:18 +00:00
Pascal Birchler
1dc1f32ed8 I18N: Update theme.json i18n schema with latest changes from Gutenberg.
Makes shadow, duotone and aspect ratio names properly translatable.

Props dalleyne, audrasjb, oandregal, swissspidy.
Fixes #62728.
Built from https://develop.svn.wordpress.org/trunk@59591


git-svn-id: http://core.svn.wordpress.org/trunk@58977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-08 12:36:23 +00:00
Adam Silverstein
107716bf6c Media: improve error messages for unsupported uploads.
Improve language explaining the reason for failure when uploading a modern image format like WebP or AVIF that the server doesn’t handle.

Props adamsilverstein, Cybr.
Fixes #61361.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-07 22:53:22 +00:00
Adam Silverstein
69b48e2e80 Media: improve Imagick handling of colors and alpha channel for PNG image uploads.
Fix an issue where index color (8 bit) PNG uploads were output as true color (24 bit) PNGs, significantly increasing their size.  When using Imagick, PNG output images will now match the colors of the uploaded image.

Also, correct handling of PNG alpha channel information so it is preserved in output images.

Props adamsilverstein, pbearne, nosilver4u, peterdavehello, joemcgill, azaozz, codex-m, kirasong, justlevine, jokanane, sallyruchman, wpfed, tgsrvrs, antpb, tb1909.
Fixes #36477.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-07 22:35:23 +00:00
Adam Silverstein
065f1ef453 Media: enable high bit depth resized image output with Imagick.
Fix an issue where uploaded HDR images were resized and output as SDR and thus significantly degraded from the original. When using Imagick, output images will now match the bit depth of the uploaded image.

Add a new filter ‘image_max_bit_depth’ which developers can use to control the maximum bit depth for resized images.

Props adamsilverstein, kirasong, gregbenz, apermo.
Fixes #62285.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-07 21:06:24 +00:00
desrosj
34b761063c Build/Test Tools: Expand and improve MariaDB test matrix.
The latest LTS version of MariaDB is 11.4, which is now included in the test matrix.

This changeset also expands the test matrix to include all LTS versions of MariaDB with > 1% of usage on WordPress sites in the wild as reported by the stats page on WordPress.org. Though a few of these are unsupported upstream, they are still supported in WordPress itself.

MariaDB 5.5 is also included in the new matrix. Because it was intended as a drop-in replacement to MySQL at the time, this also brings some MySQL 5.5 testing into the matrix. This has not been regularly tested against since specific database versions were included due to the lack of a working Docker container.

Props johnbillion, jorbin.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59587


git-svn-id: http://core.svn.wordpress.org/trunk@58973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-07 16:15:22 +00:00
desrosj
177e5b6559 Build/Test Tools: Test MariaDB innovation releases.
MariaDB also follows the innovation release model. This adds testing for these releases to the test matrix and moves innovation versions to a new job in order to more clearly differentiate from LTS ones.

The current innovation release for MariaDB is `11.6`.

Props johnbillion, jorbin.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59586


git-svn-id: http://core.svn.wordpress.org/trunk@58972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-07 15:59:21 +00:00
desrosj
045d089bae Build/Test Tools: Test against MySQL 9.1.
This is the latest innovation release from MySQL.

Props johnbillion, jorbin.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59585


git-svn-id: http://core.svn.wordpress.org/trunk@58971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-07 15:53:20 +00:00
Sergey Biryukov
70b6f54551 Coding Standards: Use strict comparison in wp_check_for_changed_slugs().
Follow-up to [4556], [4637], [34685].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59584


git-svn-id: http://core.svn.wordpress.org/trunk@58970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-07 15:48:20 +00:00
desrosj
6f4f3aa934 Tests: Fix explode() error for old DB versions on PHP 8.1+.
On MySQL/MariaDB 5.5, the default value for `sql_mode` was a blank string. By itself this is not a problem. However, `$wpdb->get_var()` returns `null` when a variable has an empty value.

One test method currently passes the result of `$wpdb->get_var( 'SELECT @@SESSION.sql_mode;' )` to `explode()` in order to reset the database to the pre-test method state. This causes an error when running PHP 8.1+, which deprecated the ability to pass `null` as a parameter of `explode()`.

This edge case was undiscovered because these versions are not currently included in the automated testing matrix.

See #62280.
Built from https://develop.svn.wordpress.org/trunk@59583


git-svn-id: http://core.svn.wordpress.org/trunk@58969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-07 15:42:25 +00:00
Felix Arntz
cfee5c0868 Build/Test Tools: Fix incorrect commit time being reported to WordPress Code Vitals Dashboard.
2nd attempt of [59570].

Props mukesh27, ayeshrajans, swissspidy, desrosj.
Fixes #62766.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-06 21:21:24 +00:00
ryelle
24fcd34673 Help/About: Allow "See everything new" button to wrap
On some screen sizes and languages, the "See everything new" button expands out of the content area. This change allows the button to wrap at all screen sizes, and updates the style of this button for wrapped text.

Props franciscabusas22, sabernhardt, yogeshbhutka, sainathpoojary, im3dabasia1, audrasjb.
Fixes #62380.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-06 16:20:23 +00:00
Sergey Biryukov
fe90ec9f08 Tests: Improve the test for the copyright year in bundled themes' readme.txt.
This aims to catch entries like `(C) 2024 WordPress.org` in addition to `Copyright 2024 WordPress.org`.

Includes converting the test to use a data provider, so that messages could be displayed for each individual theme.

Follow-up to [46719], [59569].

See #62280.
Built from https://develop.svn.wordpress.org/trunk@59579


git-svn-id: http://core.svn.wordpress.org/trunk@58965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-06 16:00:24 +00:00
John Blackbourn
0fc42c6443 Security: Enhance the wp_hash() function to support custom hashing algorithms.
The default algorithm remains as md5, but this change allows any algorithm that's supported by `hash_hmac()` to be used instead.

Props pushpenderindia, ayeshrajans, debarghyabanerjee, johnbillion

Fixes #62005

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


git-svn-id: http://core.svn.wordpress.org/trunk@58964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-06 15:23:26 +00:00
Pascal Birchler
657321d1ba Build/Test Tools: Expand performance tests setup.
Run tests against Multisite (possible since [58097]) and on single post pages. Also improve cache flushes/resets between iterations.

Props swissspidy, flixos90, desrosj, mukesh27.
Fixes #62725.
Built from https://develop.svn.wordpress.org/trunk@59577


git-svn-id: http://core.svn.wordpress.org/trunk@58963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-06 10:31:23 +00:00
Peter Wilson
62e8c2f986 Comments: Noindex pages containing unapproved comments.
Adds a `noindex` directive to pages displaying a preview of an unapproved comment, ie pages with both an `approved` and `moderation-hash` parameter.

This is to prevent the pages from appearing in search engines which can be the case if they ignore the canonical URL directive.

Props peterwilsoncc, flixos90, joostdevalk.
Fixes #62760.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-05 22:14:19 +00:00
Sergey Biryukov
e86f173f45 Coding Standards: Use strict comparison in get_pages().
Follow-up to [4180], [49108].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59575


git-svn-id: http://core.svn.wordpress.org/trunk@58961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-05 22:12:24 +00:00
Sergey Biryukov
aa87f88678 Coding Standards: Replace loose comparison in wpmu_welcome_notification().
Follow-up to [https://mu.trac.wordpress.org/changeset/543 mu:543].

Props debarghyabanerjee, aristath, poena, afercia, SergeyBiryukov.
Fixes #62283. See #62279.
Built from https://develop.svn.wordpress.org/trunk@59574


git-svn-id: http://core.svn.wordpress.org/trunk@58960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-04 10:27:21 +00:00
Sergey Biryukov
43380703cb Coding Standards: Use strict comparison in wpmu_validate_blog_signup().
Follow-up to [https://mu.trac.wordpress.org/changeset/8 mu:8], [https://mu.trac.wordpress.org/changeset/543 mu:543],  [https://mu.trac.wordpress.org/changeset/550 mu:550], [https://mu.trac.wordpress.org/changeset/1364 mu:1364], [https://mu.trac.wordpress.org/changeset/1958 mu:1958], [12603], [32733].

Props debarghyabanerjee, aristath, poena, afercia, SergeyBiryukov.
See #62279, #62283.
Built from https://develop.svn.wordpress.org/trunk@59573


git-svn-id: http://core.svn.wordpress.org/trunk@58959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-03 22:57:22 +00:00
Sergey Biryukov
1ea8475be2 Coding Standards: Use strict comparison in _reset_front_page_settings_for_post().
Follow-up to [6337], [25686].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59572


git-svn-id: http://core.svn.wordpress.org/trunk@58958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-02 18:27:23 +00:00
Felix Arntz
bb1d172850 Build/Test Tools: Revert [59570].
The fix did not work properly and is causing performance data for commits to not be sent at all. It is therefore reverted until a proper solution has been implemented.

See #62766.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-02 16:41:18 +00:00
Felix Arntz
39bd3d038d Build/Test Tools: Fix incorrect commit time being reported to WordPress Code Vitals Dashboard.
Props mukesh27, ayeshrajans.
Fixes #62766.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-02 16:13:21 +00:00
Peter Wilson
5247f68e15 Happy New Year Twenty Twenty-Five! 🎄
Update copyright year to 2025 in the Twenty Twenty-Five bundled theme's `readme.txt`.

Follow-up to [18201], [23306], [28064], [36855], [36856], [39659], [40241], [42424], [46719], [46720], [47025], [47026], [49915], [52427], [55024], [57235], [59568].


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


git-svn-id: http://core.svn.wordpress.org/trunk@58955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-02 01:08:22 +00:00
Sergey Biryukov
275d202ae3 Happy New Year! 🎄
Update copyright year to 2025 in `license.txt` and bundled themes.

Follow-up to [18201], [23306], [28064], [36855], [36856], [39659], [40241], [42424], [46719], [46720], [47025], [47026], [49915], [52427], [55024], [57235]. 
Built from https://develop.svn.wordpress.org/trunk@59568


git-svn-id: http://core.svn.wordpress.org/trunk@58954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-01 00:12:24 +00:00
Sergey Biryukov
53704a95ce Coding Standards: Use strict comparison in wp_count_attachments().
Follow-up to [54255].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59567


git-svn-id: http://core.svn.wordpress.org/trunk@58953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-31 19:19:25 +00:00
Sergey Biryukov
54aeb1d515 Coding Standards: Use strict comparison in get_post_ancestors().
Follow-up to [7074], [15758], [21559], [21953].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59566


git-svn-id: http://core.svn.wordpress.org/trunk@58952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-30 09:32:20 +00:00
Sergey Biryukov
b8fa6385d0 Coding Standards: Use strict comparison in sanitize_post().
Follow-up to [12062].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59565


git-svn-id: http://core.svn.wordpress.org/trunk@58951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-29 21:54:22 +00:00
Sergey Biryukov
8166540e32 Options, Meta APIs: Ensure after_section is printed for sections without any fields.
This brings consistency with the `before_section` HTML content, which did get printed in `do_settings_sections()` regardless of whether the settings section has any fields attached.

Follow-up to [8855], [21742], [54247].

Props alpipego, SergeyBiryukov.
Fixes #62746.
Built from https://develop.svn.wordpress.org/trunk@59564


git-svn-id: http://core.svn.wordpress.org/trunk@58950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-28 22:10:20 +00:00
Sergey Biryukov
233cf19ea7 Coding Standards: Use strict comparison in is_user_spammy().
Follow-up to [https://mu.trac.wordpress.org/changeset/1640 mu:1640].

Props debarghyabanerjee, aristath, poena, afercia, SergeyBiryukov.
See #62279, #62283.
Built from https://develop.svn.wordpress.org/trunk@59563


git-svn-id: http://core.svn.wordpress.org/trunk@58949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-27 23:02:24 +00:00
Sergey Biryukov
dbbdd23e30 Coding Standards: Use strict comparison in get_active_blog_for_user().
Follow-up to [https://mu.trac.wordpress.org/changeset/804 mu:804], [https://mu.trac.wordpress.org/changeset/1918 mu:1918].

Props debarghyabanerjee, aristath, poena, afercia, SergeyBiryukov.
See #62279, #62283.
Built from https://develop.svn.wordpress.org/trunk@59562


git-svn-id: http://core.svn.wordpress.org/trunk@58948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-26 23:57:24 +00:00
Sergey Biryukov
767dea88eb Coding Standards: Use strict comparison in remove_user_from_blog().
Follow-up to [https://mu.trac.wordpress.org/changeset/543 mu:543].

Props debarghyabanerjee, aristath, poena, afercia, SergeyBiryukov.
See #62279, #62283.
Built from https://develop.svn.wordpress.org/trunk@59561


git-svn-id: http://core.svn.wordpress.org/trunk@58947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-25 18:31:23 +00:00
Sergey Biryukov
e85bca16d3 Coding Standards: Use strict comparison in wpmu_signup_blog_notification().
Follow-up to [https://mu.trac.wordpress.org/changeset/1970 mu:1970].

Props debarghyabanerjee.
See #62283.
Built from https://develop.svn.wordpress.org/trunk@59560


git-svn-id: http://core.svn.wordpress.org/trunk@58946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-24 22:24:27 +00:00
joedolson
fe1018b90d Themes: Add an ID to the block theme skip link.
Add the ID `wp-skip-link` to the block theme generated skip link, so that block themes have a standardized target at the top of the `body` element.

Props philliproth, audrasjb, debarghyabanerjee, sabernhardt, joedolson, apermo.
Fixes #62311.
Built from https://develop.svn.wordpress.org/trunk@59559


git-svn-id: http://core.svn.wordpress.org/trunk@58945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-23 23:03:30 +00:00
audrasjb
b2654a664e Coding Standards: Fix a comment indentation issue in script-loader.php.
Follow-up to [58703].

Props mukesh27.
See #62279.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-23 22:09:24 +00:00
Sergey Biryukov
2a72efd451 Coding Standards: Use strict comparison in wpmu_validate_user_signup().
Follow-up to [14298], [19852].

Props debarghyabanerjee.
See #62283.
Built from https://develop.svn.wordpress.org/trunk@59557


git-svn-id: http://core.svn.wordpress.org/trunk@58943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-23 20:06:25 +00:00
Sergey Biryukov
097229b3ab Coding Standards: Use strict comparison in wp_handle_comment_submission().
Follow-up to [549], [1985], [2464], [2556], [2558], [34799], [40667].

Props deepakrohilla, narenin.
See #62316.
Built from https://develop.svn.wordpress.org/trunk@59556


git-svn-id: http://core.svn.wordpress.org/trunk@58942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-22 22:44:23 +00:00
joedolson
c05ab18981 Customizer: Allow custom accordion items with obsolete structure.
In [59224], customizer accordion item HTML structure was changed to include a `button` element as the interactive control. However, some themes inject custom markup for panel headings. 

Fix `controls.js` to handle both the new markup and the old markup, which is relatively common in themes.   

Props paullb, desrosj, sabernhardt, joedolson, jorbin.
Fixes #62494.
Built from https://develop.svn.wordpress.org/trunk@59555


git-svn-id: http://core.svn.wordpress.org/trunk@58941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-22 20:46:28 +00:00
audrasjb
988751f0bf I18n: Add translator context for various occurrences of "upload".
This changeset adds a `noun` or `verb` context to the various occurrences of "upload" in the admin, to make it easier for translators to differenciate these strings depending on the context.

Props timse201, wpgerd.
Fixes #62732.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-22 19:15:26 +00:00
audrasjb
ceb9b355bf Themes: Fix unwanted horizontal scrolling in theme details screen on mobile.
This changeset fixes an issue where the theme browser created unwanted horizontal scrolling on some mobile devices. The issue occured when viewing theme details on mobile.

Follow-up to [26142].

Props wildworks, abcd95, sainathpoojary, dhruvang21, sabernhardt.
Fixes #62411.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-22 08:36:23 +00:00
Sergey Biryukov
51a1a54a87 Help/About: Reorder release squad titles for some consistency in translation tools.
Follow-up to [59545].

See #62386.
Built from https://develop.svn.wordpress.org/trunk@59552


git-svn-id: http://core.svn.wordpress.org/trunk@58938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-21 23:16:24 +00:00
audrasjb
243c0cc59e Login and Registration: Adjust login form margins for better consistency.
This changeset addresses adjusts margins around the login form for visual consistency. The margin above and below the form is now consistently set to 24px, and the margin below the logo has also been adjusted to 24px.

Follow-up to [26072].

Props deeppatel8950, audrasjb, priyank9033, viralsampat, vijaysinh9094, sabernhardt, .
Fixes #61667.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-21 22:39:27 +00:00
audrasjb
8d89d471f0 Media: Fix margin issues on the Media file upload screen.
This changeset fixes an issue in the Media Library where icons or thumbnails of uploaded files were stuck to the border of their container after file upload.

Follow-up to [58279].

Props sukhendu2002, im3dabasia1, sainathpoojary, joedolson.
Fixes #62573.
See #60141.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-21 21:54:27 +00:00
audrasjb
f56f7a1ec6 Docs: Docblock improvements in .
Props shailu25.
Fixes #62730.
See #62281.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-21 17:23:24 +00:00
Sergey Biryukov
48eb68ca1e Docs: Update parameter type hints to include null for post thumbnail functions.
Follow-up to [12320], [12351], [20646], [32618], [34167], [34373], [37915].

Props apermo, jasonsa19.
Fixes #62720.
Built from https://develop.svn.wordpress.org/trunk@59548


git-svn-id: http://core.svn.wordpress.org/trunk@58934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-20 23:35:23 +00:00
Peter Wilson
1747403b13 Help/About: Add additional release squad titles to credits page.
Introduces translatable strings for additional [https://make.wordpress.org/core/handbook/about/release-cycle/wordpress-release-team-and-focus-leads/ release squad titles].

This is to allow improved acknowledgement of an individual's role in a release squad by enabling the use of these roles in the credits API going forward.

Props audrasjb, desrosj, jorbin, timse201, yogeshbhutkar.
Fixes #62386.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-19 21:56:26 +00:00
Peter Wilson
20621484e8 REST API: Protect against fatal error for post types without format support.
Ignore the `format` parameter introduced in WordPress 6.7 for post types that do not support post formats. This protects against a fatal error being thrown in later version of PHP or a warning in earlier versions of PHP.

Follow up to r59115.

Props dd32, sergeybiryukov, yogeshbhutkar.
Fixes #62646.
See #62014.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-19 21:43:24 +00:00
Bernhard Reiter
13521bce0b Block Hooks: Apply to synced patterns.
Apply Block Hooks to synced patterns (i.e. `core/block` instances).

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


git-svn-id: http://core.svn.wordpress.org/trunk@58929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-19 13:26:28 +00:00
Sergey Biryukov
87e7f72397 Docs: Add missing single quote in WP_User_Query::prepare_query() DocBlock.
Follow-up to [38715], [52226].

Props kkmuffme, mukesh27.
Fixes #62714.
Built from https://develop.svn.wordpress.org/trunk@59542


git-svn-id: http://core.svn.wordpress.org/trunk@58928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-19 10:24:23 +00:00
Sergey Biryukov
4210bfdbb2 Privacy: Replace hardcoded MD5 references in wp_credits_section_list().
The Credits API has been updated to return SHA-256 email hashes.

Follow-up to [59532], [meta14307].

Props haozi.
Fixes #62706, #60638.
Built from https://develop.svn.wordpress.org/trunk@59541


git-svn-id: http://core.svn.wordpress.org/trunk@58927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-19 03:44:24 +00:00
Peter Wilson
447e58166c External Libraries: Append .1 to react/react-dom versions.
Replaces the `-umd` appendage for the `react` and `react-dom` script versions with `.1`. This it to prevent issues with third party code expecting the version number in the form `/^[\d\.]+$/`.

Updates the version to tests in `Tests_Dependencies_Scripts::test_vendor_script_versions_registered_manually` to include the modified version used for cache busting.

Follow up to [59536], [58775].

Props azaozz, desrosj, peterwilsoncc.
Fixes #62422.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-19 03:09:23 +00:00
desrosj
5cb9ffc5ca External Libraries: Append a string to react/react-dom versions.
In 6.7, [58775] changed the way `react` and `react-dom` are bundled in Core. This commit resulted in some changes to the built files that are distributed in WordPress even though the actual version of the libraries remained the same.

The result can be a blank white screen when trying to edit a post when those two script files are heavily cached. This adds `-umd` to the end of the version number to properly purge caches until the next update to these libraries occurs.

Props levskipg, get_dave, smerriman, jdnd, juanwp22, seanlanglands, robertstaddon.
Fixes 62422.
Built from https://develop.svn.wordpress.org/trunk@59536


git-svn-id: http://core.svn.wordpress.org/trunk@58922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-18 18:51:25 +00:00
John Blackbourn
dfd4b20ea2 Build/Test Tools: Remove an unnecessary call to svn in a debugging step.
None of the steps in any of the workflows use svn, so this debugging step is unnecessary, and svn has been removed in the ubuntu-24.04 runner which will be rolling out to GitHub Actions imminently.

See #62221

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


git-svn-id: http://core.svn.wordpress.org/trunk@58920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-18 11:31:25 +00:00
Sergey Biryukov
f176b759f8 Coding Standards: Fix WPCS issues in get_avatar_data().
Follow-up to [59532].

See #60638.
Built from https://develop.svn.wordpress.org/trunk@59533


git-svn-id: http://core.svn.wordpress.org/trunk@58919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-18 00:25:29 +00:00
Sergey Biryukov
d427228024 Privacy: Use SHA-256 hashing algorithm for Gravatar.
This aims to improve privacy by switching to a more secure algorithm, as an MD5 string can be reversed.

Follow-up to [6748], [31107].

Props henry.wright, jucaduca, haozi, desrosj, dd32, SergeyBiryukov.
See #60638.
Built from https://develop.svn.wordpress.org/trunk@59532


git-svn-id: http://core.svn.wordpress.org/trunk@58918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 23:58:26 +00:00
desrosj
469695a82b Build/Test Tools: Document every matrix exclusion.
There should be inline documentation anytime a strategy matrix has an `exclude` combination configured so that contributors have proper context as to why it’s there.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 17:22:21 +00:00
desrosj
f9c3f86d5f Build/Test Tools: Update Default Theme devDependencies.
The `devDependencies` for all default themes with `package.json` files (Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One) are now updated to their latest versions with a few exceptions in Twenty Twenty-One:

- Upgrading `stylelint`/`@wordpress/stylelint-config` requires some work to address rule deprecations.
- `@wordpress/eslint-plugin` does not yet support `eslint` 9.x.

Additionally, `npm audit fix` has been run for each theme.
See #62220.
Built from https://develop.svn.wordpress.org/trunk@59530


git-svn-id: http://core.svn.wordpress.org/trunk@58916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 17:00:22 +00:00
desrosj
c647b6061a Build/Test Tools: Allow more control when testing older branches.
This adds an input to the Test Old Branches workflow that allows a specific branch to be specified or `all` to run all old branches.

The default behavior is to only test the currently supported version of WordPress as defined in the `CURRENTLY_SUPPORTED_BRANCH` environment variable.

Follow up to [59520].

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


git-svn-id: http://core.svn.wordpress.org/trunk@58915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 16:51:21 +00:00
desrosj
7b6d85e4ac Build/Test Tools: Regularly run the html-api-html5lib-tests.
In [58010], the external test suite from `html5lib` was imported to validate the tree-construction steps in the HTML Processor to ensure that they are behaving according to the HTML specification.

The test group was excluded by default because there are a high number of skipped tests. The number of skipped tests has come down, but the group does not need to be run on every job.

This introduces a new job in the PHPUnit workflow for regularly running these tests on their own using the changes in [59251[.

Props desrosj, jonsurrell, jorbin, dmsnell, costdev, chaion07, engahmeds3ed.
Fixes #61209.
Built from https://develop.svn.wordpress.org/trunk@59528


git-svn-id: http://core.svn.wordpress.org/trunk@58914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 16:40:22 +00:00
desrosj
0e72c10e41 Build/Test Tools: Use MySQL 8.4 as the default.
MySQL 8.4 is the latest LTS.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 14:45:22 +00:00
Pascal Birchler
9aa68357b0 Build/Test Tools: Fix version number when downgrading WP in performance tests.
The tagged version on GitHub requires the trailing `.0`, but `wp core update` doesn't accept a trailing zero.

Follow-up to [59525].

See #62148.
Built from https://develop.svn.wordpress.org/trunk@59526


git-svn-id: http://core.svn.wordpress.org/trunk@58912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 13:28:17 +00:00
Pascal Birchler
47a09521ea Build/Test Tools: Use correct tag name for the baseline version.
The tagged version on GitHub requires the trailing `.0`.

See #62148.
Built from https://develop.svn.wordpress.org/trunk@59525


git-svn-id: http://core.svn.wordpress.org/trunk@58911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 12:47:17 +00:00
Pascal Birchler
18a5d4b9be Build/Test Tools: Add Twenty Twenty-Five to the Performance Tests.
Updates the baseline used for the performance tests to 6.7, so that the theme is available in those test runs.

Props joemcgill, flixos90, desrosj, swissspidy.
Fixes #62148.
Built from https://develop.svn.wordpress.org/trunk@59524


git-svn-id: http://core.svn.wordpress.org/trunk@58910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 12:11:19 +00:00
Bernhard Reiter
1bf26605ca Block Hooks: Enable for post content.
Block Hooks were previously only applied to layout elements such as templates, template parts, patterns, and navigation menus -- things that are edited in the Site Editor.

This changeset enables Block Hooks in post content. The parity between frontend and editor is preserved: Blocks inserted by Block Hooks are visible both on the frontend and in the editor, and any customizations made by the user are respected on the frontend.

This is possible thanks to setting the `metadata.ignoredHookedBlocks` attribute on anchor blocks (a technique first introduced in [57594]). For first child and last child insertion into a Post Content block, the corresponding post object's `_wp_ignored_hooked_blocks` post meta is set.

Props bernhard-reiter, gziolo, jonsurrell, karolmanijak, leewillis77.
Fixes #61074.
Built from https://develop.svn.wordpress.org/trunk@59523


git-svn-id: http://core.svn.wordpress.org/trunk@58909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-17 10:37:22 +00:00
Sergey Biryukov
072c0afc53 Editor: Check get_user_count() instead of get_users() for the locked post notice.
This aims to avoid slowing down the post editing by using a cached value instead of calling `get_users()`, which can be slow when plugins add various filters to all `get_users()` calls, especially with meta value comparisons on large `user_meta` tables.

Follow-up to [24304], [24543], [41829], [53011], [53018].

Props berislav.grgicak, bor0, costdev.
See #55958.
Built from https://develop.svn.wordpress.org/trunk@59522


git-svn-id: http://core.svn.wordpress.org/trunk@58908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-16 23:51:25 +00:00
desrosj
2b5ee6e41c Build/Test Tools: Update the Codecov GitHub Action.
This updates the `codecov/codecov-action` to from version `4.6.0` to `5.1.1`.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-16 20:06:23 +00:00
desrosj
50aeb23800 Build/Test Tools: Support manual runs for the test old branch workflow.
This is the only workflow that does not currently support manually running.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-16 19:40:27 +00:00
desrosj
4fdd73689f Build/Test Tools: Update slackapi/slack-github-action.
This makes the necessary changes to update the Slack GitHub Action to the latest version, currently `2.0.0`.

Most notably this update provides more control over how attempts re retried when rate limiting is encountered.

Reverts [59209].

See #61701, #62221.
Built from https://develop.svn.wordpress.org/trunk@59519


git-svn-id: http://core.svn.wordpress.org/trunk@58905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-16 19:29:24 +00:00
Felix Arntz
f7d4ea3ceb Site Health: Remove use of deprecated function from wp_is_https_supported().
Follow up to [56664].

Props peter8nss, debarghyabanerjee, sebastienserre, geekofshire, swissspidy, desrosj.
Fixes #62252.
See #58494.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-16 14:08:24 +00:00
Sergey Biryukov
15f2879461 Tests: Clean up convert_smilies() tests.
Includes:
* Removing redundant `use_smilies` option switches, as it is set to 1 by default.
* Restoring the `$wpsmiliestrans` array before performing assertions, not after.
* Moving most of the `smilies_init()` calls to a `set_up()` method.

Follow-up to [409/tests], [26191], [28717].

See #62278.
Built from https://develop.svn.wordpress.org/trunk@59516


git-svn-id: http://core.svn.wordpress.org/trunk@58902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-15 23:24:23 +00:00
Sergey Biryukov
57e024a157 Formatting: Check the result of preg_split() in convert_smilies().
This aims to avoid a fatal error from `count()` when `preg_split()` fails on large input.

Includes:
* Optimizing the regular expression used to split the input by tags to avoid unlimited backtracking for better performance.
* Adjusting the function logic for better readability.

Follow-up to [340], [4380], [26191].

Props podpirate, nathkrill, rajinsharwar, dmsnell, bjorsch, q0rban, audrasjb, rupw, Ov3rfly, jorbin, nhrrob, chaion07, mcqueen22, azaozz, narenin, roybellingan, SergeyBiryukov.
See #51019.
Built from https://develop.svn.wordpress.org/trunk@59515


git-svn-id: http://core.svn.wordpress.org/trunk@58901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-14 23:53:24 +00:00
joedolson
cc3c3bf4e6 Comments: Avoid reverting comment reply when context menu is open.
Fix a bug where a comment reply would be discarded if `esc` was pressed to dismiss the context menu in Safari or Firefox.

Checks whether the contextmenu is open and ignores the `esc` key if it is.

Props yellowafterlife, yogeshbhutkar, joedolson.
Fixes #62346.
Built from https://develop.svn.wordpress.org/trunk@59514


git-svn-id: http://core.svn.wordpress.org/trunk@58900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-14 01:32:18 +00:00
audrasjb
880bce2ad5 Themes: Replace "Active" wording with "Installed" in the theme install checks page.
When reinstalling a theme by uploading a ZIP file, the wording used in some strings referred to the "active" theme even though it's not the currrently active theme. This changeset replaces these strings to refer to the "installed" theme, which is more accurate.

Follow-up to [52610], [52580].

Props afercia, ankitkumarshah, abcd95, yogeshbhutkar, parthvataliya, sainathpoojary, virgar, gaellebesson, nuryko, guillaumeturpin, maximemeganck, sabrineg.
Fixes #62603.
See #54831, #54770



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


git-svn-id: http://core.svn.wordpress.org/trunk@58899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 23:53:17 +00:00
Sergey Biryukov
afde562494 Coding Standards: Use strict comparison in get_blog_id_from_url().
Follow-up to [https://mu.trac.wordpress.org/changeset/1538 mu:1538].

Props debarghyabanerjee.
See #62283.
Built from https://develop.svn.wordpress.org/trunk@59512


git-svn-id: http://core.svn.wordpress.org/trunk@58898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 23:17:17 +00:00
joedolson
e25f6d7e2f Editor: Hide 'Skip to Editor' if editor not supported.
Wrap the classic editor 'Skip to Editor' link in a conditional to prevent it from rendering on post types that do not have editor support.

Props wildworks, parthvataliya, narenin, sainathpoojary, ankitkumarshah, parthvataliya, im3dabasia1.
Fixes #62623.
Built from https://develop.svn.wordpress.org/trunk@59511


git-svn-id: http://core.svn.wordpress.org/trunk@58897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 21:53:15 +00:00
joedolson
ac54a93332 Customize: Remove unnecessary height: 100% on accordion button.
Remove CSS that could occasionally trigger the accordion buttons to be 100% the height of the accordion container.

Props dhewercorus, im3dabasia1, sabernhardt, rvoigt, ghinamt, vishy-moghan, frankbiganski, redkite.
Fixes #62491.
Built from https://develop.svn.wordpress.org/trunk@59510


git-svn-id: http://core.svn.wordpress.org/trunk@58896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 21:10:20 +00:00
desrosj
26335af1ac Build/Test Tools: Update devDependencies.
This updates the following `devDependencies`:

- `dotenv` from `16.4.5` to `16.4.7`
- `dotenv-expand` from `11.0.6` to `12.0.1`
- `postcss` from `8.4.47` to `8.4.49`
- `qunit` from `2.22.0` to `2.23.1`
- `sass` from `1.79.4` to `1.79.6`
- `terser-webpack-plugin` from `5.3.10` to `5.3.11`
- `uglify-js` from `3.17.4` to `3.19.3`
- `uuid` from `9.0.1` to `11.0.3`
- `webpack` from `5.90.2` to `5.97.1`

Additionally, `npm audit fix` has been run.

Follow up to [58585].

See #62220.
Built from https://develop.svn.wordpress.org/trunk@59509


git-svn-id: http://core.svn.wordpress.org/trunk@58895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 19:06:24 +00:00
desrosj
4efa589165 Build/Test Tools: Trim down the upgrade testing matrix.
The upgrade testing workflow is currently at ~978 jobs spawned from the strategy matrix. While it's great to test all possible combinations, GitHub's UI cannot keep up with tracking that number of jobs, often taking 30-45 minutes to accurately report the outcome even though the jobs themselves all complete in under 5 minutes.

This is 2x the total number of concurrent jobs allowed for the entire organization (which creates a backlog and slows everything down even more).

This trims down the number of combinations included in the testing matrices to be a bit more thoughtful following the following methodology:

- The last two releases of WordPress are tested against all PHP and MySQL LTS version combinations and the most recent innovation release.
- The next 6 oldest versions of WordPress are tested against both the oldest and newest releases of PHP currently supported for both PHP 7 & 8 along with the oldest and newest MySQL LTS versions currently supported (no innovation releases).
- For the remaining versions of WordPress receiving security updates, they are only included if the database version was different that the previous major release.
- The oldest version of WordPress receiving security updates should always be tested against the same full list of combinations as the last two releases.

When choosing which MySQL versions to test against:

- Only the most recent innovation release should be included in testing.
- Even though MySQL >= 5.5.5 is currently supported, there are no 5.5.x Docker containers available that work on modern architectures.
- 5.6.x Docker containers are available and work, but 5.6 only accounts for ~2.3% of installs as of 12/6/2024.defaults:
- 5.7.x accounts for ~20% of installs, so this is used below instead.

With these changes, the total number of jobs is reduced by ~58%.

Props johnbillion, mukesh27.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59508


git-svn-id: http://core.svn.wordpress.org/trunk@58894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 15:34:14 +00:00
desrosj
d3d4603b99 Build/Test Tools: Remove repository specific logic from callable workflows.
Because reusable workflows could be called from any other repository in a variety of contexts, repository specific `if` conditions should not be present.

Instead, this logic should be included in the calling workflows only.

Props johnbillion.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59507


git-svn-id: http://core.svn.wordpress.org/trunk@58893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 14:59:14 +00:00
Sergey Biryukov
56f776835d Filesystem API: Check PHP_OS_FAMILY instead of php_uname() in PclZip.
The `php_uname()` function can be disabled on some hosts, in which case the call fails.

The `PHP_OS_FAMILY` constant indicates the operating system family PHP was built for, and is available as of PHP 7.2.0.

Reference: [https://www.php.net/manual/en/reserved.constants.php#constant.php-os-family PHP Manual: Predefined Constants: PHP_OS_FAMILY].

Follow-up to [6779], [57985], [58678], [58684].

Props daymobrew, costdev, desrosj.
Fixes #57711.
Built from https://develop.svn.wordpress.org/trunk@59506


git-svn-id: http://core.svn.wordpress.org/trunk@58892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-12 22:23:16 +00:00
Sergey Biryukov
caaf759d21 Docs: Correct formatting for script module data filter documentation examples.
Follow-up to [58579].

Props jonsurrell.
See #62281.
Built from https://develop.svn.wordpress.org/trunk@59505


git-svn-id: http://core.svn.wordpress.org/trunk@58891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-11 15:20:18 +00:00
Sergey Biryukov
d1058355a5 Twenty Twenty-Two: Fix PHPCS issues in functions.php.
* Inline comments must end in full stops, exclamation marks, or question marks.
* There must be exactly one blank line after the file comment.

Follow-up to [52081].

Props pitamdey, mukesh27.
Fixes #62648.
Built from https://develop.svn.wordpress.org/trunk@59504


git-svn-id: http://core.svn.wordpress.org/trunk@58890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-10 23:22:16 +00:00
gziolo
04a6ab1c8d HTML API: Remove nullable from get_breadcrumbs return type
Follow-up [58713]
Props jonsurrell, westonruter, gziolo.
Fixes #62674.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-10 11:41:16 +00:00
gziolo
70af002cdb HTML API: Prevent bookmarks from being set on virtual tokens
Fixes the issue when an HTML_Processor bookmark was set at a virtual token (a node in the resulting document that does not correspond to an HTML token present in the input string), seek behavior was unreliable.

Props jonsurrell, gziolo.
Fixes #62521.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-10 09:13:20 +00:00
Sergey Biryukov
cfb0b131dc REST API: Correct description for the humanized_updated block directory property.
Follow-up to [48242], [51676].

Props mujuonly, mukesh27.
Fixes #62667.
Built from https://develop.svn.wordpress.org/trunk@59501


git-svn-id: http://core.svn.wordpress.org/trunk@58887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-09 22:45:19 +00:00
gziolo
e8b5d1a702 HTML API: Step past closing HTML, BODY tags
The HTML specification does not close HTML or BODY tags (pop them off the stack of open elements) when their tag closers are encountered. The HTML processor correctly handled this behavior, however it incorrectly "paused" by returning true from the step functions. 

Props jonsurrell, dmsnell, gziolo.
Fixes #62583.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-09 12:44:17 +00:00
isabel_brison
833417c545 Editor: Update docblocks for wp_get_global_stylesheet and WP_Theme_JSON::get_stylesheet.
Updates docblocks to account for new use of the `custom-css` string in their `$types` parameters and adds information to deprecation of `wp_get_global_styles_custom_css`.

Props justlevine, isabel_brison, ramonopoly.
Fixes #62665.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-09 02:55:18 +00:00
Sergey Biryukov
f60edf3667 Coding Standards: Use strict comparison in wp-includes/comment-template.php.
Follow-up to [162], [2685], [4494], [8878], [8961], [55660].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59498


git-svn-id: http://core.svn.wordpress.org/trunk@58884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-08 23:43:21 +00:00
Sergey Biryukov
708282ecaf Coding Standards: Use strict comparison in media_upload_form_handler().
Follow-up to [10390].

Props deepakrohilla, iflairwebtechnologies, mukesh27, dingguodong, aristath.
Fixes #62009.
Built from https://develop.svn.wordpress.org/trunk@59497


git-svn-id: http://core.svn.wordpress.org/trunk@58883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-07 22:08:19 +00:00
Sergey Biryukov
c10dbc8434 Coding Standards: Use correct escaping function for wp_http_referer.
Follow-up to [58069].

Props yogeshbhutkar, sainathpoojary, PcTevree, knutsp, siliconforks, stromhalm, shanemuir.
Fixes #62551.
Built from https://develop.svn.wordpress.org/trunk@59496


git-svn-id: http://core.svn.wordpress.org/trunk@58882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-06 17:07:22 +00:00
Sergey Biryukov
ebce351835 Docs: Add missing @var tag for WP_Query::$query_vars_changed.
Follow-up to [17552].

Props marian1, jigar-bhanushali, martin.krcho, parthvataliya.
Fixes #62022.
Built from https://develop.svn.wordpress.org/trunk@59495


git-svn-id: http://core.svn.wordpress.org/trunk@58881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-05 22:05:20 +00:00
Pascal Birchler
03a5e578d8 I18N: Add new WP_Locale::get_month_genitive() method.
Complements existing helper methods such as `WP_Locale::get_month_abbrev()`.

Props ankitkumarshah, Tkama, SergeyBiryukov.
Fixes #58658.
Built from https://develop.svn.wordpress.org/trunk@59494


git-svn-id: http://core.svn.wordpress.org/trunk@58880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-05 21:37:20 +00:00
Pascal Birchler
c24a5b9062 Embeds: ensure correct thumbnail height.
Use height 0 instead of 9999 to avoid unnecessarily using the full size version.

Props colinleroy, swissspidy.
Fixes #62094.
Built from https://develop.svn.wordpress.org/trunk@59493


git-svn-id: http://core.svn.wordpress.org/trunk@58879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-05 21:21:17 +00:00
desrosj
61b026c27f Build/Test Tools: Introduce workflow for testing the local Docker environment.
While the PHPUnit workflow currently relies on the local Docker environment and provides some safety checks that the environment works as expected, this may not always be true and does not test all of the available commands related to the environment.

This introduces a basic workflow for testing the related scripts for the various supported combinations of PHP and database software with the environment to confirm everything is working as expected.

Ideally this would also be run on Windows and MacOS to catch platform specific bugs. Unfortunately, Docker is not supported within the GitHub Action runner images, so not all bugs will be caught by this workflow.

Props johnbillion, Clorith.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59492


git-svn-id: http://core.svn.wordpress.org/trunk@58878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-05 18:34:19 +00:00
desrosj
fb36f6223b Build/Test Tools: Support trunk as a version.
`trunk` is used interchangeably with `nightly`, so should be an accepted value when determining which version of WordPress is being tested.

Follow up to [59452], [59483].

Props johnbillion.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59491


git-svn-id: http://core.svn.wordpress.org/trunk@58877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-05 18:23:22 +00:00
desrosj
1784ccff5b Build/Test Tools: Use newer versions for include jobs.
The `include` part of the strategy for the PHPUnit testing workflow defines a few testing configurations outside of the matrix. The versions of PHP and MySQL used in these have not been updated for some time. This was mostly due to various incompatibilities that have since been resolved.

Props peterwilsoncc, johnbillion.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59490


git-svn-id: http://core.svn.wordpress.org/trunk@58876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-05 15:56:20 +00:00
desrosj
73353051af Build/Test Tools: Properly escape $ characters in Docker compose file.
This fixes an invalid interpolation format error that can be encountered in the `mysql` container’s healthcheck test command.

Follow up to [59484].

Props afercia.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59489


git-svn-id: http://core.svn.wordpress.org/trunk@58875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-05 15:37:17 +00:00
Pascal Birchler
cbca77642b Plugins: Load wp-admin/includes/plugin.php earlier.
Partially reverts [59479] and [59461], which previously tried to move some functions from `wp-admin/includes/plugin.php` to `wp-includes/functions.php` so they are available early, so that `get_plugin_data()` can be used.

However, other functions from that file are often used by plugins without necessarily checking whether they are available, easily causing fatal errors. Requiring this file directly is a safer approach to avoid such errors.

Props peterwilsoncc, dd32, swissspidy, johnbillion.
Fixes #62244.
Built from https://develop.svn.wordpress.org/trunk@59488


git-svn-id: http://core.svn.wordpress.org/trunk@58874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-05 12:13:17 +00:00
Sergey Biryukov
9c031458c8 Docs: Remove blank line at the end of wp_prepare_attachment_for_js() DocBlock.
Follow-up to [21680], [49281].

Props nareshbheda.
Fixes #62642.
Built from https://develop.svn.wordpress.org/trunk@59486


git-svn-id: http://core.svn.wordpress.org/trunk@58872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-04 23:38:17 +00:00
desrosj
6342cd3c2b Build/Test Tools: Run install tests when JSON reading workflow is changed.
Because the installation testing workflow relies on the reusable workflow that reads the JSON support files, it should be run when that file is changed to confirm there are no issues.

This is currently only configured for `pull_request` events, but should also be true for `push`.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-04 15:27:15 +00:00
desrosj
14ec385f12 Build/Test Tools: Support older MariaDB versions in local Docker environment.
Older versions of MariaDB did not contain the `mariadb-admin` command. This command is configured as the `healthcheck` used by the local Docker environment to confirm that the database container has successfully started and is reporting as “healthy”. The current result is a failure when starting the environment while using one of the affected older versions.

For MariaDB versions 10.3 and earlier, the `mysqladmin` command was used instead. Since WordPress still technically supports back to MariaDB 5.5, the local environment should support running these versions. This updates the environment configuration to take this into account when performing a `healthcheck` test.

The README file is also updated to reflect that the same workaround added in [57568] for MySQL <= 5.7 is required when using MariaDB 5.5 on an Apple silicon machine.

Props johnbillion.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59484


git-svn-id: http://core.svn.wordpress.org/trunk@58870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-04 15:18:19 +00:00
desrosj
99fb518290 Build/Test Tools: Add repository input to support JSON reading workflow.
`actions/checkout` will always checkout the current repository unless the `repository` input is specified. This updates the `reusable-support-json-reader-v1.yml` workflow to always default to reading the JSON files from `wordpress-develop`.

A `repository` has also been added to the workflow to allow a different set of JSON files to be read if desired.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-04 14:43:19 +00:00
Bernhard Reiter
859a39a5f9 Block Hooks: Fix context in update_ignored_hooked_blocks_postmeta.
Ensure that the `$context` arg passed from `update_ignored_hooked_blocks_postmeta` to `apply_block_hooks_to_content` (and from there, to filters such as `hooked_block_types` and `hooked_block`) has the correct type (`WP_Post`).

Filters hooked to `hooked_block_types` etc can typically include checks that conditionally insert a hooked block depending on `$context`. Prior to this changeset, a check like `if ( $context instanceof WP_Post )` would incorrectly fail, as `$context` would be a `stdClass` instance rather than a `WP_Post`. As a consequence, a hooked block inside of a Navigation post object that was modified by the user would not be marked as ignored by `update_ignored_hooked_blocks_postmeta`, and thus be erroneosly re-inserted by the Block Hooks algorithm.

Props bernhard-reiter.
Fixes #62639.
Built from https://develop.svn.wordpress.org/trunk@59482


git-svn-id: http://core.svn.wordpress.org/trunk@58868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-04 12:07:17 +00:00
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