1 filter.module filter_format_enable($format)

Enables 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.


$format: The text format object to be enabled.


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


function filter_format_enable($format) {
  config_set('filter.format.' . $format->format, 'status', 1);

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

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