You are here

function _customfilter_filter_tips in Custom filter 7

Same name and namespace in other branches
  1. 7.2 customfilter.module \_customfilter_filter_tips()

Implements filter_tips()

Parameters

object $filter: This is a object with informations about the filter

object $format: This is a object with informations about the filter

boolean $long: (optional). TRUE if is the log tip, FALSE otherwise

Return value

string string with the tip for the filter

1 string reference to '_customfilter_filter_tips'
customfilter_filter_info in ./customfilter.module
Implements hook_filter_info().

File

./customfilter.module, line 59
Allows the users with the right permission to define custom filters.

Code

function _customfilter_filter_tips($filter, $format, $long = FALSE) {
  $col = $long ? 'longtip' : 'shorttip';
  $filters = _customfilter_get_filters();
  foreach ($filters as $item) {
    if ($item['type'] == $filter->name) {
      return $item[$col];
    }
  }
  return '';
}