1 filter.module filter_format_load($format_id, $load_if_disabled = FALSE)

Loads a text format object from the database.

Parameters

$format_id: The format ID.

boolean $load_if_disabled: If TRUE the format will be loaded when disabled.

Return value

stdClass|FALSE: A fully-populated text format object or FALSE if the format is not found.

See also

filter_format_exists()

File

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

Code

function filter_format_load($format_id, $load_if_disabled = FALSE) {
  $formats = filter_formats(NULL, $load_if_disabled);
  return isset($formats[$format_id]) ? $formats[$format_id] : FALSE;
}