Commit Graph

38161 Commits

Author SHA1 Message Date
Sergey Biryukov
12249ab1bf Coding Standards: Remove unnecessary type casting in wp-links-opml.php.
Follow-up to [13747].

Props dilipbheda, debarghyabanerjee, umeshsinghin.
Fixes #63367.
Built from https://develop.svn.wordpress.org/trunk@60207


git-svn-id: http://core.svn.wordpress.org/trunk@59543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-30 12:52:29 +00:00
Sergey Biryukov
d60c55b6c1 Cache API: Consistently pass the $expire value as an integer in cache functions.
Follow-up to [52700].

Props dilipbheda.
Fixes #63364.
Built from https://develop.svn.wordpress.org/trunk@60206


git-svn-id: http://core.svn.wordpress.org/trunk@59542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-29 22:44:37 +00:00
Aaron Jorbin
817670fded Update Packages for 6.8.1 in trunk.
This includes the following changes:
- https://github.com/WordPress/gutenberg/pull/69958
- https://github.com/WordPress/gutenberg/pull/70006
- https://github.com/WordPress/gutenberg/pull/70001
- https://github.com/WordPress/gutenberg/pull/69998
- https://github.com/WordPress/gutenberg/pull/70000

This was done in the 6.8 branch in [60199]. Since trunk's packages have not yet been updated for 6.9, this will allow for bug fixes in the 6.8 branch to also be available to people testing trunk.

Props wildworks, 0mirka00, sourav08, mamaduka, megane9988, jorbin, dsawyers, iamkingsleyf, soean, sc0ttkclark, presstoke, yogeshbhutkar, joen, joedolson, talldanwp, jarekmorawski, yogeshbhutkar, fabiankaegy, justlevine, desrosj.
Fixes #63366.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-28 21:52:41 +00:00
Felix Arntz
1388689a55 Networks and Sites: Sanitize key parameter in wp-activate.php.
Props khushipatel15.
Fixes #63320.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-28 21:12:28 +00:00
Felix Arntz
2e7eb7070b Query: Avoid unnecessary database query when deleting a font family.
Querying only the font face IDs is sufficient when deleting a font family. There is no need to warm the caches with the full objects, since `wp_delete_post()` will always make a direct database query to get the object anyway.

Props dilipbheda.
Fixes #63014.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-28 20:51:28 +00:00
Sergey Biryukov
4ef79cb3a5 Docs: Remove redundant @abstract tags from DocBlocks in WP_Image_Editor.
Since the affected methods are already marked as `abstract` in the function signature, these tags are unnecessary and add no new information.

Follow-up to [22094], [22510], [22619].

Props marian1, narenin, ankitmaru.
Fixes #63356.
Built from https://develop.svn.wordpress.org/trunk@60198


git-svn-id: http://core.svn.wordpress.org/trunk@59534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-28 16:37:27 +00:00
Aaron Jorbin
605d7f9539 REST API: Change posts endpoint to ignore_sticky=true by default
This restores the 6.7 and below behavior for the posts endpoint which did not include sticky posts by default.

Follow-up to [59801].

Props nikunj8866, SirLouen, ankitmaru, wildworks, karthikeya01, Mamaduka, spacedmonkey, jorbin.
Fixes #63307. See #35907.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-28 16:05:22 +00:00
Aaron Jorbin
c428ba7cba Media: Don't try to resize image formats which can't be resized
While having a mime type with an "image" prefix, SVG images are in fact "Scalable Vector Graphics" that can be scaled directly.

Follow-up to [60084].

Props sirlouen, adamsilverstein, audrasjb, pbiron, sainathpoojary, dilipbheda, pratiklondhe.
Fixes #63302. See #61167.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-28 15:39:24 +00:00
Aaron Jorbin
dad43470c3 Admin bar: Update the "Edit Site" link to 6.7 destination.
This reverts [59910] and changes the "Edit Site" link to be the current template rather than the top-level screen of the Site Editor.

Props wildworks, joemcgill, poena, westonruter, nickwilmot, marktimemedia, eduwass, lilgames, codeamp, jeffr0, jorbin.
Fixes #63358. See #62368.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-28 06:37:29 +00:00
Sergey Biryukov
b9c5b23417 Twenty Twenty-Five: Remove redundant echo from esc_html_e().
Follow-up to [59233].

Props dilipbheda, sabernhardt.
Fixes #63345.
Built from https://develop.svn.wordpress.org/trunk@60192


git-svn-id: http://core.svn.wordpress.org/trunk@59528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-27 19:57:33 +00:00
Sergey Biryukov
712a4ea227 Coding Standards: Use self:: for static member reference in WP_Http.
This resolves a PHPCS error:
{{{
Squiz.Classes.SelfMemberReference.NotUsed - Must use "self::" for local static member reference
}}}

Follow-up to [20767], [37428], [38164].

Props dilipbheda.
Fixes #63346.
Built from https://develop.svn.wordpress.org/trunk@60191


git-svn-id: http://core.svn.wordpress.org/trunk@59527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-26 23:18:32 +00:00
joedolson
228f05af93 Themes: Add filter on bulk action fields.
Because validation was added in [59134] to prevent submitting bulk actions with no selected action, sites that remove or change the default bulk actions can fail due to the missing required inputs. Add a filter (`bulk_action_observer_ids`) that allows modifying the actions accepted to fulfill validation rules.

Props ethitter, kabir93, jorbin, davidbaumwald, joedolson.
Fixes #63005.
Built from https://develop.svn.wordpress.org/trunk@60186


git-svn-id: http://core.svn.wordpress.org/trunk@59522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-25 18:20:32 +00:00
Sergey Biryukov
ef85ed97e2 Docs: Correct parameter name in Spy_REST_Server::set_status().
Follow-up to [51960].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-25 17:33:33 +00:00
Aaron Jorbin
921c122444 About Page: Reduce copy on 6.8 about page.
In finalizing the 6.8 announcement post (https://wordpress.org/news/2025/04/cecil/) it was identified that some of the copy on the 6.8 about page is not an accurate description of what is in 6.8. This copy is receiving a game misconduct penalty and automatic ejection. While the coach could bring on a substitute, a line change is the better option here.

Props abcd95, mukesh27, JeffPaul.
Fixes #63323.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-24 22:38:26 +00:00
Aaron Jorbin
2d76932203 Editor: Use different keys in array of translatable strings.
[59696] changed the 'Text' tab of the classic editor to 'Code' but `Code` was already used as a key in the array of translatable text. Since arrays keys need to be unique, this meant that it is possible for the wrong translation to appear in a locale. Using different keys fixes that.

Props joedolson, sabernhardt, justlevine, swissspidy, audrasjb.
Fixes #63269. See #38061.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-24 22:22:30 +00:00
Sergey Biryukov
d1c676b3a4 Site Health: Set missing $transient in WP_Debug_Data:get_wp_themes_inactive().
This commit addresses a bug where the `update_themes` site transient was not defined before being checked in several `isset()` checks later on in the method.

Follow-up to [59176].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-24 12:49:30 +00:00
Sergey Biryukov
4e3cca4095 Coding Standards: Explicitly return null in wp_get_nav_menu_to_edit().
This commit updates the function to explicitly return `null` if a valid `$menu_id` is not passed or the term does not exist. Previously, the function could return `void`, but was typed as only returning a string or a `WP_Error` object.

Follow-up to [14248].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-23 00:14:30 +00:00
Sergey Biryukov
47a1161215 Coding Standards: Explicitly return null in _wp_filter_build_unique_id().
This commit updates the function to explicitly return `null` if a valid `$callback` is not passed. Previously, the function could return `void`, but was typed as only returning a string.

Follow-up to [5936], [11409], [12090], [46220], [46801], [50807], [52300].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-22 15:35:36 +00:00
John Blackbourn
d68311701e Docs: Improve and standardise the format of placeholder strings that get replaced within email messages.
This prevents the strings being treated as h3 headings by the documentation parser on developer.wordpress.org.

See #63166
Built from https://develop.svn.wordpress.org/trunk@60178


git-svn-id: http://core.svn.wordpress.org/trunk@59514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-21 11:49:31 +00:00
Sergey Biryukov
4faa2950fe Docs: Correct $request parameter type in WP_REST_Server::get_index().
Follow-up to [34928], [52796].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-21 09:31:30 +00:00
Sergey Biryukov
6ac6d264d6 Coding Standards: Correct default parameter type in WP_Meta_Query::__construct().
This adjusts the default `$meta_query` parameter value to match the documented type of `array`.

Since the function is gated with a loose, falsey `! $meta_query` check, there is no difference to function behavior.

Follow-up to [17699].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-20 23:51:29 +00:00
Sergey Biryukov
0d61347400 XML-RPC: Correctly return deletion error message in wp_xmlrpc_server::wp_deleteTerm().
This ensures that the correct variable is used to return the `WP_Error` message from the `wp_delete_term()` attempt.

Follow-up to [20137].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-19 18:56:30 +00:00
Sergey Biryukov
7a2c67c454 Coding Standards: Correct $site_id parameter default values in WP_User.
This commit corrects the default `$site_id` parameter values used throughout the `WP_User` class to bring them in line with their `int` doctypes (and the doctypes of the functions used internally by the affected class methods).

More specifically,
* `__construct()`: `$site_id = ''` changed to `$site_id = 0`
* `init()`: `$site_id = ''` changed to `$site_id = 0`
* `for_blog()`: `$blog_id = ''` changed to `$blog_id = 0`
* `for_site()`: `$site_id = ''` changed to `$site_id = 0`

Follow-up to [12796], [15566], [18597], [41624].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-18 20:28:27 +00:00
Bernhard Reiter
caf8d34db8 Block Hooks: Suppress insertion next to post content wrapper block.
As of [59523], Block Hooks are applied to post content. In order to allow for insertion of a hooked block as `first_child` or `last_child` of the containing Post Content block, we wrap the block's post content (as obtained from the DB) in a temporary `<!-- wp:post-content -->` wrapper block, apply the Block Hooks algorithm to the resulting markup, and remove the wrapper block. (The same technique is applied for the Synced Pattern block -- see [59543] -- as well as the Navigation block.)

However, this caused a problem when a hooked block was marked for insertion before `before` or `after` a Post Content block: The logic that's supposed to remove the temporary wrapper block after the Block Hooks algorithm runs erroneously removed that hooked block's delimiter instead of the wrapper block, producing garbled markup as a result.

This changeset fixes the issue by adding a `hooked_block_types` filter (with `PHP_INT_MAX` priority) that removes any blocks hooked `before` or `after` a Post Content block, ''if'' the current context is a post object. This prevents any blocks hooked that way from being "absorbed" into the corresponding post object's content; it retains the ability to hook blocks `before` and `after` a Post Content block in any other context (e.g. a template). (The same principle is applied to Synced Pattern and Navigation blocks.)

Props obenland, jorbin, gziolo, bernhard-reiter.
Fixes #63287.
Built from https://develop.svn.wordpress.org/trunk@60173


git-svn-id: http://core.svn.wordpress.org/trunk@59509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-18 12:57:28 +00:00
Sergey Biryukov
f581a7f5b3 Docs: Correct parameter name for rest_menu_read_access filter.
The filter's third parameter was incorrectly named `$this`, which is not a valid parameter name.

Follow-up to [59718], [59734].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-17 12:10:36 +00:00
Peter Wilson
0d3caae2d4 Media: Prevent Multisite fatal error in legacy file rewrites.
Removes a call to the `is_super_admin()` function in `ms-files.php` as the function isn't available when using the `SHORTINIT` feature, causing fatal errors on systems using file rewrites.

Reverts [59967].

Props audrasjb, desrosj, jeremyfelt, johnjamesjacoby, jorbin, presskopp, verygoode, dd32, joemcgill.
See #36803.
Fixes #63285.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-16 04:35:34 +00:00
Sergey Biryukov
c980b941ec Docs: Correct parameter types for get_comments_number_text().
This updates the `@param` types to correctly reflect the default `false` parameter.

Follow-up to [6495], [25567], [28912], [49936].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-14 22:34:25 +00:00
audrasjb
0c9d300887 Upgrade/Install: Update the $_old_files array for 6.8.
Built from https://develop.svn.wordpress.org/trunk@60160


git-svn-id: http://core.svn.wordpress.org/trunk@59496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-14 15:22:22 +00:00
desrosj
b43d0e9c52 Bundled Themes: Bump Default Theme versions for release.
This bumps the versions of the following default themes for coordinated release with WordPress 6.8:

- Twenty Ten: `4.4`
- Twenty Eleven: `4.9`
- Twenty Twelve: `4.5`
- Twenty Thirteen: `4.4`
- Twenty Fourteen: `4.2`
- Twenty Fifteen: `4.0`
- Twenty Sixteen: `3.5`
- Twenty Seventeen: `3.9`
- Twenty Nineteen: `3.1`
- Twenty Twenty: `2.9`
- Twenty Twenty-One: `2.5`
- Twenty Twenty-Two: `2.0`
- Twenty Twenty-Five: `1.2`

Twenty Twenty-Three and Twenty Twenty-Four will not be receiving an update at this time.

Props shailu25, sabernhardt, desrosj, poena.
Fixes #62990.
Built from https://develop.svn.wordpress.org/trunk@60159


git-svn-id: http://core.svn.wordpress.org/trunk@59495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-14 15:01:27 +00:00
desrosj
20b974ea68 Bundled Themes: Bump Tested up to for Twenty Twenty-Three & Twenty Twenty-Four.
An update for these two default themes will not be released in coordination with WordPress 6.8 due because there were no changes to the source code during the release cycle. However, they should be considered tested with 6.8, and this ensures that the next release properly indicates that.

Props shailu25, sabernhardt, desrosj, poena.
See #62990.
Built from https://develop.svn.wordpress.org/trunk@60158


git-svn-id: http://core.svn.wordpress.org/trunk@59494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-14 14:58:27 +00:00
Peter Wilson
a7166eb611 Help/About: Add images to the About page.
Updates the images in the About page source with the final versions on the w.org CDN.

Props ryelle, dd32.
See #63025.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-14 00:50:26 +00:00
Sergey Biryukov
a4b3fa981f Coding Standards: Check for an empty address first on admin email change notification.
This follows a common best practice of checking for an empty value before doing a specific comparison.

Follow-up to [60122], [60129].

Props dilipbheda, Presskopp.
Fixes #63267.
Built from https://develop.svn.wordpress.org/trunk@60153


git-svn-id: http://core.svn.wordpress.org/trunk@59489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-13 16:48:30 +00:00
Sergey Biryukov
48208f6a52 Coding Standards: Correct $post parameter default values in link-template.php.
This commit corrects the default post ID parameter values used in several functions to bring them in line with their `int` doctypes (and the doctypes of their internal function calls).

More specifically,

* `get_page_link()`: `$post = false` changed to `$post = 0`
* `_get_page_link()`: `$post = false` changed to `$post = 0`
* `post_comments_feed_link()`: `$post_id = ''` changed to `$post_id = 0`

Follow-up to [1752], [4475], [6365], [9136], [9274], [21735], [24490], [32606], [37252].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-12 22:42:30 +00:00
Sergey Biryukov
d9a3cdbe01 Coding Standards: Remove extra check in WP_REST_Server::get_json_last_error().
`json_last_error()` can only return an integer, and the `JSON_ERROR_NONE` constant has the value of `0`, so the `empty()` check is redundant here.

Follow-up to [34928], [46206].

Props dilipbheda, audrasjb, SergeyBiryukov.
See #63249.
Built from https://develop.svn.wordpress.org/trunk@60151


git-svn-id: http://core.svn.wordpress.org/trunk@59487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-11 19:38:33 +00:00
desrosj
06e675ab71 Editor: Restore static properties for deprecated __experimentalLinkControl.
[59775] resulted in a backwards compatibility break in a now deprecated experimental component, which was stabilized to `LinkControl`. When experimental components are deprecated in favor of being stabilized, the same backwards compatibility policy applies and the shape of the component should not change.

This restores the static properties that were unintentionally removed from the `__experimentalLinkControl` component that was moved to `DeprecatedExperimentalLinkControl`.

Props karthikeya01, mamaduka, joemcgill, fabiankaegy, wildworks.
Fixes #62887.
Built from https://develop.svn.wordpress.org/trunk@60150


git-svn-id: http://core.svn.wordpress.org/trunk@59486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-10 18:13:40 +00:00
Sergey Biryukov
e7bf80bb8c Docs: Correct the type of the $return parameter in embed_handler_html filter.
The value cannot be `false` at this point, as the filter is only applied to non-empty embed HTML.

Follow-up to [25726], [46661].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-10 13:47:26 +00:00
Sergey Biryukov
dcd0ea342c Tests: Use the ms-required group where appropriate.
This replaces the `if ( is_multisite() )` conditional wrapping entire test classes with the `ms-required` group for more consistency across the test suite.

Follow-up to [40520].

See #63167.
Built from https://develop.svn.wordpress.org/trunk@60148


git-svn-id: http://core.svn.wordpress.org/trunk@59484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-09 13:31:31 +00:00
Sergey Biryukov
95f9ddbe45 General: Correct force_ssl_content() to always return a boolean value.
This aims to bring parity with `force_ssl_admin()`.

Includes:
* Allowing `force_ssl_content()` to properly accept `false` as a value.
* Correcting an erroneous `! $force` conditional that should have been reversed.
* Adding unit tests to confirm valid behavior.

Follow-up to [https://mu.trac.wordpress.org/changeset/1979 mu:1979], [11903], [12603], [47808], [59830].

Props justlevine for initial patch.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@60147


git-svn-id: http://core.svn.wordpress.org/trunk@59483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-08 18:04:29 +00:00
Joe McGill
894ad33282 Themes: Allow files in a block theme's 'patterns' directory to be filterable.
Since [59872] all PHP files in the 'patterns' directory or subdirectories are auto registered. Adding a filter prior to autoregistration allows theme developers to modify the list of files before the auto registration.

Props webmandesign, joemcgill, jorbin, poena.
Fixes #63212.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-08 13:55:29 +00:00
audrasjb
60211367e7 REST API: Fix hardcoded table name in WP_Test_REST_Users_Controller.
This changeset fixes failing unit tests on the Hosting test suite because of the hardcoded table name in `WP_Test_REST_Users_Controller::test_get_items_only_fetches_ids_for_head_requests`.

Props antonvlasenko, desrosj.
Fixes #56481.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-08 13:04:29 +00:00
Sergey Biryukov
795854200c Tests: Simplify the tests for force_ssl_admin().
Includes:
* The `$forced` static variable is reset to `false` before each test, and the function always returns the previous value on the first call, so there is no need to pass the same value from the data provider.
* Clarifying data provider keys by removing the “first call” references to avoid confusion, as the test method always calls the function twice for each input value.
* Replacing unnecessarily redundant test method name for consistency with other tests.
* Moving the data provider after the test method for consistency with other tests.
* Adjusting DocBlock formatting as per the documentation standards.

Follow-up to [59830].

See #63167.
Built from https://develop.svn.wordpress.org/trunk@60137


git-svn-id: http://core.svn.wordpress.org/trunk@59473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-07 23:15:30 +00:00
ryelle
01616622fe Help/About: Revert subtle color to actually subtle color on Get Involved.
Props densinakum, courane01.
See #63025.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-07 22:16:54 +00:00
Peter Wilson
55aa83772d Site Editor: Fix PHP warning in _wp_get_site_editor_redirection_url().
Fixes a PHP Warning for an undefined array key "QUERY_STRING" in `_wp_get_site_editor_redirection_url()` in some PHP configurations.

Depending on the configuration, `$_SERVER['QUERY_STRING']` can either be unset or an empty string when no query string included in the URL. This changes the condition from a falsey check to an `empty()` check.

Props akshaydhere, dilipbheda, johnbillion, rainynewt, sabernhardt, sainathpoojary, shovan_jaya, tusharaddweb, wildworks.
Fixes #63224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-07 00:07:30 +00:00
Sergey Biryukov
d38b0e164c Coding Standards: Remove unnecessary conditional in WP_List_Table::print_column_headers().
This commit removes an unnecessary `empty()` check, where the `$class` variable is primed at the top of the `foreach` loop and will always be a non-empty array.

To maintain readability of the source of the `$class` attribute without the unnecessary `empty()` check, the resulting variable has been renamed to `$class_attr`, instead of reusing the array.

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

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


git-svn-id: http://core.svn.wordpress.org/trunk@59468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-06 20:56:30 +00:00
Sergey Biryukov
36f1464972 Coding Standards: Move wp_unique_id_from_values() next to wp_unique_id() and wp_unique_prefixed_id(), for consistency.
Follow-up to [60038].

See #63168.
Built from https://develop.svn.wordpress.org/trunk@60131


git-svn-id: http://core.svn.wordpress.org/trunk@59467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-05 21:06:27 +00:00
Sergey Biryukov
bade180a59 Docs: Correct the type of the $found parameter in wp_cache_get().
Follow-up to [20089], [34225], [34227], [36069].

Props jigar-bhanushali.
Fixes #63217.
Built from https://develop.svn.wordpress.org/trunk@60130


git-svn-id: http://core.svn.wordpress.org/trunk@59466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-04 22:00:27 +00:00
John Blackbourn
d06ea932de Administration: Don't attempt to send a notification about a change of site admin or network admin email address when the old address is empty.
Props spenserhale.

Fixes #62211
Built from https://develop.svn.wordpress.org/trunk@60129


git-svn-id: http://core.svn.wordpress.org/trunk@59465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-04 16:36:31 +00:00
Peter Wilson
f54720e6e5 Docs: Fix types for wp_cache_set_last_changed filter.
Corrects the type for the `$time` and `$previous_time` parameters in the filter to indicate the times are expressed as strings. The values are generated from a call to `microtime()` which returns the time as a string in the form `msec sec`.

Props tillkruess, westonruter.
Fixes #63194.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-03 20:49:31 +00:00
Sergey Biryukov
8b620b65ca Docs: Correct the type of the $cache parameter in embed_oembed_html.
The value cannot be `false` at this point, as the filter is only applied to non-empty output.

Follow-up to [25726], [46661].

Props apermo, xate.
Fixes #63220.
Built from https://develop.svn.wordpress.org/trunk@60127


git-svn-id: http://core.svn.wordpress.org/trunk@59463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-03 19:26:27 +00:00
John Blackbourn
0caf2af8ea Security: Don't fail the Argon2-related tests when it's not available on the test infrastructure.
These tests are not critical to the bcrypt functionality, they exist to reaffirm that the  underlying use of `password_hash()` and `password_verify()` supports this algorithm. The Argon2 tests therefore shouldn't unnecessarily fail on hosts that don't support it.

Props desrosj, johnbillion.

Fixes #21022
Built from https://develop.svn.wordpress.org/trunk@60124


git-svn-id: http://core.svn.wordpress.org/trunk@59460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-03 14:09:27 +00:00