Refreshable Widgets
elementor_extras/widgets/refreshable
Some widgets in Extras (like Popup, Offcanvas or Posts Extra with infinite load turned on) render content dynamically. Any widget inside the content needs to be refreshed in order to work if it’s powered by any javascript. Refreshing means reinitialising all the actions on that widget much like as if it were loaded on page load. This filter give access to the list of the default refreshable widget so you can add your own widgets to the list.
Parameters
Param | Type | Description |
---|---|---|
$widgets | Array | The list of refreshable widgets |
Returns
widgets — The modified list of refreshable widgets
Example usage
add_filter( 'elementor_extras/widgets/refreshable', function( $widgets ) { // Add your own widget to the list $widgets[] = 'my-widget.skin'; // Make sure skin is replaced with the skin that applies. If no skin applies, use 'my-widget.default' return $widgets; // Return the modified widgets list }, 10, 1);