wp_error = new WP_Error($code, $message); parent::__construct($message, $code); } /** * Displays the exception * * @author oncletom * @return string Exception formatted messages */ public function __toString() { return sprintf('
  1. %s
', implode('
  • ', $this->wp_error->get_error_messages()) ); } }