doAction( “area_wrap” )

doAction( "area_wrap", $areaWrap, area );
doAction( "area_wrap_{key}", $areaWrap, area );

Fires when the outer wrap of an area was set up, but before the Area is displayed.

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


$areaWrap jQuery, required
The area wrapper element which contains the Divi Area.
area DiviAreaItem, required
The area object.


// Add a custom class to the area wrapper.
DiviArea.addAction( 'area_wrap', function( areaWrap, area ) {
    areaWrap.addClass( 'demo-area-wrap' );


This action is fired before the init_area action.

Was this article helpful?

Related Articles

Need Support?

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