1 filter_example.module _filter_example_filter_foo_tips($filter, $format, $long = FALSE)

Filter tips callback for foo filter.

The tips callback allows filters to provide help text to users during the content editing process. Short tips are provided on the content editing screen, while long tips are provided on a separate linked page. Short tips are optional, but long tips are highly recommended.

Related topics


modules/examples/filter_example/filter_example.module, line 145
Hook implementations for the Filter Example module.


function _filter_example_filter_foo_tips($filter, $format, $long = FALSE) {
  $replacement = isset($filter->settings['filter_example_foo']) ? $filter->settings['filter_example_foo'] : 'bar';
  if (!$long) {
    // This string will be shown in the content add/edit form.
    return t('<em>foo</em> replaced with %replacement.', array('%replacement' => $replacement));
  else {
    return t('Every instance of "foo" in the input text will be replaced with a configurable value. You can configure this value and put whatever you want there. The replacement value is "%replacement".', array('%replacement' => $replacement));