1 filter.module filter_format_disable($format)

Disables a text format.

There is no core facility to re-enable a disabled format. It is not deleted to keep information for contrib and to make sure the format ID is never reused. As there might be content using the disabled format, this would lead to data corruption.

Parameters

$format: The text format object to be disabled.

File

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

Code

function filter_format_disable($format) {
  config_set('filter.format.' . $format->format, 'status', 0);

  // Allow modules to react on text format disablement.
  module_invoke_all('filter_format_disable', $format);

  // Clear the filter cache whenever a text format is disabled.
  filter_formats_reset();
  cache('filter')->deletePrefix($format->format . ':');
}