This addresses a regression in [47808], which caused excerpts to be generated from post content if an empty string is passed, but not for other values considered empty, e.g. `null` or `false`.
Props riaanlom, laxman-prajapati, SergeyBiryukov.
Fixes#51042.
git-svn-id: https://develop.svn.wordpress.org/trunk@48817 602fd350-edb4-49c9-b593-d223f7449a82
The links is unnecessary there, as the toolbar is the first thing in the DOM within the `<body>` element.
For themes that don't implement the `wp_body_open` action yet and render the admin bar in the footer, the "Skip to toolbar" link with `tabindex="1"` is still necessary, to ensure it's the first focusable element in the page.
Props sarahricker, afercia, erikjandelange, audrasjb.
Fixes#50702.
git-svn-id: https://develop.svn.wordpress.org/trunk@48812 602fd350-edb4-49c9-b593-d223f7449a82
This avoids PHP notices if these keys were accidentally removed using the `site_status_tests` filter.
Props khag7, Ov3rfly, desrosj, Clorith.
Fixes#50858.
git-svn-id: https://develop.svn.wordpress.org/trunk@48808 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the warning was displayed even if the value was higher than `upload_max_filesize`, which made the report inaccurate, as these values don't necessarily have to match.
Props oakesjosh, jeroenrotty, desrosj, Clorith.
Fixes#50945.
git-svn-id: https://develop.svn.wordpress.org/trunk@48800 602fd350-edb4-49c9-b593-d223f7449a82
In PHP 8, the GD extension uses `GdImage` objects instead of resources for its underlying data structures.
This updates the existing `is_resource()` calls for image resources in core to accomodate for `GdImage` instances as well.
Props ayeshrajans, jrf.
Fixes#50833.
git-svn-id: https://develop.svn.wordpress.org/trunk@48798 602fd350-edb4-49c9-b593-d223f7449a82
Support for the `uniqueItems` keyword was added in [48357], but wasn't included in the list of permitted keywords for `WP_REST_Controller::get_endpoint_args_for_item_schema()`. This prevented the keyword from being automatically supported if specified in a controller's item schema.
Fixes#51021.
git-svn-id: https://develop.svn.wordpress.org/trunk@48796 602fd350-edb4-49c9-b593-d223f7449a82
The function is private (only intended for core usage) and is hooked to the `delete_post` action, which always passes a non-zero post ID.
Follow-up to [14295], [48794].
See #50343.
git-svn-id: https://develop.svn.wordpress.org/trunk@48795 602fd350-edb4-49c9-b593-d223f7449a82
As it already was not possible to pass the required parameters without also passing the optional one anyway, removing the default value for the (not so) optional parameters should not affect backward compatibility.
This change affects three functions in core:
* `get_comment_delimited_block_content()`
* `do_enclose()`
* `_wp_delete_tax_menu_item()`
Props jrf, ayeshrajans, desrosj.
Fixes#50343.
git-svn-id: https://develop.svn.wordpress.org/trunk@48794 602fd350-edb4-49c9-b593-d223f7449a82
Previously, it was only incidentally recognized as valid due to a loose comparison with `true`.
With the strict comparison added to `WP_Site_Health_Auto_Updates::test_constants()`, this was no longer the case.
Follow-up to [47841].
Props sterndata, mukesh27, avixansa, desrosj, SergeyBiryukov.
Fixes#50912.
git-svn-id: https://develop.svn.wordpress.org/trunk@48792 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that those settings don't leak to other tests.
Props david.binda, TimothyBlynJacobs, SergeyBiryukov.
Fixes#50986.
git-svn-id: https://develop.svn.wordpress.org/trunk@48791 602fd350-edb4-49c9-b593-d223f7449a82
`create_function()` has been deprecated in PHP >= 7.2 and removed in PHP 8.
The only instance left in core was used in a test that was being skipped on PHP >= 7.2. This allows the test to run again.
Follow-up to [41722], [41730].
Props jrf.
Fixes#50899.
git-svn-id: https://develop.svn.wordpress.org/trunk@48790 602fd350-edb4-49c9-b593-d223f7449a82
This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading is disabled by default, so this function is no longer needed to protect against XXE attacks.
Props jrf.
Fixes#50898.
git-svn-id: https://develop.svn.wordpress.org/trunk@48789 602fd350-edb4-49c9-b593-d223f7449a82
Declaring a `private` method as `final` is an oxymoron, as `private` methods cannot be overloaded anyway.
Using `final private function...` will generate a warning in PHP 8.
Props jrf.
Fixes#50897.
git-svn-id: https://develop.svn.wordpress.org/trunk@48788 602fd350-edb4-49c9-b593-d223f7449a82
This is intended as an easy way for plugins and themes to still be able to load jQuery with jQuery Migrate in WordPress 5.5.
Once jQuery is updated to 3.x, this temporary script handle will be removed. This means plugins and themes still using it at that point will fail to load their scripts (as a dependency will be missing), but will not cause "fatal errors" breaking the rest of JS.
Follow-up to [48323], [48324].
Props azaozz, desrosj, apedog, Clorith, jorbin.
Fixes#37110.
git-svn-id: https://develop.svn.wordpress.org/trunk@48753 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the canonical name of the filter is used in Site Health debug data, as well as on plugin and theme screens, so the developer reference site remains correct.
Props johnbillion.
Fixes#50868.
git-svn-id: https://develop.svn.wordpress.org/trunk@48750 602fd350-edb4-49c9-b593-d223f7449a82
To accommodate for the change, the `custom-logo` theme feature now accepts the `unlink-homepage-logo` parameter.
If and when the logo is linked on the home page, the link has the `aria-current` attribute for better accessibility.
Follow-up to [48039], [48283].
Props sabernhardt, audrasjb, johnstonphilip, demetris.
Fixes#37011.
git-svn-id: https://develop.svn.wordpress.org/trunk@48749 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that comment object cache is cleared after changing the comment type to `comment` instead of an empty string.
Add a unit test for `_wp_batch_update_comment_type()`.
Follow-up to [47597], [47626], [48225], [48227].
Props imath, westonruter.
Fixes#49236.
git-svn-id: https://develop.svn.wordpress.org/trunk@48748 602fd350-edb4-49c9-b593-d223f7449a82
Previously, some instances of the filter received an array from a plugin or theme update response, potentially triggering PHP notices.
Props bpayton, pbiron.
Fixes#50852.
git-svn-id: https://develop.svn.wordpress.org/trunk@48745 602fd350-edb4-49c9-b593-d223f7449a82