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
This updates the `dealerdirect/phpcodesniffer-composer-installer` package to allow installing version `0.7.0` which supports composer 2.0.
Props itowhid06, jrf.
Fixes#51624.
git-svn-id: https://develop.svn.wordpress.org/trunk@49306 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
Plugins shouldn't be setting the global post object during a REST API request, but if they did this could cause unexpected errors when creating a post with a template.
Props Kipperlenny, TimothyBlynJacobs.
Fixes#49695.
git-svn-id: https://develop.svn.wordpress.org/trunk@49301 602fd350-edb4-49c9-b593-d223f7449a82
The comments controller now uses the `rest_get_route_for_post` function introduced in WordPress 5.5 to generate the link. This function is filterable to allow for custom controllers to properly define their REST API route.
Props dsifford, TimothyBlynJacobs.
Fixes#44152.
git-svn-id: https://develop.svn.wordpress.org/trunk@49299 602fd350-edb4-49c9-b593-d223f7449a82
This method never worked properly and cannot be fixed due to incompatible method signatures.
Props flixos90, kadamwhite, jnylen0, TimothyBlynJacobs.
Fixes#39959.
git-svn-id: https://develop.svn.wordpress.org/trunk@49295 602fd350-edb4-49c9-b593-d223f7449a82
- Make form inputs stacked instead of inline.
- Provide a visible label for the app name.
- Add screen reader text to dismiss button.
- Make "Revoke" button label more descriptive.
- Use aria-disabled instead of disabled to avoid focus loss.
- Display password in a readonly input to assist copy and paste.
- Remove large sections of italic text.
- Use `.form-wrap` and `.form-field` to give consistent form styling.
- Improve labeling and placeholder text.
Props alexstine, georgestephanis, afercia, TimothyBlynJacobs.
Fixes#51580.
git-svn-id: https://develop.svn.wordpress.org/trunk@49294 602fd350-edb4-49c9-b593-d223f7449a82
This updates `core_auto_updates_settings()` to account for the new `beta` and `rc` values for the `WP_AUTO_UPDATE_CORE` constant.
Additionally, recognize these new values as acceptable in Site Health tests.
Follow-up to [48804], [49245], [49254].
Fixes#51319. See #50907.
git-svn-id: https://develop.svn.wordpress.org/trunk@49292 602fd350-edb4-49c9-b593-d223f7449a82
The default title is now set to "(no title supported)" instead of "Auto Draft".
Props garrett-eclipse, rajanit2000, bridgetwillard, donmhico, nrqsnchz.
Fixes#45516.
git-svn-id: https://develop.svn.wordpress.org/trunk@49288 602fd350-edb4-49c9-b593-d223f7449a82
This wraps the search string in a `<strong>` tag, which makes easier to parse visually especially when your search string also contains double quotes.
Props Mista-Flo, mapk, sergeybiryukov.
Fixes#37353.
git-svn-id: https://develop.svn.wordpress.org/trunk@49284 602fd350-edb4-49c9-b593-d223f7449a82
Previously, any `input` or `select` inside of a `.form-invalid` wrapper would get the red border highlighting, including submit buttons which was not visually correct. This now only applies to form elements with a class of `.form-required` inside of the `.form-invalid` wrapper. It also continues to apply the border to elements with both classes (`.form-invalid.form-required`) as that is how some of the admin markup is structured.
Plugin authors may need to do the same sort of class application seen in this commit, i.e. add `.form-required` to certain form elements.
Props sabernhardt, dilipbheda, helen.
Fixes#50686.
git-svn-id: https://develop.svn.wordpress.org/trunk@49283 602fd350-edb4-49c9-b593-d223f7449a82
Apps may now optionally include an `app_id` parameter when directing the user to the Authorize Application screen. This allows for instances of an application to be identified and potentially revoked or blocked.
Props TimothyBlynJacobs, georgestephanis.
Fixes#51583.
git-svn-id: https://develop.svn.wordpress.org/trunk@49276 602fd350-edb4-49c9-b593-d223f7449a82