aam_framework_preference_methods_filter
Purpose
Add callable methods to a preference object.
Callback
- Type: Filter.
- Arguments:
$methods,$preference. - Return: the filtered first argument.
Example
add_filter('aam_framework_preference_methods_filter', function ($methods, $preference) {
$methods['myapp_source'] = function () {
return 'custom';
};
return $methods;
}, 10, 2);
Adds a myapp_source() method to preference objects; AAM binds the closure to the object.
See the complete hook list.