Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions inc/compatibility/elementor.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function init() {
*/
add_filter( 'neve_pro_run_wc_view', array( $this, 'suspend_woo_customizations' ), 10, 2 );
add_action( 'elementor/theme/register_locations', array( $this, 'register_elementor_locations' ) );
add_filter( 'elementor/document/config', array( $this, 'elementor_document_config' ), 10, 2 );
}

/**
Expand Down Expand Up @@ -567,4 +568,26 @@ public function suspend_woo_customizations( $should_load, $class_name ) {

return ! $elementor_overrides;
}

/**
* Allow Post Content widget to be shown in the panel for neve_custom_layouts post type.
*
* @param array<string, mixed> $data The original data that needs to be saved.
* @param int $post_id The ID of the post for which the data is being saved.
*
* @return array<string, mixed> The modified data with the additional configuration.
*/
public function elementor_document_config( $data, $post_id ) {
if ( 'neve_custom_layouts' === get_post_type( $post_id ) ) {
$data['panel'] = array(
'widgets_settings' => array(
'theme-post-content' => array(
'show_in_panel' => true,
),
),
);
}

return $data;
}
}
Loading