1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Filters
  6. applyFilters( “get_option_{key}” )

applyFilters( “get_option_{key}” )

applyFilters( "get_option_{key}", value );

Filters an option that was read from the DiviAreaConfig object.

The dynamic part of the filter name is the sanitized option name. See DiviArea.Utils.sanitizeHookName() for details.

Returns

The filtered option value.

Examples

// Set animationSpeed via a hook.
// Note that the hook name is all lower case!
DiviArea.addFilter( 'get_option_animationspeed', function( value ) {
    return 1000; // Increase animationSpeed to 1000ms
});

Notes

The DiviAreaConfig object was formerly called DiviPopupData. Both objects can be used interchangeably when directly accessing the plugin configuration. When writing a new integration, then “DiviAreaConfig” is the recommended name.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support