You are here

function _signature_forum_filter_formats in Signatures for Forums 7

Get a list of filter formats, the currently logged in user can use. Usually this is an administrator, so all are returned.

Return value

An associative array. Keys are format IDs. Values are format names.

2 calls to _signature_forum_filter_formats()
signature_forum_form_user_admin_settings_alter in ./signature_forum.module
Alter the account settings form.
_signature_forum_validate_short_content_format in ./signature_forum.module
FAPI validation for the signature_forum_short_content_format.

File

./signature_forum.module, line 369
Tweaks signatures in ways inspired by other traditional forum software:

Code

function _signature_forum_filter_formats() {
  global $user;
  $formats = array();
  foreach (filter_formats($user) as $format) {
    $formats[$format->format] = $format->name;
  }
  return $formats;
}