49920 Commits

Author SHA1 Message Date
Isabel Brison
e711c50896 Editor: Read theme.json files stored in styles/ folder only once.
Uses `read_json_file` to access cached file if it exists instead of using `wp_json_file_decode` directly.

Props oandregal, aaronrobertshaw, joemcgill, ramonopoly, isabel_brison.
See #61451.


git-svn-id: https://develop.svn.wordpress.org/trunk@58428 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-18 06:00:51 +00:00
Colin Stewart
b64d24621e Taxonomy: Remove unused $term_ids in wp_set_object_terms().
In [5983], a call to `clean_term_cache()` was removed from `wp_set_object_terms()`. Since then, the `$term_ids` array that had been populated inside one of the `foreach` loops before being passed to the removed `clean_term_cache()` call has not been used.

This change removes the unused `$term_ids` variable.

Follow-up to [5983].

Props dlh, mukesh27.
Fixes #61456.

git-svn-id: https://develop.svn.wordpress.org/trunk@58427 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-18 04:10:58 +00:00
Sergey Biryukov
38c61679d9 Twenty Seventeen: Correct image height for the Site Logo block.
Includes removing box shadow when the “Link image to home” setting is enabled.

Follow-up to [43800].

Props sabernhardt, nkeller15, karmatosed, hmbashar, rajinsharwar, huzaifaalmesbah, shailu25.
Fixes #58474.

git-svn-id: https://develop.svn.wordpress.org/trunk@58426 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-17 18:29:24 +00:00
Tonya Mork
8ef0b8511e Code Modernization: Fix 'ping_sites' non-nullable deprecation.
When saving options from the Settings page, include the `'ping_sites'` option in the allowed "writing" options list only when the `'blog_public'` option is `'1'`.

Fixes a PHP 8.1 and above "null to non-nullable" deprecation notice in `sanitize_option()` ([https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php?annotate=blame#L4952 which happens when here] as part of [22255]):

{{{
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in .../wp-includes/formatting.php
}}}

**Explanation**

[https://developer.wordpress.org/apis/options/#writing Per the documentation], the `ping_sites` option requires the `'blog_public'` option to have a value of `'1'` and must be a `string` data type. `null` is not valid for this option.

The relationship between the 2 options shows itself in the `options-writing.php` code ([https://core.trac.wordpress.org/browser/tags/6.5.4/src/wp-admin/options-writing.php#L233 shown here] and in [4326]), as the `textarea#ping_sites` only renders when `'1' === get_option( 'blog_public' )`.

**What happens if `'blog_public'` is not `'1'`?**

The `'ping_sites'` option will not be a field on the page. Upon saving:

* HTTP POST (`$_POST`) does not include `'ping_sites'`. 
* Before this commit:
   * The [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/options.php#L333 option's value was set to] `null` before being passed to `update_option()`. 
   * `update_option()` invokes `sanitize_option()`.
   * A `null` value for the `'ping_sites'` case was passed to `explode()`, which threw a deprecation notice on PHP 8.1 and above.
* With this commit, the `'ping_sites'` option is no longer included in the allow list and thus will not be passed to `update_options()` > `sanitize_option()` > `explode()`.

Follow-up to [22255], [12825], [4326], [949].

Props kitchin, SergeyBiryukov, swissspidy, devmuhib, rajinsharwar, hellofromTonya.
Fixes #59818.

git-svn-id: https://develop.svn.wordpress.org/trunk@58425 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-17 18:01:02 +00:00
Dennis Snell
b36ff6064a KSES: Fix tests and detection of HTML Bogus Comment spans.
In [58418] a test was added without the `test_` prefix in its function
name, and because of that, it wasn't run in the test suite.
The prefix has been added to ensure that it runs.

In the original patch, due to a logical bug, a recursive loop to
transform the inside contents of the bogus comments was never run
more than once. This has been fixed.

This patch also includes one more case where `kses` wasn't
properly detecting the bogus comment state, and adds a test case
to cover this. It limits itself to some but not all constructions
of invalid markup declaration so that it doesn't conflict with
existing behaviors around those and other kinds of invalid comments.

Props ellatrix, dmsnell.
See #61009.
Follow-up to [58418].


git-svn-id: https://develop.svn.wordpress.org/trunk@58424 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-17 12:02:50 +00:00
André
90f1f7705b Global Styles: Avoid unnecessary processing of theme.json variation partials.
Props aaronrobertshaw, oandregal, mukesh27.
See #61451.


git-svn-id: https://develop.svn.wordpress.org/trunk@58423 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-17 10:06:38 +00:00
André
fb20072d95 Global styles: prevent duplicate CSS for block style variations.
Props aaronrobertshaw, mukesh27, ramonopoly, isabel_brison, oandregal.
Fixes #61443.


git-svn-id: https://develop.svn.wordpress.org/trunk@58422 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-17 09:42:57 +00:00
Isabel Brison
c00ad5aa48 Editor: fix custom CSS output for block style variations.
Adds custom CSS to the block style variation rules output by `get_styles_for_block` in class `WP_Theme_JSON`.

Props isabel_brison, aaronrobertshaw.
Fixes #61425.


git-svn-id: https://develop.svn.wordpress.org/trunk@58421 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-17 03:47:37 +00:00
Sergey Biryukov
fa7902c8c8 Tests: Use more specific assertions in WP_Script_Modules tests.
Follow-up to [57269], [57327], [57593].

See #60705.

git-svn-id: https://develop.svn.wordpress.org/trunk@58420 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-16 10:15:33 +00:00
Sergey Biryukov
dc6c8c8ea0 Docs: Add missing description for a few globals in the admin.
This affects:

* `$post_type`
* `$post_type_object`
* `$taxonomy`
* `$title`
* `$wp_meta_boxes`

Follow-up to [31121], [32642], [32643], [37890], [43815], [44244], [45742], [53060], [53061], [54831].

Props shub07, 1naveengiri, sabernhardt, SergeyBiryukov.
Fixes #59561.

git-svn-id: https://develop.svn.wordpress.org/trunk@58419 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-15 12:32:35 +00:00
Dennis Snell
c756dfe8ca KSES: Preserve some additional invalid HTML comment syntaxes.
When `wp_kses_split` processes a document it attempts to leave HTML comments
alone. It makes minor adjustments, but leaves the comments in the document in
its output. Unfortunately it only recognizes one kind of HTML comment and
rejects many others.

This patch makes a minor adjustment to the algorithm in `wp_kses_split` to
recognize and preserve an additional kind of HTML comment: closing tags with
an invalid tag name, e.g. `</%dolly>`.

These invalid closing tags must be interpreted as comments by a browser.
This bug fix aligns the implementation of `wp_kses_split()` more closely
with its stated goal of leaving HTML comments as comments.

It doesn't attempt to fully fix the mis-parsed comments, but it does propose a
minor fix that hopefully won't break any existing code or projects.

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

Props ellatrix, dmsnell, joemcgill, jorbin, westonruter, zieladam.
See #61009.


git-svn-id: https://develop.svn.wordpress.org/trunk@58418 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-15 06:31:24 +00:00
Anthony Burchell
738c03d5b9 Media: Revert r58415 Use version_compare() for Imagick version check when removing alpha.
This commit is a clean revert of r58415 as tests seem to now be failing with this change. Likely the test needs an update as well to accomodate the new successful version check.
Follow-up to [60798].
Props jorbin, hellofromTonya.
See #60798.


git-svn-id: https://develop.svn.wordpress.org/trunk@58417 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-14 15:24:32 +00:00
Joe McGill
36ee9bde3e Options: Fix some default autoload values used in core.
This fixes some autoload values that were updated in [58105] that used the database values of `"on"` and `"off"` instead of the boolean values `true` and `false` when being passed to `add|update_option()`.

Props joemcgill, desrosj, rajinsharwar.
Fixes #61045. See #42441.


git-svn-id: https://develop.svn.wordpress.org/trunk@58416 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-14 15:19:20 +00:00
Anthony Burchell
0e7e596dd3 Media: Use version_compare() for Imagick version check when removing alpha.
Previously `remove_pdf_alpha_channel()` used `Imagick::getVersion()` to validate the environment is capable of handling alpha. This was the incorrect function to use to check the module version as it will only provide the ImageMagick API version. This patch adjusts to instead use `phpversion()` as this is the correct method to get the Imagick version needed to determine alpha compatibility. This fixes a number of host tests that have been correctly failing on subsets of environments. Serendipidously, sometimes the API version was high enough to avoid shining light on this problem.

Props swissspidy, joedolson, antpb.
Fixes #60798.


git-svn-id: https://develop.svn.wordpress.org/trunk@58415 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-14 14:41:52 +00:00
Sergey Biryukov
8f273362c8 Docs: Add missing full stop in WP_Duotone class method DocBlocks.
Follow-up to [56101].

Props dhruval04.
Fixes #61439.

git-svn-id: https://develop.svn.wordpress.org/trunk@58414 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-14 12:16:42 +00:00
André
5983b3c04b Section styles: add slug to override non-kebab-cased variations.
Props aaronrobertshaw, oandregal.
Fixes #61440.


git-svn-id: https://develop.svn.wordpress.org/trunk@58413 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-14 09:03:40 +00:00
André
6d2a39f1b0 theme-i18n.json: add missing i18n for variations
Props aaronrobertshaw, oandregal.
See #61442


git-svn-id: https://develop.svn.wordpress.org/trunk@58412 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-14 08:33:37 +00:00
Pascal Birchler
9cd0523017 Quick/Bulk Edit: Further adjust label width for translations. after [58325]
Props zodiac1978.
Fixes #60851.

git-svn-id: https://develop.svn.wordpress.org/trunk@58411 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 21:36:45 +00:00
Sergey Biryukov
e7e6e096a8 Twenty Twenty-One: Fix typography settings for the Quote block.
Follow-up to [49216], [49478], [49574], [49633], [49800].

Props poena, jyolsna, deepakvijayan, audrasjb, whaze, ironprogrammer, suascat_wp, sannevndrmeulen, zunaid321, oglekler, sabernhardt, mukesh27, ugyensupport, devmuhib, priyanshii5, nicolefurlan, hellofromTonya, huzaifaalmesbah, shailu25, vivekawsm, imranhasanraaz, karmatosed.
Fixes #55991.

git-svn-id: https://develop.svn.wordpress.org/trunk@58410 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 20:53:39 +00:00
Tonya Mork
4575c26a2c Code Modernization: Use wp_trigger_error() instead of trigger_error().
Replaces `trigger_error()` with `wp_trigger_error()`.

The usage of `wp_trigger_error()` avoids generating `E_USER` family errors unless `WP_DEBUG` is on. In doing so, users should not see these messages in normal production.

Notes:
* Removes `E_USER_NOTICE` when passed as an argumnent, as it's the default error level.
* An empty string is passed for the function name when its name is already in the error message or does not add value to the error message.
* Externally maintained libraries are not included.

Follow-up to [55204], [25956], [29630], [38883], [52062], [52049], [54272], [38883], [55245], [51599], [14452], [38883], [24976].

Props prasadkarmalkar, rajinsharwar, thelovekesh, hellofromTonya, swissspidy. 
Fixes #59652.

git-svn-id: https://develop.svn.wordpress.org/trunk@58409 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 20:48:33 +00:00
Jonathan Desrosiers
a4c9a6e3f8 Coding Standards: Apply changes after running composer format.
This applies several formatting related changes made while running `composer format`.

Follow up to [55720], [58171], [58271], [58282], [58283], [58292], [58299], [58303], [58332].
See #51857, #60719, #60895, #61021, #61118, #61228, #61276, #61324.

git-svn-id: https://develop.svn.wordpress.org/trunk@58408 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 15:04:50 +00:00
Joe Dolson
2dbd470927 Themes: Fix attachment rendered as site logo on attachment page.
Fix issue where the attachment thumbnail would be rendered as the site logo on attachment single templates if no site logo is set. Avoid calling `wp_attachment_is_image()` with no value, since that function will fallback to the global `$post` variable. Follow up to [58213]. See #60922.

Props greenshady, krupajnanda, hmbashar, rajinsharwar, joedolson.
Fixes #61408.

git-svn-id: https://develop.svn.wordpress.org/trunk@58407 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 14:46:08 +00:00
Jonathan Desrosiers
986e4643e6 Posts/Post Types: Display the correct message when post status is filtered on save.
This prevents the display of an inaccurate message when the `wp_insert_post_data` filter is used to change the status of a post while saving. This bug was only present when using the Classic Editor.

The previous code incorrectly assumed that a filter would never change a post’s status to `draft`, resulting in a “Post published.” message instead of “Post draft updated.”.

Props freibergergarcia, sirzooro, hakre, blepoxp, scribu, kawauso.
Fixes #11207.

git-svn-id: https://develop.svn.wordpress.org/trunk@58406 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 14:44:45 +00:00
Joe Dolson
dbb326167a Administration: A11y: Add visible labels in theme UI.
Finish task to replace placeholders used for labels with visible label elements. Add label elements in theme browser and theme installation screen. Change position of search input to match other user interfaces in WordPress.

Also crediting all contributors to ticket #61389, which this also closes.

Props joedolson, rcreators, sabernhardt, balub, rejaulalomkhan, syamraj24, nazmul111, krupajnanda, huzaifaalmesbah, hmbashar, mdnesarmridha, colorful-tones, printsachen1.
Fixes #40331, #61389.

git-svn-id: https://develop.svn.wordpress.org/trunk@58405 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 13:55:46 +00:00
Jb Audras
aedad15f57 Bundled block themes: Set theme.json schema version to 6.5.
This changeset updates the `theme.json` schema version from `trunk` which is the development version to the last schema for version 2 available at `https://schemas.wp.org/wp/6.5/theme.json`.

Props poena, sabernhardt, wildworks, mukesh27, kafleg.
Fixes #61342.




git-svn-id: https://develop.svn.wordpress.org/trunk@58403 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 13:43:59 +00:00
Tonya Mork
63cafcf35c Plugins: Remove unassigned sprintf in wp_get_plugin_action_button().
Removes an unassigned `sprintf` that was accidentally included as part of [57545] in the `wp_get_plugin_action_button()`. A copy/paste whoopsie.

The actual used code is assigned a wee bit lower in the function within the `install` case.

Follow-up to [57545].

Props hellofromTonya, costdev, rajinsharwar.
Fixes #61420.

git-svn-id: https://develop.svn.wordpress.org/trunk@58402 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 13:25:41 +00:00
Aaron Jorbin
d4688047b9 Comments: Expire comment author cookies after 1 year (rather than 0.95129375951 of a year)
This filter was originally added in [19622] which predates the addition of the constant added in [21996] by 24085717 seconds.

Props peterwilsoncc, khokansardar, krupalpanchal.
Fixes #61412.


git-svn-id: https://develop.svn.wordpress.org/trunk@58401 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 13:03:15 +00:00
Adam Silverstein
7f70d68353 Networks and sites: use get_allowed_mime_types to populate multisite’s upload_filetypes.
Ensure new multisite installs are up to date with the current mime types supported in core.

Note that this will only affect newly created networks, since this is only used to populate the schema for new networks, not change the allowed mime types for existing networks

Props spacedmonkey, costdev, pavanpatil1, joemcgill, rajinsharwar, tb1909.
Fixes #53167.




git-svn-id: https://develop.svn.wordpress.org/trunk@58400 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 09:58:11 +00:00
Tammie Lister
3a71df6aef Twenty Fourteen: Fixes table block not having same design in editors.
The table block did not have the same design in the editor for front and back. This resolves the issue for the front end editor.

Props pranitdugad, nidjidhandhukiya, poena, shailu25, hmbashar, ugyensupport.
Fixes #60293.


git-svn-id: https://develop.svn.wordpress.org/trunk@58399 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 09:51:27 +00:00
Jb Audras
3806b25058 HTML API: Revert using regex in block bindings HTML replacement logic.
This changeset reverts part of the changes made in [58298] to avoid using regex that can cause potential bugs. It is indeed safer to revert these changes for now and do the refactoring once the HTML API supports CSS selectors and provides a way to set inner content.

It also adds a unit test to cover the regression experienced in https://github.com/WordPress/gutenberg/issues/62347.

Follow-up to [58298].

Props santosguillamot, gziolo.
Fixes #61385.
See #61351.




git-svn-id: https://develop.svn.wordpress.org/trunk@58398 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-13 08:55:47 +00:00
Peter Wilson
459d99618c Docs: Correct typos in JavaScript wordmark.
Fixes documentation and comment references to capitalize JavaScript in accordance with the wordmark.

Props peterwilsoncc, mukesh27, dmsnell.
See #60699.


git-svn-id: https://develop.svn.wordpress.org/trunk@58397 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-12 23:10:50 +00:00
Tonya Mork
cf2b0eece5 Plugins: Ensure wp_get_plugin_action_button() returns a string.
[57545] introduced `wp_get_plugin_action_button()`. This function is documented to return a `string`. However, if the user does not have the appropriate capabilities, it returned `void`, which is unexpected.

Resolves the issue by moving the `return $button` to the bottom of the function to ensure it always returns a `string` type. On success, the button's HTML string is returned; else, an empty string is returned.

Unit tests are included.

Follow-up to [57545].

Props costdev, rajinsharwar, hellofromTonya.
Fixes #61400.

git-svn-id: https://develop.svn.wordpress.org/trunk@58396 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-12 18:15:33 +00:00
Sergey Biryukov
f30f29c24f Docs: Correct alignment in WP_Block_Bindings_Registry::register() DocBlock.
Follow-up to [57373], [57375], [57641].

Props nareshbheda, mukesh27.
Fixes #61412.

git-svn-id: https://develop.svn.wordpress.org/trunk@58395 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-12 12:42:28 +00:00
André
c2bf2eb24f Editor: register block style variations defined by the theme using the init action.
Props oandregal, aaronrobertshaw, annezazu.

Follow-up to [58264].
See #61312.



git-svn-id: https://develop.svn.wordpress.org/trunk@58394 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-12 07:15:06 +00:00
Isabel Brison
7bb62f4395 Editor: Fix specificity of core block style variations.
Adds styles for default block style variations to core `theme.json` so they can override core element styles where needed.

Props aaronrobertshaw, isabel_brison.
Follows r58241.
See #61165.


git-svn-id: https://develop.svn.wordpress.org/trunk@58393 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-12 06:09:10 +00:00
Jb Audras
1537f0043a Post WordPress 6.6 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@58392 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 16:22:37 +00:00
Jb Audras
0631487063 WordPress 6.6 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@58391 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 16:08:58 +00:00
Jb Audras
ad0203ca93 Docs: Fix improper docblock format in lang_dir_for_domain hook.
Follow-up to [58236].

Props khokansardar.
See #60699.




git-svn-id: https://develop.svn.wordpress.org/trunk@58390 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 14:25:58 +00:00
Sergey Biryukov
adeb3eca8e Administration: Remove redundant type casting in WP_List_Table::search_box().
Scalar values passed to `esc_attr()` are already converted internally to a string via both `wp_check_invalid_utf8()` and `_wp_specialchars()`.

Includes adding `@covers` tags for unit tests.

Follow-up to [58379].

See #58379.

git-svn-id: https://develop.svn.wordpress.org/trunk@58389 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 12:36:13 +00:00
Sergey Biryukov
b215c598ea Docs: Further improve the wp_http_validate_url() DocBlock.
Follow-up to [58384].

See #61092.

git-svn-id: https://develop.svn.wordpress.org/trunk@58388 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 12:04:40 +00:00
Ella
7cf81d37b0 Editor: Update npm packages for WP 6.6 Beta 2.
See https://github.com/WordPress/wordpress-develop/pull/6773.

Fixes #61410.

Props vcanales.



git-svn-id: https://develop.svn.wordpress.org/trunk@58387 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 10:05:48 +00:00
Jb Audras
0b988ac119 Docs: Remove unwanted whitespace found in wp-includes/http.php.
Follow-up to [58384].

Unprops audrasjb.




git-svn-id: https://develop.svn.wordpress.org/trunk@58386 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 07:27:47 +00:00
Jb Audras
8b30441e30 Docs: Various docblock improvements in HTTP Request API, as per WP docs standards.
See #60699.




git-svn-id: https://develop.svn.wordpress.org/trunk@58385 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 07:12:57 +00:00
Jb Audras
7a3a0fa204 Docs: Improve wp_remote_safe_* and wp_http_validate_url docblocks.
Props benjaminpick, audrasjb.
Fixes #61092.




git-svn-id: https://develop.svn.wordpress.org/trunk@58384 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 07:07:35 +00:00
Jb Audras
2778f483fb Login and Registration: Make the wp-login.php form padding more consistent.
This changeset removes the extra `padding-bottom` to the login form located in `wp-login.php`.

Props deeppatel8950, meetmehta1205, audrasjb, webcommsat, dhrumilk.
Fixes #61013.




git-svn-id: https://develop.svn.wordpress.org/trunk@58383 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 06:39:27 +00:00
Jb Audras
1488682468 Login and Registration: Add required attribute to username and password fields in wp_login_form().
These attributes are needed to indicate that both fields are required. This changeset doesn't add the attribute by default but allows extenders to enable it by passing `true` to the `$required_username` and `$required_password` to `wp_login_form()` arguments array.

Props alesflex, sabernhardt, joedolson, rcreators, rajinsharwar.
Fixes #60062.




git-svn-id: https://develop.svn.wordpress.org/trunk@58382 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 06:22:37 +00:00
Peter Wilson
48497199e1 Options, Meta APIs: Lower priority of default autoload threshold filter.
Lowers the priority at which `wp_filter_default_autoload_value_via_option_size()` is registered to run on the `wp_default_autoload_value()` filter. The default filter now runs at priority 5.

This is to allow third party developers to modify whether an option is autoloaded using the default priority, 10, rather than require they register their code to run at a higher priority.

Follow up to [57920].

Props peterwilsoncc, joemcgill.
Fixes #42441.




git-svn-id: https://develop.svn.wordpress.org/trunk@58381 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 02:38:42 +00:00
Peter Wilson
9955b87bce Options, Meta APIs: Add SQL escaping to query loading 'all options'.
Escapes the return value of `wp_autoload_values_to_autoload()` for use in the database query loading 'all options'. This is a hardening fix to protect against future changes to the options API which may allow developers to further customize the return value of the `wp_autoload_values_to_autoload` filter.

Follow up to [57920].

Props peterwilsoncc, joemcgill.
Fixes #42441.




git-svn-id: https://develop.svn.wordpress.org/trunk@58380 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 02:29:14 +00:00
Peter Wilson
8cd24bc12c Administration: Prevent an orderby array throwing a notice.
Prevent `WP_List_Table::search_box()` from throwing an array to string conversion notice when post list tables are loaded with an array of orderby parameters in the URL, eg: `/wp-admin/edit.php?post_type=page&orderby[menu_order]=ASC&orderby[title]=ASC`.

Follow up to [29027].

Props leonidasmilossis, rajinsharwar, swissspidy, NomNom99, pls78, SergeyBiryukov.
Fixes #59494.
See #17065.


git-svn-id: https://develop.svn.wordpress.org/trunk@58379 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 02:12:52 +00:00
Isabel Brison
90225fb7e6 Editor: Improve maintainability of class WP_Theme_JSON tests.
Updates tests calling `get_stylesheet` to not output layout styles if they’re not relevant to the test or to call `get_styles_for_block` instead where more appropriate.

Props isabel_brison, andrewserong, ramonopoly.
Fixes #61371.


git-svn-id: https://develop.svn.wordpress.org/trunk@58378 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-11 00:29:21 +00:00