In [48306] support for multi-typed schemas was improved to first detect the data type of the value before applying further validation. The `integer` data type was detected using the new `rest_is_integer` function. This function used logic, however, that assumed that the value had already passed an `is_numeric` check. This meant that if `integer` and `string` were both acceptable types, the value would always be considered an `integer` causing the later accurate type validation to fail.
This commit fixes the `rest_is_integer` logic to include an `is_numeric` check.
Props rtagliento, TimothyBlynJacobs.
Merges [48881] to the 5.5 branch.
Fixes#51146.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48883 602fd350-edb4-49c9-b593-d223f7449a82
Even with these values documented as an array of integers, they can technically also accept an array of strings, e.g. as form results.
Add a unit test.
Props brianhogg, TimothyBlynJacobs, SergeyBiryukov.
Merges [48880] to the 5.5 branch.
Fixes#51137.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48882 602fd350-edb4-49c9-b593-d223f7449a82
`document.getElementById()` returns `null` if no matching element was found, so the previous comparison didn't work as expected.
Follow-up to [47506].
Props mailnew2ster, sarahricker.
Merges [48876] to the 5.5 branch.
Fixes#38009.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48877 602fd350-edb4-49c9-b593-d223f7449a82
Update `redirect_canonical()` to account for custom pagination and URL format used by sitemaps in order to follow standard practices.
Introduce the function `get_sitemap_url()` to simplify getting the index and provider URLs as needed.
Props jonathanstegall, pbiron, GamerZ, salvoaranzulla, peterwilsoncc.
Merges [48872] to the 5.5 branch.
Fixes#50910.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48873 602fd350-edb4-49c9-b593-d223f7449a82
Custom site logos are most commonly displayed above the fold, so lazy-loading is unnecessary.
Props demetris, khag7, johnbillion, rebasaurus, audrasjb.
Merges [48870] to the 5.5 branch.
Fixes#50933.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48871 602fd350-edb4-49c9-b593-d223f7449a82
This addresses a regression in [47808], where the `home` check expected an empty string to use `siteurl` as a fallback, but `wpdb::get_var()` returns `null` if the option is empty.
Props fjarrett.
Merges [48868] to the 5.5 branch.
Fixes#51011.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48869 602fd350-edb4-49c9-b593-d223f7449a82
A better solution for the original issue will be explored in a future release.
Props audrasjb, garrett-eclipse, webzunft, Krstarica, chunkysteveo, SergeyBiryukov.
Merges [48866] to the 5.5 branch.
Fixes#50882, #50998. See #46872.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48867 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the patterns respect the theme's default color for body text and avoids contrast issues, particularly in dark themes.
Props nrqsnchz, mapk, fullofcaffeine.
Merges [48864] to the 5.5 branch.
Fixes#50892.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48865 602fd350-edb4-49c9-b593-d223f7449a82
Color schemes should only affect colors, to avoid diverging from a consistent and predictable layout, especially if core CSS rules subsequently change.
Follow-up to [48277], [48286], [48345].
Props Joen, johnbillion, afercia, johnjamesjacoby.
Merges [48862] to the 5.5 branch.
Fixes#51127. See #50504.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48863 602fd350-edb4-49c9-b593-d223f7449a82
This gives developers a better control over their existing development workflow and ensures that `local` is not the exact same as `development` if it does not need to be.
Props claytoncollie, johnbillion, jeremyfelt, kreppar, dushakov, TimothyBlynJacobs, Ipstenu, khag7, knutsp, Clorith, markjaquith, joostdevalk, SergeyBiryukov.
Merges [48856] to the 5.5 branch.
Fixes#51064.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48857 602fd350-edb4-49c9-b593-d223f7449a82
Any notices in that file happen before `WP_DEBUG` takes effect, and should not be displayed with the `error_reporting` level previously set in `wp-load.php`.
Adding the class when there is no notice displayed results in extra padding under the admin bar, which should be avoided.
Follow-up to [20102], [21025], [26620], [47745].
Props akissz, tw2113, laxman-prajapati, sabernhardt, johnbillion, SergeyBiryukov.
Merges [48850] to the 5.5 branch.
Fixes#51073.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48851 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a PHP notice if the API returns a plugin with empty data for `blocks` key.
Props khag7, TwentyZeroTwo, justinahinon, TimothyBlynJacobs, dd32, SergeyBiryukov.
Merges [48842] to the 5.5 branch.
Fixes#51018.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48849 602fd350-edb4-49c9-b593-d223f7449a82
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.
Merges [48817] to the 5.5 branch.
Fixes#51042.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48819 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.
Merges [48808] to the 5.5 branch.
Fixes#50858.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48810 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.
Props TimothyBlynJacobs.
Merges [48796] to the 5.5 branch.
Fixes#51021.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48807 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.
Merges [48800] and [48801] to the 5.5 branch.
Fixes#50945.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48806 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.
Merges [48792] to the 5.5 branch.
Fixes#50912.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48804 602fd350-edb4-49c9-b593-d223f7449a82
Add a missing @since value for 5.5 and potential default filter names.
Props johnbillion.
Reviewed by whyisjake, SergeyBiryukov.
Merges [48777] and [48778] to the 5.5 branch.
Fixes#50891.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48779 602fd350-edb4-49c9-b593-d223f7449a82
Follow-up to [48039], [48283], [48749], [48757], [48758].
This brings the changes to the 5.5 branch.
Props TimothyBlynJacobs, SergeyBiryukov, whyisjake.
Fixes#37011.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48759 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.
This brings the changes from [48750] to the 5.5 branch.
Props johnbillion.
Fixes#50868, see [48750].
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48756 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], see [48749].
This brings the changes to the 5.5 branch.
Props sabernhardt, audrasjb, johnstonphilip, demetris, SergeyBiryukov.
Fixes#37011.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48755 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.
Reviewed by desrosj, SergeyBiryukov.
Merges [48748] and [48751] to the 5.5 branch.
Fixes#49236.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48752 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.
Merges [48745] to the 5.5 branch.
Reviewed by desrosj, SergeyBiryukov.
Props bpayton, pbiron.
Fixes#50852.
git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48747 602fd350-edb4-49c9-b593-d223f7449a82