Commit Graph

24445 Commits

Author SHA1 Message Date
audrasjb
f35df6f37a Build/Test Tools: Add tests for theme-related body classes.
This changeset adds new unit test cases following [59698].

Props sukhendu2002.
Fixes #19736.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-25 22:07:22 +00:00
audrasjb
601df51eb8 Help/About: Replace "Support" with "Support Forums" in import.php help tab.
This brings consistency with other admin screens.

Props Guido07111975, audrasjb, sabernhardt.
Fixes #63016.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-25 18:34:15 +00:00
Sergey Biryukov
4f774af5e8 Coding Standards: Use strict comparison in wp_transition_comment_status().
Follow-up to [9195].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-25 17:51:24 +00:00
Mamaduka
b2fdfe280c Editor: Add option to ignore sticky posts in Query block.
Introduce a new `ignore` value for the `sticky` query argument. When this value is used, the query will not prepend sticky posts at the top but display them in the natural order.

Props mamaduka, peterwilsoncc, audrasjb, mikinc860, poena, dhruvishah2203, joemcgill.
Fixes #62908.
Built from https://develop.svn.wordpress.org/trunk@59866


git-svn-id: http://core.svn.wordpress.org/trunk@59208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-25 05:12:23 +00:00
John Blackbourn
802523f5d7 Docs: Various improvements to inline documentation.
See #62281
Built from https://develop.svn.wordpress.org/trunk@59865


git-svn-id: http://core.svn.wordpress.org/trunk@59207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-24 13:43:23 +00:00
Sergey Biryukov
d685ee9b02 Docs: Correct DocBlock formatting for wp_check_comment_disallowed_list().
Follow-up to [6553], [48121], [48575].

See #62281.
Built from https://develop.svn.wordpress.org/trunk@59864


git-svn-id: http://core.svn.wordpress.org/trunk@59206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-24 07:07:16 +00:00
Sergey Biryukov
73276fe471 Docs: Correct DocBlock formatting for wp_check_comment_data().
Follow-up to [59319].

See #62281.
Built from https://develop.svn.wordpress.org/trunk@59863


git-svn-id: http://core.svn.wordpress.org/trunk@59205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-24 06:36:20 +00:00
Peter Wilson
b0e3290d7f Coding Standards: Rename variable in update_meta_cache() for accuracy.
Renames the variable `$cache_key` to `$cache_group` in `update_meta_cache()` for accuracy.

Follow up to [11943].
See #62279.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-23 21:53:26 +00:00
John Blackbourn
ecc9f15d4c Docs: Various improvements to inline documentation.
See #62281
Built from https://develop.svn.wordpress.org/trunk@59861


git-svn-id: http://core.svn.wordpress.org/trunk@59203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-23 11:11:21 +00:00
Sergey Biryukov
6b79b04807 Coding Standards: Use strict comparison in get_page_of_comment().
Follow-up to [9367], [9522], [9808].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-23 05:15:25 +00:00
audrasjb
8240259860 Site Health: Improve HTML semantics for tables used in Site Health debug tab.
This changeset removes the `presentation` role from the Site Health debug tab tables to switch them into regular data tables, and updates the related stylesheet to keep the previously used styles.

Props audrasjb, hbhalodia, rvouill, mukesh27, sabernhardt, joedolson, alexstine.
Fixes #62880.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-22 12:12:20 +00:00
Sergey Biryukov
80167f26b1 Docs: Correct the note on default nonce lifespan in wp_verify_nonce() description.
Follow-up to [31381], [45565].

Props lev0, Rarst, peterwilsoncc, johnbillion.
Fixes #53236.
Built from https://develop.svn.wordpress.org/trunk@59858


git-svn-id: http://core.svn.wordpress.org/trunk@59200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-22 01:50:19 +00:00
joedolson
2bd025464c Bundled Theme: A11y: Fix skip link in Twenty Ten.
Fix the source positioning of the skip link in Twenty Ten and add CSS for visibility on focus.

Props anonymized_3085, iammattthomas, joedolson, sabernhardt, shailu25, mukesh27, poena.
Fixes #14795.
Built from https://develop.svn.wordpress.org/trunk@59857


git-svn-id: http://core.svn.wordpress.org/trunk@59199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-22 01:38:24 +00:00
audrasjb
3dad409c39 TwentyTwentyOne: Add aria-controls attributes to primary sub-menu.
On the Twenty Twenty-One theme, this changeset adds `aria-controls` attribute to sub-menu buttons and an `id` to the sub-menu wrapper for additional context on what is being expanded.

Props bschneidewind, audrasjb, anandraj346.
Fixes #62973.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-22 00:30:22 +00:00
joedolson
39c764d2f8 Media: Support generating filenames without a suffix.
Add support handling an empty string in the `$suffix` parameter that allows a file name to be generated with no suffix added. This makes it possible to avoid adding irrelevant suffixes in cases like converting image formats.

Props azaozz, debarghyabanerjee, joedolson.
See #62359.
Fixes #62385.
Built from https://develop.svn.wordpress.org/trunk@59855


git-svn-id: http://core.svn.wordpress.org/trunk@59197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-21 20:25:24 +00:00
joedolson
690d904786 Themes: Support :focus-visible in theme.json.
Add the `:focus-visible` pseudo selector as a valid element in the `theme.json` schema. See also https://github.com/WordPress/gutenberg/pull/68521.

Props huubl, audrasjb, poena, sabernhardt, afercia, annebovelett. 
Fixes #62906.
Built from https://develop.svn.wordpress.org/trunk@59854


git-svn-id: http://core.svn.wordpress.org/trunk@59196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-21 16:48:22 +00:00
audrasjb
7f13d32bc2 Site Health: Improve fonts directory check.
This changeset enhances the filesystem checks in the Site Health debug data by addressing the following:
- Existence Check: Before checking if the fonts directory is writable, it first verifies whether the directory exists.
- Improved Messaging: If the fonts directory does not exist, the debug output now reflects this scenario as "Does not exist". If the directory exists, it shows whether it is writable or not.

Props zodiac1978, samiamnot, sainathpoojary, abcd95, ankitkumarshah, im3dabasia1.
Fixes #62633.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-21 14:52:24 +00:00
Sergey Biryukov
d8b45098da Coding Standards: Use strict comparison in wp_delete_comment().
Follow-up to [3271], [47219].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-21 00:35:22 +00:00
audrasjb
bbe792936c Bundled Themes: Prevent a fatal error occurring with Twenty Fourteen paginated navigation.
This changeset replaces `array_map( 'urlencode', $query_args )` with `urlencode_deep( $query_args )` in `twentyfourteen_paging_nav()` to prevent a fatal error when an array is provided in the query vars.

Props takayukister, pratiklondhe, rinkalpagdar.
Fixes #62972.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 23:32:23 +00:00
audrasjb
54734b4396 Administration: Capitalize "Edit Site" strings for consistency.
This changeset brings more consistency by capitalizing the "Edit Site" strings located in the Toolbar and on the Site Editor screen.

Props bronsonquick, sabernhardt, audrasjb, peterwilsoncc, adamsilverstein.
Fixes #62971.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 23:16:20 +00:00
audrasjb
20c3c4fdff Administration: Capitalize "Collapse Main Menu" aria-label string for better consistency.
Follow-up to [59847].

Props swissspidy.
Fixes #59133.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 21:29:22 +00:00
Aaron Jorbin
bb88b6a7f2 Build/Test: Fix JavaScript linting scripts
`wp-prettier` was out of date and no longer compatible with wp-scripts. Additionally, many generated files and plugins were not being properly ignored which could cause linting to take so long that it was basically unusable.

Props ankitkumarshah, jorbin.
See #62935.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 20:02:31 +00:00
audrasjb
535cb17cbb Administration: Capitalize "Collapse Menu" string for better consistency.
This changeset brings more consistency by capitalizing the "Collapse Menu" string localted in the main admin menu.

Props alireyad, bijit027, amimulihsanmahdi, csesumonpro.
Fixes #59133.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 15:05:23 +00:00
desrosj
d6db5ff0a8 Coding Standards: Properly space and indent ! defined() checks.
Props viralsampat shailu25, audrasjb.
Fixes #62750.
Built from https://develop.svn.wordpress.org/trunk@59846


git-svn-id: http://core.svn.wordpress.org/trunk@59188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 08:42:28 +00:00
Adam Silverstein
d9e9011369 Media: fix indentation for media.php.
Follow up to r59844.

Props: mukesh27.

See #62900.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 07:24:16 +00:00
Adam Silverstein
da8f997ab6 Media: fix full size image generation for PNG uploads.
Remove a limitation that prevented PNG uploads from generating the full sized image. Fixes a bug where using the image_editor_output_format filter would not generate full sized images as expected. The removed code was present to prevent overly large PNG image output, however this issue was resolved separately in #36477.

Props: adamsilverstein, pixlpirate, flixos90, mukesh27, azaozz.

Fixes #62900.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 06:46:19 +00:00
poena
4d8b360601 Twenty Ten: Correct the styling of the file block.
This change updates the padding, line height, and text color of the button in the file block,
so that the styling is not overriden by the link styles.

Props poena, sainathpoojary, mai21, parthvataliya, devtanbir, ankitkumarshah, sabernhardt, shailu25.
Fixes #62793.
Built from https://develop.svn.wordpress.org/trunk@59843


git-svn-id: http://core.svn.wordpress.org/trunk@59185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 06:10:23 +00:00
poena
a3d2826e61 Twenty Twelve: Update the quote pattern to use the quote block.
This change updates the Left-aligned Large Quote pattern to use the quote block instead of
paragraph blocks.

Props flairwebtechnologies, sabernhardt, karmatosed, wpeople, poena, nithins53, balub, sukhendu2002, dilip2615, itpathsolutions, shraddhagore, shailu25.
Fixes #61765.
Built from https://develop.svn.wordpress.org/trunk@59842


git-svn-id: http://core.svn.wordpress.org/trunk@59184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 05:40:24 +00:00
Sergey Biryukov
2c77ef11d2 Coding Standards: Use strict comparison in wp_new_comment_notify_postauthor().
Follow-up to [2894], [34106], [34250], [34545], [36119].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 03:19:24 +00:00
Sergey Biryukov
5f01118b48 Coding Standards: Use strict comparison in wp_new_comment_notify_moderator().
Follow-up to [2894], [34106], [34250], [34252], [35339].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-19 19:29:22 +00:00
johnjamesjacoby
21ba106dfb Block Hooks: Remove WP_Post type hint.
This change prevents a PHP deprecation notice in the new `apply_block_hooks_to_content_from_post_object()` function, introduced in r59838.

Fixes #62716.
Built from https://develop.svn.wordpress.org/trunk@59839


git-svn-id: http://core.svn.wordpress.org/trunk@59181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-19 17:14:23 +00:00
Bernhard Reiter
c5f7803d64 Block Hooks: Add function to encapsulate wrapping in ad-hoc parent.
Introduce a new function, `apply_block_hooks_to_content_from_post_object`, to colocate the logic used to temporarily wrap content in a parent block (with `ignoredHookedBlocks` information fetched from post meta) alongside the call to `apply_block_hooks_to_content`. Fetching that information from post meta is required for all block types that get their content from post objects, i.e. Post Content, Synced Pattern, and Navigation blocks.

Additionally, the newly introduced function contains logic to ensure that insertion of a hooked block into the `first_child` or `last_child` position of a given Post Content block works, even if that block only contains "classic" markup (i.e. no blocks).

Props bernhard-reiter, gziolo, mamaduka.
Fixes #61074, #62716.
Built from https://develop.svn.wordpress.org/trunk@59838


git-svn-id: http://core.svn.wordpress.org/trunk@59180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-19 14:52:22 +00:00
Felix Arntz
7529466125 General: Add speculative loading support via the Speculation Rules API.
This changeset adds support for the Speculation Rules API and configures it by default to `prefetch` certain links with an eagerness of `conservative`, leading to improved performance by starting to load URLs before the user lands on them.

The new `WP_Speculation_Rules` class is a container class representing the set of used speculation rules. By default, WordPress Core will only add a single speculation rule, which results in most links being prefetched conservatively.

The behavior of that main speculation rule can be altered by using the new `wp_speculation_rules_configuration` filter, which receives an associative array with `mode` and `eagerness` keys, or `null`. Both `mode` and `eagerness` have a default value of `auto`, which for now will result in the aforementioned behavior. The value `null` is used by default in certain scenarios such as when the current user is logged in. Developers can explicitly provide supported mode values (`prefetch` or `prerender`) and other supported eagerness values (`conservative`, `moderate`, or `eager`) to override and enforce the respective behaviors, or return `null` to disable speculative loading feature (either unconditionally or for certain situations). The Speculative Loading feature plugin for example, which this feature is based on, will make use of this filter to continue to use mode `prerender` and eagerness `moderate` by default. Developers can call the `wp_get_speculation_rules_configuration()` function to check how speculative loading is configured on the WordPress site.

Another important filter introduced is `wp_speculation_rules_href_exclude_paths`, which allows to expand the list of URL patterns that are excluded from being prefetched or prerendered per WordPress Core's main speculation rule configuration. Several URL patterns such `/wp-admin/*` (any URL within WP Admin) or `/*\\?(.+)` (any URL that includes query parameters) are already excluded by default. Plugins that use content that would be preferable not to prefetch or prerender can use the filter to provide corresponding URL patterns.

More advanced customization is possible by adding further speculation rules that will be loaded in addition to WordPress Core's main speculation rule. This can be achieved via the new `wp_load_speculation_rules` action, which receives the `WP_Speculation_Rules` class instance and can amend it as needed.

Props flixos90, westonruter, joemcgill, desrosj, mukesh27, tunetheweb, thelovekesh, adamsilverstein, swissspidy, domenicdenicola, jeremyroman.
Fixes #62503.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-18 22:32:22 +00:00
Sergey Biryukov
bbb8734811 Docs: Correct the type for the_modified_date filter parameter.
Due to concatenation directly above, this value can only be a string.

Follow-up to [28130], [48929].

See #62281.
Built from https://develop.svn.wordpress.org/trunk@59836


git-svn-id: http://core.svn.wordpress.org/trunk@59178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-18 08:04:23 +00:00
audrasjb
5c501993ef Uploads: Use the word-wrap-break-word instead of specific CSS on .upload-error-filename.
This changeset replaces the `word-break: break-all` CSS declaration added to the `.upload-error-filename` element with the common class `word-wrap-break-word`, for better maintainability.

Follow-up to [59834].

Props sabernhardt.
Fixes #62980.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 22:58:23 +00:00
audrasjb
8b93b4e988 Uploads: Fix media uploader styling issue for long filenames.
This changeset resolves an issue where long filenames in the media uploader modal would overflow their container. By adding `word-break: break-all;` to the `.upload-error-filename` class, filenames now properly break into multiple lines.

Props kharisblank, audrasjb, sainathpoojary.
Fixes #62980.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 22:01:24 +00:00
desrosj
5c8414f797 Build/Test Tools: Update 3rd party actions in new workflow files.
Follow up to [59749].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 21:08:22 +00:00
joedolson
9d1b85ac74 Accessibility: Globally update .screen-reader-text class.
Remove references to the obsolete style property `clip: rect(1px, 1px, 1px, 1px);` and replace or adapt to use `clip-path: inset(50%);`. Update associated `:focus` styles as appropriate. Remove prefixed instances of `-webkit-clip-path`.

Props afercia, hbhalodia, audrasjb, joedolson, sabernhardt. 
Fixes #62238.
Built from https://develop.svn.wordpress.org/trunk@59832


git-svn-id: http://core.svn.wordpress.org/trunk@59174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 17:49:20 +00:00
John Blackbourn
732c732e5f Security: Remove use of innerHTML in the the_block_template_skip_link() function.
There is no need to support HTML in this string and switching to `innerText` helps facilitate a more restrictive Content Security Policy.

Props micromadness, sabernhardt

Fixes #58765
Built from https://develop.svn.wordpress.org/trunk@59831


git-svn-id: http://core.svn.wordpress.org/trunk@59173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 16:25:19 +00:00
Pascal Birchler
1d6b7d6fe8 General: Fix force_ssl_admin() to always return bool.
Props pbearne, costdev, autotutorial, debarghyabanerjee, swissspidy.
Fixes #60023.
Built from https://develop.svn.wordpress.org/trunk@59830


git-svn-id: http://core.svn.wordpress.org/trunk@59172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 15:32:22 +00:00
Sergey Biryukov
2eb7a359e3 Docs: Correct formatting for get_the_date and get_the_time DocBlocks.
Follow-up to [53000].

See #62281.
Built from https://develop.svn.wordpress.org/trunk@59829


git-svn-id: http://core.svn.wordpress.org/trunk@59171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 13:13:22 +00:00
John Blackbourn
05770e25c3 Security: Switch to using bcrypt for hashing user passwords and BLAKE2b for hashing application passwords and security keys.
Passwords and security keys that were saved in prior versions of WordPress will continue to work. Each user's password will be opportunistically rehashed and resaved when they next subsequently log in using a valid password.

The following new functions have been introduced:

* `wp_password_needs_rehash()`
* `wp_fast_hash()`
* `wp_verify_fast_hash()`

The following new filters have been introduced:

* `password_needs_rehash`
* `wp_hash_password_algorithm`
* `wp_hash_password_options`

Props ayeshrajans, bgermann, dd32, deadduck169, desrosj, haozi, harrym, iandunn, jammycakes, joehoyle, johnbillion, mbijon, mojorob, mslavco, my1xt, nacin, otto42, paragoninitiativeenterprises, paulkevan, rmccue, ryanhellyer, scribu, swalkinshaw, synchro, th23, timothyblynjacobs, tomdxw, westi, xknown.

Additional thanks go to the Roots team, Soatok, Calvin Alkan, and Raphael Ahrens.

Fixes #21022, #44628
Built from https://develop.svn.wordpress.org/trunk@59828


git-svn-id: http://core.svn.wordpress.org/trunk@59170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 11:24:21 +00:00
Sergey Biryukov
1422cf9d49 Coding Standards: Use strict comparison in pingback().
Follow-up to [2983], [38852].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-16 18:35:24 +00:00
Sergey Biryukov
6c1001fb95 Coding Standards: Use strict comparison in wp_get_comment_status().
Follow-up to [546], [2258], [5666], [47219], [47808].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-15 02:33:23 +00:00
joedolson
2a72568db4 Customize: Accessibility: Restore heading semantics in sections.
Remove `role="presentation"` from headings in the customizer. These were needed to avoid confusing semantics when the headings also acted as buttons to control accordions, changed in [59924].

Change responsive CSS to use `screen-reader-text` styling rather than `display: none` so that mobile retains the headings hierarchy.

Props joedolson, hbhalodia, mikinc860, guillaumeturpin, rcreators, tirth03, dhrumilk . 
Fixes #62215.
Built from https://develop.svn.wordpress.org/trunk@59825


git-svn-id: http://core.svn.wordpress.org/trunk@59167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-14 20:34:21 +00:00
John Blackbourn
3e096ce984 Cron API: Introduce the wp_next_scheduled filter which allows overriding the timestamp for the next scheduled event for the given hook.
This change also standardises some descriptions of the timestamp field used in various functions.

Props infosatech, peterwilsoncc

Fixes #52655
Built from https://develop.svn.wordpress.org/trunk@59824


git-svn-id: http://core.svn.wordpress.org/trunk@59166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-14 19:37:24 +00:00
Felix Arntz
47efd20a71 Editor: Introduce wp_should_load_block_assets_on_demand() with filter 'should_load_block_assets_on_demand'.
This function and filter complement the existing `wp_should_load_separate_core_block_assets()` with filter `'should_load_separate_core_block_assets'`, which until now was responsible for two different purposes:
1. Loading separate stylesheets for Core blocks, instead of a combined `wp-block-library` stylesheet (as the name indicates).
2. Loading block scripts and stylesheets on demand only if the blocks are included in the page (not indicated by the name).

The new function and filter handles exclusively the 2nd purpose, making it possible to individually adjust both behaviors. For backward compatibility, the return value of `wp_should_load_separate_core_block_assets()` is used as the filterable default for `wp_should_load_block_assets_on_demand()`. Yet, the two filters can now be individually be controlled: For example, a site owner that wants to keep loading the combined `wp-block-library` stylesheet can now do so without giving up on the ability to load block scripts and stylesheets on demand.

Block themes now opt in by default to both features, similar to how they were already doing before via just the one filter. This way, block themes that opt out of loading separate stylesheets for Core blocks will still benefit from loading block scripts and stylesheets on demand, which in the case of block themes is strongly recommended.

Props fabiankaegy, flixos90, gziolo.
Fixes #61965.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-14 18:38:21 +00:00
Sergey Biryukov
c5cc9402b4 Tests: Correct failure messages for some tests.
Follow-up to [54176], [57548], [58328].

Props poena, SergeyBiryukov.
See #62280.
Built from https://develop.svn.wordpress.org/trunk@59822


git-svn-id: http://core.svn.wordpress.org/trunk@59164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-14 10:36:22 +00:00
joedolson
1a94942585 Themes: Allow use of sidebar submenus when theme details open.
Increase the z-index of sidebar submenus in the theme browser screens so that submenus are not placed behind the theme details overlay. Also set a min-height to ensure the overlay covers the entire screen if content is short.

Props codexdemon, amolebonde, yahil, girishpanchal, chintanmachhi207, mp518, janak007, worldweb, ralessio, sabernhardt, boogah, mikinc860, adamsilverstein, subrataemfluence, huzaifaalmesbah, lakshmananphp, amin7, imranhasanraaz, mdibrahimk48. 
Fixes #41155.
Built from https://develop.svn.wordpress.org/trunk@59821


git-svn-id: http://core.svn.wordpress.org/trunk@59163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-13 23:52:17 +00:00
Peter Wilson
ef3aea6dff Tests: Rename rest-api group to restapi for consistency.
Rename the group in `tests/phpunit/tests/rest-api/wpIsRestEndpoint.php` to `restapi` for consistency with the group name used by other REST API related tests.

Follow up to [57312].

See #62280.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-13 23:44:23 +00:00
Sergey Biryukov
7244fe456e Editor: Add title and description to post format archive block templates.
Follow-up to [52062], [52331], [55500].

Props poena, rinkalpagdar, im3dabasia1, parthvataliya, ruchirj, praful2111.
Fixes #62326.
Built from https://develop.svn.wordpress.org/trunk@59819


git-svn-id: http://core.svn.wordpress.org/trunk@59161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-13 20:31:28 +00:00
Felix Arntz
19f101215e Pings/Trackbacks: Add return value to pingback().
This facilitates debugging and better response / error handling, among other things.

Props audrasjb, coquardcyr, dshanske, ironprogrammer, NathanAtmoz, pbearne, shulard, soulseekah.
Fixes #38197.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-12 23:45:25 +00:00
spacedmonkey
ec604f4ae0 Users: Add caching to count_user_posts function
Introduced caching for the `count_user_posts` function to reduce redundant database queries. This ensures better performance by storing and reusing query results when possible. Additionally, sanitized and sorted the `$post_type` array to avoid invalid queries.

Props spacedmonkey, peterwilsoncc, mamaduka, flixos90, johnjamesjacoby, swissspidy, dilip2615, johnregan3, wpgurudev, desrosj, milindmore22, Krstarica, dilipom13.
Fixes #39242.
Built from https://develop.svn.wordpress.org/trunk@59817


git-svn-id: http://core.svn.wordpress.org/trunk@59159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-12 21:50:28 +00:00
Sergey Biryukov
9724765081 Coding Standards: Correct default values in WP_Post to match the documented type.
Follow-up to [22264], [25086].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-12 18:11:25 +00:00
John Blackbourn
936cc23ca5 Build/Test Tools: Add a workflow that tests the process of upgrading WordPress to a build of the current branch.
This complements the existing workflow which tests upgrading to an already released version.

Props johnbillion, peterwilsoncc, mukesh27, desrosj, audrasjb, joemcgill.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-12 15:01:24 +00:00
Peter Wilson
2766df98d2 Editor: Fix complex variation selectors when using selectors API.
Fixes a bug in the manipulation of selectors for block style variations that would result in an incorrect selector and fail to match the appropriate elements on the frontend.

Props aaronrobertshaw, ramonopoly, joemcgill.
Fixes #62471.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-12 03:40:23 +00:00
audrasjb
737185823f Themes: Avoid double hashed value for background-color in custom backgrounds.
This changeset replaces the hardcoded hash symbol with running `maybe_hash_hex_color()` on the full `background-color` value provided via the custom background feature, so the hash is only added if it is needed. By doing so, if a theme developer sets a background color value that uses a hash (#), WordPress won't add an additional hash anymore when outputting the relevant CSS. Duplicate hash symbols (##) can break CSS background color declarations.

Props hovhanneshovakimyan, joyously, poena, 
Fixes #40057.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-11 21:06:25 +00:00
Weston Ruter
08c4498647 HTML API: Stop counting no-op seek operations against the max seek count.
This allows `seek()` to be freely called when the current cursor at the provided bookmark.

Props dmsnell, jonsurrell, westonruter.
Fixes #62085.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-11 20:04:23 +00:00
desrosj
5f79466650 Bundled Themes: Bump version of Twenty Twenty-Five to 1.1.
Fixes #62943.
Built from https://develop.svn.wordpress.org/trunk@59809


git-svn-id: http://core.svn.wordpress.org/trunk@59151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-11 16:56:24 +00:00
davidbaumwald
40d50ca185 General: Remove duplicate type="button" attribute from the "Change|Choose Site Icon" button.
Introduced in [57602].

Props kkmuffme, audrasjb.
Fixes #62942.
Built from https://develop.svn.wordpress.org/trunk@59806


git-svn-id: http://core.svn.wordpress.org/trunk@59148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-11 15:57:21 +00:00
Sergey Biryukov
0909a94115 Coding Standards: Correct default values in WP_Comment to match the documented type.
Follow-up to [33891], [48941].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-11 13:40:30 +00:00
John Blackbourn
47fe3123b4 Security: Delete a test file that was missed in [59803].
Props swissspidy.

See #60638, #62815, #56017
Built from https://develop.svn.wordpress.org/trunk@59804


git-svn-id: http://core.svn.wordpress.org/trunk@59146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-11 12:18:23 +00:00
John Blackbourn
bb832dcfef Security: Explicitly require the hash PHP extension and add requirement checks during installation and upgrade.
This extension provides the `hash()` function and support for the SHA-256 algorithm, both of which are required for upcoming security related changes. This extension is almost universally enabled, however it is technically possible to disable it on PHP 7.2 and 7.3, hence the introduction of this requirement and the corresponding requirement checks prior to installing or upgrading WordPress.

Props peterwilsoncc, ayeshrajans, dd32, SergeyBiryukov, johnbillion.

Fixes #60638, #62815, #56017

See #21022
Built from https://develop.svn.wordpress.org/trunk@59803


git-svn-id: http://core.svn.wordpress.org/trunk@59145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-11 11:14:21 +00:00
Peter Wilson
9f83001243 Global Styles: Improve sanitization of block variation styles.
Fixes an issue where block style variations containing inner block type and element styles would have those inner styles stripped when the user attempting to save Global Styles does not have the `unfiltered_html` capability.

Props aaronrobertshaw, mukesh27, andrewserong.
Fixes #62372.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 22:29:22 +00:00
Peter Wilson
d4822bd3c5 REST API: Add support for the ignore_sticky_posts argument.
Introduce `ignore_sticky` as a boolean argument for the posts endpoint for requests without the sticky posts being stuck. The new argument defaults to `false` with the value of the argument passed to `WP_Query`'s `ignore_sticky_posts` parameter.

Props audrasjb, danielbachhuber, joemcgill, johnbillion, jorbin, mamaduka, rmccue.
Fixes #35907.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 22:23:23 +00:00
John Blackbourn
0ac2a96887 Administration: Correct the capitalisation of "site administrator" for consistency with other instances within WordPress.
Follow-up to [59799].

Props ocean90

Fixes #48879
Built from https://develop.svn.wordpress.org/trunk@59800


git-svn-id: http://core.svn.wordpress.org/trunk@59142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 17:06:23 +00:00
John Blackbourn
e1c2d3f420 Administration: Remove a potentially incorrect addressee and improve the phrasing used in the confirmation email when a user attempts to change the administration email address.
Props MadtownLems, ilovecats7, rehanali, iflairwebtechnologies, thehercules

Fixes #48879
Built from https://develop.svn.wordpress.org/trunk@59799


git-svn-id: http://core.svn.wordpress.org/trunk@59141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 15:31:22 +00:00
John Blackbourn
cf4686e4b6 Cron API: Clear the recovery_mode_clean_expired_keys cron event when converting a single site installation to Multisite.
This cron event is not used when Multisite is in use.

Props debarghyabanerjee, johnbillion, narenin

Fixes #61450
Built from https://develop.svn.wordpress.org/trunk@59798


git-svn-id: http://core.svn.wordpress.org/trunk@59140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 15:01:23 +00:00
desrosj
caaf76b11e Build/Test Tools: Remove matchdep as a dependency.
`matchdep` was introduced in [25243] to more easily manage `grunt-*` dependencies. The package has effectively been abandoned upstream, and the functionality can be replaced with a simple loop.

Props desrosj, spacedmonkey, swissspidy.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59797


git-svn-id: http://core.svn.wordpress.org/trunk@59139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 14:30:26 +00:00
Sergey Biryukov
b87e7301ad Coding Standards: Use strict comparison in WP_Query::the_comment() and ::have_comments().
Follow-up to [4934].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 10:51:25 +00:00
Peter Wilson
096c95390c Editor: Preload Global Styles REST requests based on user permissions.
For the Post Editor, preload '/wp/v2/global-styles/' . $global_styles_id with a context corresponding to user caps, that is, 'edit' for users that can edit global styles, and 'view' for everyone else.

Preloading the global styles endpoint according to role context means that admins and non admins, e.g., editors, avoid unnecessary client side requests.

Props ramonopoly.
Fixes #62322.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 03:56:23 +00:00
Peter Wilson
e92abc0735 Site Editor: Redirect deprecated URLs to path based routing.
The site editor now uses path based routing rather than query string arguments. This redirects the legacy query string URLs to the new routing.

Props youknowriad, peterwilsoncc, joemcgill, mukesh27, poena.
Fixes #62585.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 02:40:23 +00:00
Peter Wilson
c101e1b5b2 Editor: Update enqueued styles in the editor.
Updates the enqueued styles in various editors to remove target styles more precisely to where they are needed.

Removes the following stylesheets as dependencies of `wp-edit-blocks`:

* `wp-editor`
* `wp-reusable-blocks`
* `wp-patterns`

The `wp-editor` stylesheet is targeted to the items requiring the CSS:

* `edit-widgets`
* `customize-widgets`
* `edit-site`

Props ellatrix, youknowriad.
Fixes #62266, #62274.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-09 22:34:23 +00:00
Sergey Biryukov
770eb818a4 Coding Standards: Use strict comparison in WP_Query::the_post() and ::have_posts().
Follow-up to [2716], [2741], [11464].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-09 18:51:21 +00:00
audrasjb
fdb545356c Administration: Replace missed references of "Add New" in WP_Post_Type class.
Follow-up to [59784], [59786].

Fixes #61219.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-09 11:09:21 +00:00
audrasjb
6309ca8f17 General: Error messages improvements in /wp-includes files.
This changeset improves a bunch of error messages, notably replacing the good old cryptic "Something went wrong" message with more helpful information.

Props peterwilsoncc, netweb, karmatosed, JoshuaWold, mrtortai, audrasjb, sukhendu2002, joedolson.
Fixes #43622.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-08 16:00:19 +00:00
audrasjb
c5293a0be9 Administration: Error messages improvements in WP Admin.
This changeset improves a bunch of WP-Admin error messages, notably replacing the good old cryptic "Something went wrong" message with more helpful information.

Props peterwilsoncc, netweb, karmatosed, JoshuaWold, mrtortai, audrasjb, sukhendu2002, joedolson.
See #43622.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-08 15:53:17 +00:00
Sergey Biryukov
d76c427a42 Coding Standards: Use strict comparison in WP_Query::is_page() and ::is_single().
Follow-up to [29039].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-08 15:32:24 +00:00
audrasjb
342c3037df Docs: Fix Docblock parameters indentation for wp_determine_option_autoload_value(), as per WP Docs standards.
See #62281.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-08 15:11:20 +00:00
audrasjb
22549e4550 Bundled Themes: Replace references to "Add New" theme screen in bundled themes readme files.
Follow-up to [59784].

Props jameskoster, audrasjb, ntsekouras, afercia, peterwilsoncc, youknowriad, joedolson, sukhendu2002, jdy68, beryldlg, fxbenard.
Fixes #61219.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-08 12:14:19 +00:00
audrasjb
ad6af7aaa9 Docs: Various Docblock fixes in wp-includes/class-wp-customize-control.php, as per WP Docs standards;
See #62281.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-08 12:00:19 +00:00
audrasjb
1498d000ba Administration: Replace "Add New {Item}" wording with "Add {Item}" across the administration.
This changeset replaces each occurrence of "Add New {Item}" label with "Add {Item}" in WordPress administration, to make the interface more consistent and simplify the translation effort.

Props jameskoster, audrasjb, ntsekouras, afercia, peterwilsoncc, youknowriad, joedolson, sukhendu2002, jdy68, beryldlg, fxbenard.
See #61219.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-08 11:44:24 +00:00
desrosj
065a43f68d General: Introduce polyfills for new array related functions in PHP 8.4.
PHP 8.4 introduced four new functions to provide a common way to more easily perform common operations on arrays.

- `array_find()`: https://www.php.net/manual/en/function.array-find.php
- `array_find_key()`: https://www.php.net/manual/en/function.array-find-key.php
- `array_all()`: https://www.php.net/manual/en/function.array-all.php
- `array_any()`: https://www.php.net/manual/en/function.array-any.php

These functions are now polyfilled making them available on all supported versions of PHP (currently 7.2+).

Props Soean, swissspidy, TobiasBg, ayeshrajans, mukesh27, joemcgill.
Fixes #62558.
Built from https://develop.svn.wordpress.org/trunk@59783


git-svn-id: http://core.svn.wordpress.org/trunk@59125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-07 18:54:22 +00:00
Joe McGill
da8fd1d079 Editor: Add remaining query block file.
This is a follow-up to [59776] and [59775] to add yet another file that was missed in the original commit.

See #62887.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-07 16:06:20 +00:00
Joe McGill
da78d523ec Editor: Add query-total block files.
This is a follow-up to [59775] to add new files that were missed in the original commit.

See #62887.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-07 15:58:19 +00:00
Joe McGill
abb9c19aae Editor: Update packages for 6.8 pre-Betas.
Syncs @wordpress/* packages to the 'latest' npm tag.

Props mamaduka, joemcgill, youknowriad, swissspidy, sergiomdgomes, gziolo.
See #62887.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-07 15:46:48 +00:00
Sergey Biryukov
aa804df692 Coding Standards: Use strict comparison in wp_get_archives().
Follow-up to [24], [114].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-07 15:08:23 +00:00
Joe McGill
c7db6678d7 Post Thumbnails: Fix squashed featured image in wp-admin.
This updates the CSS for featured images in the classic editor that caused images to look skewed when auto-sizes are enabled.

Props maciejmackowiak, sainathpoojary, mukesh27, joemcgill.
Fixes #62597.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-07 14:36:23 +00:00
joedolson
dd3d84dfbc General: Add styles for extender usage of do_accordion_section().
Follow up to [59224]. Add CSS to cover usage of the `do_accordion_section()` function when used in extender contexts outside of the existing WordPress core usage.

Props mboynes, jorbin, joemcgill, joedolson. 
Fixes #62907.
Built from https://develop.svn.wordpress.org/trunk@59772


git-svn-id: http://core.svn.wordpress.org/trunk@59114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-06 22:26:24 +00:00
Peter Wilson
55f06e4f34 Query: Add since annotation to WP_Query::$query_cache_key.
Follow up to [59766].

Props mukesh27.
See #59516.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-06 20:58:23 +00:00
desrosj
16bc9210d6 External Libraries: Remove stray Unicode character in moxie.js
This fixes a `ReferenceError` caused by a stray Unicode character in the unminified version of moxie.js. This has long been fixed upstream but the library cannot be wholesale updated in WordPress because of an incompatible license change.

Because of this, a new version is being tagged, `1.3.5.1`, and the file header has been updated to make it more clear that the file is a maintained fork with a high level list of changes made.

Props kinggmobb, jorbin, q0rban, azaozz, desrosj, sukhendu2002.
Fixes #59329.
Built from https://develop.svn.wordpress.org/trunk@59770


git-svn-id: http://core.svn.wordpress.org/trunk@59112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-06 18:29:22 +00:00
desrosj
da65b76f52 Import: Remove Importer plugin related unit tests.
The WordPress Importer plugin has been maintained separately in a repository on GitHub since 2016. However, the unit tests were left in wordpress-develop due to the lack of a CI setup on GitHub.

With GitHub Actions set up for the plugin repository, these tests are now running in two locations. Because they are more relevant to the plugin itself, the tests have been synced, will run weekly through a `schedule` event, and are now being removed from wordpress-develop.

The only remaining test method in the `import` group covers `get_importers()`, which is a function maintained in WordPress Core itself.

Props frank-klein, netweb, dd32, peterwilsoncc, azaozz, desrosj, swissspidy.
Fixes #42668.
Built from https://develop.svn.wordpress.org/trunk@59769


git-svn-id: http://core.svn.wordpress.org/trunk@59111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-06 17:53:20 +00:00
desrosj
1da5ba567f Build/Test Tools: Configure UglifyJS to preserve previous behavior.
As of UglifyJS >= 3.18.0, the default behavior is to process input as an ES module. This updates the relevant configurations to ensure the build process continues to use the previous behavior to avoid JavaScript errors in the minified versions of files.

Follow up to [58563], [58586], and [59509].

Props siliconforks, nataliat2004, poena, mai21, SergeyBiryukov.
Fixes #62767. See #61519, #62220.
Built from https://develop.svn.wordpress.org/trunk@59768


git-svn-id: http://core.svn.wordpress.org/trunk@59110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-06 17:27:26 +00:00
Sergey Biryukov
f548f56548 Coding Standards: Use strict comparison in media_upload_library_form().
Includes bringing some consistency with a similar fragment in `WP_List_Table::months_dropdown()`.

Follow-up to [3724], [7062], [15491], [59755].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-06 12:24:24 +00:00
Peter Wilson
38025026ac Query: Increase WP_Query cache hits for equivalent arguments.
Introduces normalization a number of arguments passed to `WP_Query` to increase cache hits for equivalent requests. For example `author__in => [ 1, 2 ]` and `author__in => [ 2, 1 ]` will now hit the same cache.

Prior to generating the SQL request and cache key, the following are sorted, made unique and type cast as appropriate.

* `post_type` when passed as an array
* `post_status` when passed as an array
* `term_query`s containing `terms`
* `cat`
* `category__in`
* `category__not_in`
* `category__and`
* `tag_slug__in`
* `tag__in`
* `tag__not_in`
* `tag__and`
* `tag_slug__in`
* `tag_slug__and`
* `post_parent__not_in`
* `author`
* `author__not_in`
* `author__in`

The following are sorted for the purposes of generating the cache key and SQL `WHERE` clause but unmodified for use in the `ORDER BY` SQL clause:

* `post_name__in`
* `post__in`
* `post_parent__in`

This commit includes changes to unrelated tests, assertions in  `Tests_Query_ParseQuery::test_parse_query_cat_array_mixed()` and `WP_Test_REST_Posts_Controller::test_get_items_not_sticky_with_exclude()` have been modified to account for the sorting of the items above.

Props thekt12, peterwilsoncc, spacedmonkey, joemcgill, flixos90, mukesh27, pbearne, swissspidy.
Fixes #59516.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-06 05:04:24 +00:00
Sergey Biryukov
99ef157227 Docs: Update comments in wp-includes/formatting.php per the documentation standards.
Follow-up to [1345], [8662], [8786], [33624], [34761].

Props kapasias, ankitkumarshah, swissspidy, peterwilsoncc.
Fixes #62885.
Built from https://develop.svn.wordpress.org/trunk@59765


git-svn-id: http://core.svn.wordpress.org/trunk@59107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-05 23:53:25 +00:00
Mamaduka
5b8a20d134 Editor: Fix parents argument validation for Query block.
Allow passing zero (`0`) via the `parents` argument. It is a valid value for hierarchical post types, often used to display top-level items.

Props mamaduka, audrasjb, peterwilsoncc.
Fixes #62901.
Built from https://develop.svn.wordpress.org/trunk@59761


git-svn-id: http://core.svn.wordpress.org/trunk@59103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-04 09:01:17 +00:00
audrasjb
e1877c1c42 Editor: Add a fallback to WP_Block_Styles_Registry if the label is missing.
Both `name` and `label` properties are required when registering a block style. If the label is missing, assign `name` as the value for the `label`, to ensure the property is defined. This avoids a PHP warning in such case.

Props poena, Rahmohn, aaronrobertshaw, audrasjb, rinkalpagdar.
Fixes #52592.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-04 08:42:25 +00:00
Sergey Biryukov
7975d2c6c3 Docs: Correct DocBlock formatting for the_password_form filter.
Follow-up to [59736], [59737].

See #62281.
Built from https://develop.svn.wordpress.org/trunk@59756


git-svn-id: http://core.svn.wordpress.org/trunk@59098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-04 00:32:23 +00:00
Sergey Biryukov
6e0285406d Coding Standards: Use a more meaningful variable name in WP_List_Table::months_dropdown().
As per the [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#naming-conventions Naming Conventions]:
> Don't abbreviate variable names unnecessarily; let the code be unambiguous and self-documenting.

Follow-up to [8646], [15491].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-03 23:43:21 +00:00