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.
Built from https://develop.svn.wordpress.org/trunk@49385
git-svn-id: http://core.svn.wordpress.org/trunk@49144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `install-changed` package records a hash of the `package.json` file locally in a text file and only runs `npm install` when there are changes to account for.
This builds on [47497], which only hashes the `package.json` file after a Grunt task is called. By using `npx install-changed` within the workflow files, the package is hashed before the first Grunt task is run.
Props ocean90.
See #50401, #49594.
Built from https://develop.svn.wordpress.org/trunk@49369
git-svn-id: http://core.svn.wordpress.org/trunk@49128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This reintroduces [49358] with a modification to the `.travis.yml` file to avoid an issue with `dotenv-expand` being unable to expand variables into `process.env` only on Travis.
The `LOCAL_PHPUNIT` environment variabl allows the desired version of PHPUnit to be specified when running the PHP tests within the local Docker environment.
Because support for newer versions of PHPUnit is not backported, some versions of PHP need the ability to run multiple versions of PHPUnit for different branches. This adds the flexibility needed to use the Docker environment within those older branches to run the PHP tests.
Props johnbillion, SergeyBiryukov.
See #50042.
Built from https://develop.svn.wordpress.org/trunk@49362
git-svn-id: http://core.svn.wordpress.org/trunk@49122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change introduces the `LOCAL_PHPUNIT` environment variable that allows the desired version of PHPUnit to be specified when running the PHP tests within the local Docker environment.
Because support for newer versions of PHPUnit is not backported, some versions of PHP need the ability to run multiple versions of PHPUnit for different branches. This adds the flexibility needed to use the Docker environment within those older branches to run the PHP tests.
Props johnbillion.
Fixes#50042.
Built from https://develop.svn.wordpress.org/trunk@49358
git-svn-id: http://core.svn.wordpress.org/trunk@49118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@49344
git-svn-id: http://core.svn.wordpress.org/trunk@49104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@49334
git-svn-id: http://core.svn.wordpress.org/trunk@49095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@49329
git-svn-id: http://core.svn.wordpress.org/trunk@49090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
It contains:
- Fix drop zone indicators for non blocks.
- Fix archives block render function.
- Code block: preserve indentation on paste.
- Turn off autocomplete for token input.
- Fix parent post selector: ensure initial value available, search performed, all results shown.
- Fix gallery block undo issue.
Props isabel_brison.
Fixes#51640.
Built from https://develop.svn.wordpress.org/trunk@49324
git-svn-id: http://core.svn.wordpress.org/trunk@49085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@49317
git-svn-id: http://core.svn.wordpress.org/trunk@49079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@49316
git-svn-id: http://core.svn.wordpress.org/trunk@49078 1a063a9b-81f0-0310-95a4-ce76da25c4cd