WordPress at a glance
function is not described

WP_Super_Cache_Rest_Test_Cache::format_error() protected WPSCache 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.7.1

<?php
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;
}