filter_permission_name

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

▾ 6 functions call filter_permission_name()

default_install in profiles/default/default.install
Implements hook_install().
filter_access in modules/filter/filter.module
Checks if a user has access to a particular text format.
filter_admin_format_form_submit in modules/filter/filter.admin.inc
Process text format form submissions.
filter_get_roles_by_format in modules/filter/filter.module
Retrieves a list of roles that are allowed to use a given text format.
filter_permission in modules/filter/filter.module
Implements hook_permission().
filter_update_7005 in modules/filter/filter.install
Integrate text formats with the user permissions system.

Code

modules/filter/filter.module, line 337

<?php
function filter_permission_name($format) {
  if (isset($format->format) && $format->format != filter_fallback_format()) {
    return 'use text format ' . $format->format;
  }
  return FALSE;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.