1 filter.admin.inc _filter_admin_format_get_tips($format, $filter_name)

Get filter tips for an individual filter within a text format.

This will return tips as though any editor were disabled.

Parameters

stdClass $format: The format from which to pull filter tips.

string $filter_name: The machine name of the filter from which to get tips.

File

core/modules/filter/filter.admin.inc, line 1027
Admin page callbacks for the Filter module.

Code

function _filter_admin_format_get_tips($format, $filter_name) {
  // Temporarily disable editor setting.
  $editor_settings = $format->editor;
  $format->editor = FALSE;

  $filter_info = filter_get_filters();

  if (isset($filter_info[$filter_name]['tips callback'])) {
    $tips = $filter_info[$filter_name]['tips callback']($format->filters[$filter_name], $format, FALSE);
  }

  // Restore editor settings.
  $format->editor = $editor_settings;

  return isset($tips) ? $tips : NULL;
}