function filter_format_exists

filter_format_exists($format_id)

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

filter_format_load()

File

modules/filter/filter.module, line 326
Framework for handling the filtering of content.

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();
}

© 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_format_exists/7.x