function filter_format_exists
Determines if a text format exists.
Parameters
$format_id: The ID of the text format to check.
Return value
TRUE if the text format exists, FALSE otherwise. Note that for disabled formats filter_format_exists() will return TRUE while filter_format_load() will return FALSE.
See also
1 string reference to 'filter_format_exists'
- filter_admin_format_form in modules/
filter/ filter.admin.inc - Form constructor for the text format add/edit form.
File
-
modules/
filter/ filter.module, line 326
Code
function filter_format_exists($format_id) {
return (bool) db_query_range('SELECT 1 FROM {filter_format} WHERE format = :format', 0, 1, array(
':format' => $format_id,
))->fetchField();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.