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
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
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
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
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
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
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
[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
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
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
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
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
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
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
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
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
`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
[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
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
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
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
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
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
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
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
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