frontend_error

Triggered on website’s error pages. Allows changing a default error message.

Helpdesk

Input (passed by reference)

$params['code'] int Error code.
$params['message'] string Error message text. Can be modified by a plugin.
$params['exception'] waException Exception class instance.
$params['action'] helpdeskViewAction Action class instance.
$params['view'] waSmarty3View Smarty template engine class instance.
… your plugin code …

Output

Helpdesk

Plugin code example

PHP

public function frontendError(&$params)
{
    if ($params['code'] == '404') {
        $params['message'] = _wp('Sorry, this page is not available.');
    }
}