CCCPaste

JKIT || Add JKIT Widgets to WPML Translate (Heading, Image Box a

/** Add JKIT Widgets to WPML Translate (Heading, Image Box and Button widgets) */
function add_jkit_widgets_to_translate1( $widgets ) {
	/** JKIT - Heading Widget */
	$widgets['jkit_heading'] = array(
		'conditions' => array( 'widgetType' => 'jkit_heading' ),
		'fields'     => array(
			array(
				'field'       => 'sg_title_before',
				'type'        => __( 'JKIT Heading: Title: Before Focused Title', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_title_focused',
				'type'        => __( 'JKIT Heading: Title: Focused Title', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_title_after',
				'type'        => __( 'JKIT Heading: Title: After Focused Title', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_subtitle_heading',
				'type'        => __( 'JKIT Heading: Subtitle: Heading Sub Title', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_description',
				'type'        => __( 'JKIT Heading: Description: Heading Description', 'jeg-elementor-kit' ),
				'editor_type' => 'VISUAL',
			),
			array(
				'field'       => 'sg_shadow_content',
				'type'        => __( 'JKIT Heading: Shadow Text: Content', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
		),
	);

	/** JKIT - Image Box Widget */
	$widgets['jkit_image_box'] = array(
		'conditions' => array( 'widgetType' => 'jkit_image_box' ),
		'fields'     => array(
			array(
				'field'       => 'sg_image_link',
				'type'        => __( 'JKIT Image Box: Image: Link', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_body_title',
				'type'        => __( 'JKIT Image Box: Body: Title', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_body_description',
				'type'        => __( 'JKIT Image Box: Body: Description', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_button_label',
				'type'        => __( 'JKIT Image Box: Button: Label', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_button_link',
				'type'        => __( 'JKIT Image Box: Button: Link', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
		),
	);

	/** JKIT - Button Widget */
	$widgets['jkit_button'] = array(
		'conditions' => array( 'widgetType' => 'jkit_button' ),
		'fields'     => array(
			array(
				'field'       => 'sg_content_label',
				'type'        => __( 'JKIT Button: Content: Label', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_content_link',
				'type'        => __( 'JKIT Button: Content: Link', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_content_class',
				'type'        => __( 'JKIT Button: Content: Class', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_button_label',
				'type'        => __( 'JKIT Image Box: Button: Label', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
			array(
				'field'       => 'sg_content_id',
				'type'        => __( 'JKIT Image Box: Button: ID', 'jeg-elementor-kit' ),
				'editor_type' => 'LINE',
			),
		),
	);

	return $widgets;
}
add_filter( 'wpml_elementor_widgets_to_translate', 'add_jkit_widgets_to_translate1' );