[ Index ]

PHP Cross Reference of BuddyPress




/src/bp-forums/bbpress/bb-includes/backpress/ -> class.wp-error.php (summary)

(no description)

File Size: 208 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Error:: (10 methods):

Class: WP_Error  - X-Ref

WordPress Error class.

Container for checking for WordPress errors and error messages. Return
WP_Error and use {@link is_wp_error()} to check if this class is returned.
Many core WordPress functions pass this class in the event of an error and
if not handled properly will result in code errors.

__construct($code = '', $message = '', $data = '')   X-Ref
PHP4 Constructor - Sets up error message.

If code parameter is empty then nothing will be done. It is possible to
add multiple messages to the same code, but with other methods in the

All parameters are optional, but if the code parameter is set, then the
data parameter is optional.

since: 2.1.0
return: WP_Error
param: string|int $code Error code
param: string $message Error message
param: mixed $data Optional. Error data.

WP_Error($code = '', $message = '', $data = '')   X-Ref
No description

get_error_codes()   X-Ref
Retrieve all error codes.

since: 2.1.0
return: array List of error codes, if avaiable.

get_error_code()   X-Ref
Retrieve first error code available.

since: 2.1.0
return: string|int Empty string, if no error codes.

get_error_messages($code = '')   X-Ref
Retrieve all error messages or error messages matching code.

since: 2.1.0
return: array Error strings on success, or empty array on failure (if using codee parameter).
param: string|int $code Optional. Retrieve messages matching code, if exists.

get_error_message($code = '')   X-Ref
Get single error message.

This will get the first message available for the code. If no code is
given then the first code available will be used.

since: 2.1.0
return: string
param: string|int $code Optional. Error code to retrieve message.

get_error_data($code = '')   X-Ref
Retrieve error data for error code.

since: 2.1.0
return: mixed Null, if no errors.
param: string|int $code Optional. Error code.

add($code, $message, $data = '')   X-Ref
Append more error messages to list of error messages.

since: 2.1.0
param: string|int $code Error code.
param: string $message Error message.
param: mixed $data Optional. Error data.

add_data($data, $code = '')   X-Ref
Add data for error code.

The error code can only contain one error data.

since: 2.1.0
param: mixed $data Error data.
param: string|int $code Error code.

is_wp_error($thing)   X-Ref
Check whether variable is a WordPress Error.

Looks at the object and if a WP_Error class. Does not check to see if the
parent is also WP_Error, so can't inherit WP_Error and still use this

since: 2.1.0
return: bool True, if WP_Error. False, if not WP_Error.
param: mixed $thing Check if unknown variable is WordPress Error object.

Generated: Sun Jul 21 01:00:55 2024 Cross-referenced by PHPXref 0.7.1