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.


(jQuery, required) The area wrapper element which contains the Divi 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.

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