Function Filter
No security coverage
Text filter for replace tokens [function:*] on function result.
Installation:
1. Install module
2. Enable filter "Function filter" on text format form.
Usage:
1. Implements hook_filter_functions():
function mymodule_filter_functions() {
return [
'current_date' => [
'function' => 'mymodule_current_date',
'cache' => FALSE,
],
];
}
2. Write mymodule_current_date() function:
function mymodule_current_date($format = 'r') {
return date($format);
}
3. Add in text token [function:current_date:d.m.Y] or [function:current_date].
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Release date | |
|---|---|---|---|---|
| 2.0.0 | Stable | Jan 26, 2023 |