function _filter_example_filter_time_prepare in Examples for Developers 7
Time filter prepare callback.
We'll use [filter-example-time] as a replacement for the time tag. Note that in a more complicated filter a closing tag may also be required. For more information, see "Temporary placeholders and delimiters" at http://drupal.org/node/209715.
Related topics
1 string reference to '_filter_example_filter_time_prepare'
- filter_example_filter_info in filter_example/
filter_example.module - Implements hook_filter_info().
File
- filter_example/
filter_example.module, line 174 - Module file for filter_example.
Code
function _filter_example_filter_time_prepare($text, $filter) {
return preg_replace('!<time ?/>!', '[filter-example-time]', $text);
}