1 filter.module filter_permission_name($format)

Returns the machine-readable permission name for a provided text format.

Parameters

$format: An object representing a text format.

Return value

The machine-readable permission name, or FALSE if the provided text format: is malformed or is the fallback format (which is available to all users).

File

core/modules/filter/filter.module, line 682
Framework for handling the filtering of content.

Code

function filter_permission_name($format) {
  if (isset($format->format) && $format->format != filter_fallback_format()) {
    return 'use text format ' . $format->format;
  }
  return FALSE;
}