Returns the machine-readable permission name for a provided text format.
$format: An object representing a text format.
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).
function filter_permission_name($format) {
if (isset($format->format) && $format->format != filter_fallback_format()) {
return 'use text format ' . $format->format;
}
return FALSE;
}