applyFilters( "ignore_close_area" )

applyFilters( "ignore_close_area", ignore, area, reason );
applyFilters( "ignore_close_area_{key}", ignore, area, reason );

Allows to ignore the close_area request and force an area to stay open.

The dynamic part of the filter name is the sanitized Area key. See DiviAreaItem.theKey() for details.


(bool, required) Whether to ignore the close_area command and keep the area visible. Default: false.
(object, required) The Divi Area which will be hidden.
(string, required) Identifies the action that triggered the close_area call.


// Remember the timestamp when the Area was made visible.
DiviArea.addAction( 'show_area', function( area ) {
    area.setData( 'opened_at', new Date().getTime() );

// Forces every Area to stay visible for at least 10 seconds.
DiviArea.addFilter( 'ignore_close_area', function( ignore, area, closeType ) {
    var openSince = (new Date().getTime() - area.getData( 'opened_at' )) / 1000;

    if ( openSince >= 10 ) {
        return false; // process the close-request.
    } else {
        console.log('Try again in', parseInt(10 - openSince), 'seconds');
        return true; // ignore the close-request.


This filter is applied after any close_area action was fired.

However, DiviArea.hide() will always hide the Area without calling the ignore_close_area filter!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.