Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
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]
.
Project information
- 1 site reports using this module
- Created by xandeadx on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.