applyFilters( “init_options” )

applyFilters( "init_options", config );

Filters the initial JS options while preparing the JS API. The options object is fully initialized and sanitized.


config object, required
The sanitized and fully populated DiviAreaConfig object, which are also available via window.DiviAreaConfig.


The filtered options object.


// Change the default fade-in and fade-out speed of Popups.
DiviArea.addFilter( 'init_options', function( options ) {
    // Slow down the animation to 1 second.
    options.animateSpeed = 1000;

    return options;


In most cases you can initialize the plugin options by directly accessing the DiviAreaConfig object like this:

// Same effect as the example above: Slow down animation to 1 second.
DiviAreaConfig.animateSpeed = 1000;
Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Get in touch with us