WP_Super_Cache_Rest_Test_Cache::format_error()
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)
- -
WP_Super_Cache_Rest_Test_Cache::format_error() WP Super Cache Rest Test Cache::format error code WPSCache 1.12.4
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; }