In addition to AJAX and XML-RPC requests, `wp_die()` now handles JSON requests correctly, returning information in the expected content type.
Props spacedmonkey.
See #45933, #44458.
git-svn-id: https://develop.svn.wordpress.org/trunk@44625 602fd350-edb4-49c9-b593-d223f7449a82
This changeset removes the hack that was used before to display more complex HTML markup than a simple message in the default PHP error template via `wp_die()`. By removing HTML markup from the arguments passed to `wp_die()` it furthermore paves the way for supporting other content types than the default.
The message and arguments can be modified with new `wp_php_error_message` and `wp_php_error_args` filters respectively.
Furthermore this changeset fixes a few issues of functions not existing which could potentially have caused fatal errors when executed early in the WordPress bootstrap process.
Props flixos90, spacedmonkey.
See #45933, #44458.
git-svn-id: https://develop.svn.wordpress.org/trunk@44624 602fd350-edb4-49c9-b593-d223f7449a82
This is a first step on pausing extensions less aggressively. If a plugin or theme only causes a crash in the frontend, there is no point in pausing it in the admin backend.
See #45940, #44458.
git-svn-id: https://develop.svn.wordpress.org/trunk@44623 602fd350-edb4-49c9-b593-d223f7449a82
- Remove duplicate parameter names.
- Fix the wrong value being passed in the second parameter.
- Correct the type of the `$message` parameter.
Props ChriCo.
Fixes#45595.
git-svn-id: https://develop.svn.wordpress.org/trunk@44620 602fd350-edb4-49c9-b593-d223f7449a82
When the `$authordata` global isn't defined, return an empty string, rather than `void`.
Props mukesh27, subrataemfluence.
Fixes#45597.
git-svn-id: https://develop.svn.wordpress.org/trunk@44616 602fd350-edb4-49c9-b593-d223f7449a82
This matches the authentication check in `admin-ajax.php`, and allows the authentication method to be filtered.
Props jmdodd.
Fixes#45475.
git-svn-id: https://develop.svn.wordpress.org/trunk@44615 602fd350-edb4-49c9-b593-d223f7449a82
Prevent a notification from being sent when an unrecognised value is passed in the `$notify` parameter.
Props cthreelabs, 360zen.
Fixes#44293.
git-svn-id: https://develop.svn.wordpress.org/trunk@44611 602fd350-edb4-49c9-b593-d223f7449a82
Throughout the core privacy functions, `WP_User_Request` instances were stored in variables named both `$request`, and `$request_data`. This changes all occurrences of `$request_data` to `$request` for better consistency.
Props nateallen, bruceallen, garrett-eclipse.
Fixes#44708.
git-svn-id: https://develop.svn.wordpress.org/trunk@44606 602fd350-edb4-49c9-b593-d223f7449a82
This is a followup to [44603]. The default value should be last, not somewhere in the middle.
Props swissspidy.
Fixes#44697.
git-svn-id: https://develop.svn.wordpress.org/trunk@44605 602fd350-edb4-49c9-b593-d223f7449a82
The `$for_user_id` parameter is an `int`, not a `string`, so the default value should be `0`, rather than an empty string.
Props subrataemfluence.
Fixes#44697.
git-svn-id: https://develop.svn.wordpress.org/trunk@44603 602fd350-edb4-49c9-b593-d223f7449a82
The `$force` parameter is a `bool`, not a `string`. The matching `wp_cache_get()` docblock has the correct type.
Props subrataemfluence.
Fixes#44454.
git-svn-id: https://develop.svn.wordpress.org/trunk@44601 602fd350-edb4-49c9-b593-d223f7449a82
- Set `grunt build` as the build script
- Disable testing and deployment options
- Customise the Slack integration message
- Only show the Slack message when the status changes
See #44276.
git-svn-id: https://develop.svn.wordpress.org/trunk@44595 602fd350-edb4-49c9-b593-d223f7449a82
AppVeyor allows us to test in a Windows environment. This first iteration tests that building works correctly.
Props netweb.
Fixes#44276.
git-svn-id: https://develop.svn.wordpress.org/trunk@44594 602fd350-edb4-49c9-b593-d223f7449a82
In the `@return` tag description for `get_post_modified_time()`, `get_the_time()`, and `get_post_time()`, the `$d` parameter is incorrectly referred to as `$id`.
Props behzod.
Fixes#45323.
git-svn-id: https://develop.svn.wordpress.org/trunk@44592 602fd350-edb4-49c9-b593-d223f7449a82
This is a followup to [42828], ensuring that the `get_{$adjacent}_post_excluded_terms` filter is always passed an array, as expected.
Props soulseekah, zottto.
Fixes#43521.
git-svn-id: https://develop.svn.wordpress.org/trunk@44591 602fd350-edb4-49c9-b593-d223f7449a82
This sanitisation only needs to be run in `::update()` to correctly clean up the input.
Props welcher, greenshady.
Fixes#42461.
git-svn-id: https://develop.svn.wordpress.org/trunk@44589 602fd350-edb4-49c9-b593-d223f7449a82
What age were you when you learned that there's a `$user_id` global, as well as `$user_ID` global? I was today years old.
Props pento, mukesh27.
Fixes#43448.
git-svn-id: https://develop.svn.wordpress.org/trunk@44586 602fd350-edb4-49c9-b593-d223f7449a82
When `home` and `siteurl` are different, the customizer preview iframe will be blank in Chrome and Safari, due to their `X-Frame-Options` implementation quirks.
Changing this to `SAMEORIGIN` and adding the `frame-ancestors` Content Security Policy gives the correct behaviour.
Props fullyint.
Fixes#40020.
git-svn-id: https://develop.svn.wordpress.org/trunk@44580 602fd350-edb4-49c9-b593-d223f7449a82
[41215] supresses these irrelevant error messages from the front end, this removes them from the error log, too.
Props jeherve.
Fixes#43815.
git-svn-id: https://develop.svn.wordpress.org/trunk@44578 602fd350-edb4-49c9-b593-d223f7449a82
This contains a copy of the block, unmodified by other filter functions, so that plugins have a clean reference to work from, if they need.
Props dmsnell.
Fixes#45451.
git-svn-id: https://develop.svn.wordpress.org/trunk@44576 602fd350-edb4-49c9-b593-d223f7449a82