NewsPublisher Delete Button Question

It’s not a good idea to set $this->existing to a function, which is what you’re doing.

I would do it this way:

if (isset($_POST['np_existing']) &&
        $_POST['np_existing'] == 'true') {
              $this->existing = is_numeric($_POST['np_doc_id']);

    If (is_numeric($_POST['np_doc_id'])) {
        $this->modx->log(modX::LOG_LEVEL_ERROR, 
            'Doc ID is an integer');
    } else {
        $this->modx->log(modX::LOG_LEVEL_ERROR, 
            'Doc ID is NOT an  integer');
    }
}

If no message error message appears, it means the $_POST variable are not set or not true.