_filter_tips

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/filter/filter.module, строка 902

Версии
5 – 6
_filter_tips($format, $long = FALSE)

Helper function for fetching filter tips.

▾ 3 функции вызывают _filter_tips()

filter_admin_format_form in modules/filter/filter.module
Generate a filter format form.
filter_form in modules/filter/filter.module
Generate a selector for choosing a format in a form.
filter_tips_long in modules/filter/filter.module
Menu callback; show a page with long filter tips.

Код

<?php
function _filter_tips($format, $long = FALSE) {
  if ($format == -1) {
    $formats = filter_formats();
  }
  else {
    $formats = array(db_fetch_object(db_query("SELECT * FROM {filter_formats} WHERE format = %d", $format)));
  }

  $tips = array();

  foreach ($formats as $format) {
    $filters = filter_list_format($format->format);

    $tips[$format->name] = array();
    foreach ($filters as $id => $filter) {
      if ($tip = module_invoke($filter->module, 'filter_tips', $filter->delta, $format->format, $long)) {
        $tips[$format->name][] = array('tip' => $tip, 'id' => $id);
      }
    }
  }

  return $tips;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему