function filter_permission_name

7.x 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).

15 calls to filter_permission_name()
BlockTestCase::setUp in drupal-7.x/modules/block/block.test
Sets up a Drupal site for running functional and integration tests.
FilterAdminTestCase::setUp in drupal-7.x/modules/filter/filter.test
Sets up a Drupal site for running functional and integration tests.
FilterDefaultFormatTestCase::testDefaultTextFormats in drupal-7.x/modules/filter/filter.test
Tests if the default text format is accessible to users.
FilterFormatAccessTestCase::setUp in drupal-7.x/modules/filter/filter.test
Sets up a Drupal site for running functional and integration tests.
FilterFormatAccessTestCase::testFormatPermissions in drupal-7.x/modules/filter/filter.test
Tests the Filter format access permissions functionality.

... See full list

File

drupal-7.x/modules/filter/filter.module, line 373
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;
}