DiviArea.removeFilter()

  1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Functions
  6. DiviArea.removeFilter()
DiviArea.removeFilter(hook, callback)

// Alias:
DiviArea.Hooks.removeFilter(hook, callback)

Removes a previously registered filter hook.

Params

hook
(string, required) The hook name.
callback
(function, optional) The callback to remove. When omitted, all filter-callbacks are removed from the specified hook.

Returns

The function does not return anything.

Examples

// Remove any filter-handles for the "ignore_esc_key" filter.
DiviArea.removeFilter( 'ignore_esc_key' );

// And then add our own, custom handler.
DiviArea.addFilter( 'ignore_esc_key', custom_filter_handler );

Notes

No notes

Was this article helpful?

Related Articles