Event_Single_Static::prepare_template_data( array $data )
Modify the template data before importing.
Contents
Parameters
- $data
-
(array) (Required) The template data.
Return
(array)
Source
File: src/Events/Integrations/Plugins/Elementor/Template/Documents/Event_Single_Static.php
public static function prepare_template_data( $data ): array {
$widgets = $data['content'][0]['elements'][0]['elements'];
// Remove the theme-post-content from widget.
$widgets = wp_filter_object_list( $widgets, [ 'widgetType' => 'theme-post-content' ], 'NOT' );
$data['content'][0]['elements'][0]['elements'] = $widgets;
return $data;
}
Changelog
| Version | Description |
|---|---|
| 6.4.0 | Introduced. |