code = $code; $this->message = $message; } public function getErrorMessage($code = '') { if (!$this->code) { return ''; } if ($code) { throw new \RuntimeException('todo'); } return $this->code . ($this->message ? " - {$this->message}" : ''); } } function is_wp_error($error) { return $error instanceof WPError; } function _doing_it_wrong($function, $message = '', $version = '') { exit(\Tools::displayError($function . ' was called incorrectly. ' . $message . ' ' . $version)); }