WP_Super_Cache_Rest_Test_Cache::format_error()protectedWPSCache 1.0

{} It's a method of the class: WP_Super_Cache_Rest_Test_Cache{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->format_error( $error );
$error(WP_Error) (required)
-

Code of WP_Super_Cache_Rest_Test_Cache::format_error() WPSCache 1.8

protected function format_error( WP_Error $error ) {
	$messages = array();
	foreach ( $error->get_error_codes() as $code ) {
		foreach ( $error->get_error_messages( $code ) as $err ) {
			$messages[] = $err;
		}
	}

	return $messages;
}