@@ -3775,13 +3775,15 @@ function wp_nonce_ays( $action ) {
37753775 *
37763776 * @global WP_Query $wp_query WordPress Query object.
37773777 *
3778- * @param string|WP_Error $message Optional. Error message. If this is a WP_Error object,
3779- * and not an Ajax or XML-RPC request, the error's messages are used.
3780- * Default empty string.
3781- * @param string|int $title Optional. Error title. If `$message` is a `WP_Error` object,
3782- * error data with the key 'title' may be used to specify the title.
3783- * If `$title` is an integer, then it is treated as the response code.
3784- * Default empty string.
3778+ * @param string|WP_Error|int $message Optional. Error message. If this is a WP_Error object,
3779+ * and not an Ajax or XML-RPC request, the error's messages are used.
3780+ * An integer is echoed as the entire response body by legacy Ajax
3781+ * handlers, which use -1 for a failed nonce or capability check,
3782+ * 0 for failure, and 1 for success. Default empty string.
3783+ * @param string|int $title Optional. Error title. If `$message` is a `WP_Error` object,
3784+ * error data with the key 'title' may be used to specify the title.
3785+ * If `$title` is an integer, then it is treated as the response code.
3786+ * Default empty string.
37853787 * @param string|array|int $args {
37863788 * Optional. Arguments to control behavior. If `$args` is an integer, then it is treated
37873789 * as the response code. Default empty array.
@@ -3801,7 +3803,7 @@ function wp_nonce_ays( $action ) {
38013803 * @type bool $exit Whether to exit the process after completion. Default true.
38023804 * }
38033805 * @return void Never returns if `$args['exit']` is true (the default), otherwise returns void.
3804- *
3806+ * @phpstan-param string|WP_Error|int<-1, max> $message
38053807 * @phpstan-return ( $args is array{exit: false} ? void : never )
38063808 */
38073809function wp_die ( $ message = '' , $ title = '' , $ args = array () ) {
0 commit comments