Changeset 30355 for trunk/src/wp-includes/functions.php
- Timestamp:
- 11/16/2014 06:10:58 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r30207 r30355 2332 2332 * This function complements the die() PHP function. The difference is that 2333 2333 * HTML will be displayed to the user. It is recommended to use this function 2334 * only ,when the execution should not continue any further. It is not2334 * only when the execution should not continue any further. It is not 2335 2335 * recommended to call this function very often and try to handle as many errors 2336 * as possible silently. 2336 * as possible silently or more gracefully. 2337 * 2338 * As a shorthand, the desired HTTP response code may be passed as an integer to 2339 * the $title parameter (the default title would apply) or the $args parameter. 2337 2340 * 2338 2341 * @since 2.0.4 2339 2342 * 2340 * @param string $message Optional. Error message. Default empty. 2341 * @param string $title Optional. Error title. Default empty. 2342 * @param string|array $args Optional. Arguments to control behavior. Default empty array. 2343 * @param string|WP_Error $message Optional. Error message. Default empty. 2344 * If this is a WP_Error object, the error's messages are used. 2345 * @param string $title Optional. Error title. Default is a generic title. 2346 * If $message is a WP_Error object, error data with the key 2347 * 'title' may be used to specify the title. 2348 * @param string|array|int $args { 2349 * Optional. Arguments to control behavior. Default empty array. 2350 * If $args is an integer, then it is treated as the response code. 2351 * 2352 * @type int $response The HTTP response code. Default 500. 2353 * @type bool $back_link Whether to include a link to go back. Default false. 2354 * @type string $text_direction The text direction. Defaults to the value of is_rtl(). 2355 * Accepts 'rtl'. This is only useful internally, when WordPress 2356 * is still loading and the site's locale is not set up yet. 2357 * } 2343 2358 */ 2344 2359 function wp_die( $message = '', $title = '', $args = array() ) { 2360 2361 if ( is_int( $args ) ) { 2362 $args = array( 'response' => $args ); 2363 } elseif ( is_int( $title ) ) { 2364 $args = array( 'response' => $title ); 2365 $title = ''; 2366 } 2367 2345 2368 if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { 2346 2369 /**
Note: See TracChangeset
for help on using the changeset viewer.