WordPress.org

Make WordPress Core

Changeset 38518


Ignore:
Timestamp:
09/04/2016 03:40:04 AM (3 years ago)
Author:
DrewAPicture
Message:

Docs: Update the $message parameter for _default_wp_die_handler() to notate that it can also accept a WP_Error object.

Additionally, update the $message parameter description in the DocBlock for wp_die() to make it explicitly clear messages derived from a passed WP_Error object will only be evaluated if not performing an Ajax or XML-RPC request (as both default handlers completely ignore WP_Error object messages).

See #37770.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r38505 r38518  
    25732573 *
    25742574 * @param string|WP_Error  $message Optional. Error message. If this is a WP_Error object,
    2575  *                                  the error's messages are used. Default empty.
     2575 *                                  and not an Ajax or XML-RPC request, the error's messages are used.
     2576 *                                  Default empty.
    25762577 * @param string|int       $title   Optional. Error title. If `$message` is a `WP_Error` object,
    25772578 *                                  error data with the key 'title' may be used to specify the title.
     
    26392640 * @access private
    26402641 *
    2641  * @param string       $message Error message.
    2642  * @param string       $title   Optional. Error title. Default empty.
    2643  * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
     2642 * @param string|WP_Error $message Error message or WP_Error object.
     2643 * @param string          $title   Optional. Error title. Default empty.
     2644 * @param string|array    $args    Optional. Arguments to control behavior. Default empty array.
    26442645 */
    26452646function _default_wp_die_handler( $message, $title = '', $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.