aam_deny_access_action

Purpose

Observe an access denial before AAM completes the response.

Callback

Example

add_action('aam_deny_access_action', function ($redirect = null) {
    error_log('AAM denied access' . ($redirect ? ' with redirect' : ''));
}, 10, 1);

Records a denial. The redirect argument is optional because Complete Package also emits this action without arguments.

See the complete hook list.