Improve handling of ambiguous return values to determine if a blog is installed.
Props zieladam, xknown.
Merges [49377] to trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@49386 602fd350-edb4-49c9-b593-d223f7449a82
Throw an error for incorrect attachment IDs when requesting a media object to ensure return signature is correct and doesn't include incorrectly typed values within the object.
Props zieladam, peterwilsoncc, whyisjake.
Merges [49376] to trunk.
See #49905.
git-svn-id: https://develop.svn.wordpress.org/trunk@49385 602fd350-edb4-49c9-b593-d223f7449a82
This makes the name consistent with the documentation and the `inherits()` function signature.
Props ribaricplusplus, davidbaumwald.
Fixes#51652.
git-svn-id: https://develop.svn.wordpress.org/trunk@49353 602fd350-edb4-49c9-b593-d223f7449a82
Including some props I missed on the commit for Twenty Twenty, I am sorry.
Props: kjellr, beafialho, melchoyce, ryelle, jffng, bridgetwillard.
Fixes#51099.
git-svn-id: https://develop.svn.wordpress.org/trunk@49348 602fd350-edb4-49c9-b593-d223f7449a82
This only applies to the standalone menu screen; fixes for the customizer will be handled separately.
Props audrasjb, garrett-eclipse.
See #49375.
git-svn-id: https://develop.svn.wordpress.org/trunk@49346 602fd350-edb4-49c9-b593-d223f7449a82
This shows a `_doing_it_wrong()` message and also returns false instead of true if no array of formats is passed in `add_theme_support()`, avoiding a PHP error.
Post formats maintainership comes full circle. 🙃
Props Mista-Flo, sproutchris, garrett-eclipse.
Fixes#51390.
git-svn-id: https://develop.svn.wordpress.org/trunk@49344 602fd350-edb4-49c9-b593-d223f7449a82
This is a prerelease version to avoid some errors in 5.6 beta 2. We need to be sure that we ship with a released version by 5.6 RC.
Props mweichert.
Fixes#51621. See #50564.
git-svn-id: https://develop.svn.wordpress.org/trunk@49338 602fd350-edb4-49c9-b593-d223f7449a82
This has to do with the password generator, which does not need to generate and cache passwords in JS as that's already done in PHP.
Props adamsilverstein, sarahricker.
Fixes#51613.
git-svn-id: https://develop.svn.wordpress.org/trunk@49337 602fd350-edb4-49c9-b593-d223f7449a82
App Passwords rely on the Authorization header to transport the Basic Auth credentials. For Apache web servers, WordPress automatically includes a RewriteRule to populate the value for servers running in CGI or FastCGI that wouldn't ordinarily populate the value.
This tests if the header is being filled with the expected values. For Apache users, we direct the user to visit the Permalinks settings to flush their permalinks. For all other users, we direct them to a help document on developer.wordpress.org.
Props Clorith, marybaum, TimothyBlynJacobs.
Fixes#51638.
git-svn-id: https://develop.svn.wordpress.org/trunk@49334 602fd350-edb4-49c9-b593-d223f7449a82
Previously, we only supported `application/json` which prevented using subtypes like `application/activity+json`. This allows for the REST API to `json_decode` the body of requests using a JSON subtype `Content-Type`. Additionally, `wp_die()` now properly sends the error as JSON when a JSON subtype is specified in the `Accept` header.
Props pfefferle.
Fixes#49404.
git-svn-id: https://develop.svn.wordpress.org/trunk@49329 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a PHP notice when creating a post with multiple taxonomies both having a default term.
Props yakimun, szaqal21, hareesh-pillai, audrasjb.
Fixes#51320.
git-svn-id: https://develop.svn.wordpress.org/trunk@49328 602fd350-edb4-49c9-b593-d223f7449a82
This stems from longer translations on the User table, but this will apply to any posts column in a list table. Hyphenation should typically just apply to the column header, as the cell contents are just a count.
This does appear to have some browser inconsistencies, so may need further adjustment in the future.
Props audrasjb, justinahinon.
Fixes#50838.
git-svn-id: https://develop.svn.wordpress.org/trunk@49317 602fd350-edb4-49c9-b593-d223f7449a82
Replace the `WP_Taxonomy` object with the taxonomy slug in the values passed to the actions `edit_term_taxonomy` and `edited_term_taxonomy` within `wp_modify_term_count_by_now()`.
Follow up to [49141], [49171].
Props Chouby, lcyh78.
Fixes#40351.
git-svn-id: https://develop.svn.wordpress.org/trunk@49316 602fd350-edb4-49c9-b593-d223f7449a82
When using WordPress trunk with Gutenberg master, there's an incompatibility causing
the dynamic block generated classes to be omitted.
This commit refactors the block supports to fix that problem.
Props nosolosw.
Fixes#51606.
git-svn-id: https://develop.svn.wordpress.org/trunk@49310 602fd350-edb4-49c9-b593-d223f7449a82
This switches to the new `rest_default_additional_properties_to_false()` function which doesn't have this issue and deprecates the `WP_REST_Meta_Fields::default_additional_properties_to_false()` method.
Props austin880625.
Fixes#51389.
git-svn-id: https://develop.svn.wordpress.org/trunk@49308 602fd350-edb4-49c9-b593-d223f7449a82
The REST API and XML-RPC now uses the same detection methodology for empty comment content as `wp_handle_comment_submission()`. Specifically, comments now have their content trimmed and '0' is allowed.
Props jaswrks, rmccue, dd32, rachelbaker, Cawa-93, aduth, TimothyBlynJacobs.
Fixes#43177.
git-svn-id: https://develop.svn.wordpress.org/trunk@49303 602fd350-edb4-49c9-b593-d223f7449a82
In particular, this allows for sending `status=inherit` to an attachment if it's current status is `inherit`. This status would be rejected because it is an "internal" post status which isn't exposed.
As a general rule, a developer should always be able to PUT back a GET response without error.
Props dfenton, pputzer, TimothyBlynJacobs.
Fixes#40399.
git-svn-id: https://develop.svn.wordpress.org/trunk@49302 602fd350-edb4-49c9-b593-d223f7449a82