aam_access_level_methods_filter

Purpose

Add callable methods to an access-level object.

Callback

Example

add_filter('aam_access_level_methods_filter', function ($methods, $access_level, $core_instance) {
    $methods['myapp_label'] = function () {
        return $this->get_display_name();
    };
    return $methods;
}, 10, 3);

Adds myapp_label() to access-level objects. AAM binds the closure to each instance before storing it.

See the complete hook list.