1 filter_example.module | _filter_example_filter_time_process($text, $filter) |
Time filter process callback.
In the process step, we'll search for our escaped time tags and do the real filtering by replacing <time /> with the current time.
Related topics
File
- modules/
examples/ filter_example/ filter_example.module, line 172 - Hook implementations for the Filter Example module.
Code
function _filter_example_filter_time_process($text, $filter) {
return str_replace('[filter-example-time]', '<em>' . format_date(time(), 'medium', '', 'Europe/London') . '</em>', $text);
}