Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Elementor_Migrate::ensure_elementor_data_present( $post_id )
Contents
Source Source
File: includes/class-llms-elementor-migrate.php
private function ensure_elementor_data_present( $post_id ): void {
$content = json_decode( get_post_meta( $post_id, '_elementor_data', true ) );
if ( ! is_array( $content ) && ( $post = get_post( $post_id ) ) ) {
$content = array();
$content[] = array(
'id' => uniqid(),
'elType' => 'container',
'settings' => array(),
'elements' => array(
array(
'id' => uniqid(),
'elType' => 'widget',
'settings' => array(
'editor' => $post->post_content,
),
'elements' => array(),
'widgetType' => 'text-editor',
),
),
'isInner' => false,
);
$this->update_elementor_data( $post_id, $content );
}
}
Expand full source code Collapse full source code View on GitHub