filter_permission_name

function filter_permission_name

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

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!filter!filter.module/function/filter_permission_name/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部