<?php
$editor_title = $widget->get_settings_for_display( 'title' );
$editor_title = $widget->parse_text_editor( $editor_title );
?>
<?php if(!empty($settings['sub_title']) || !empty($editor_title) || $settings['source_type'] == 'title' ) : ?>
<div class="pxl-heading <?php if(($settings['scroll_horizontal'] == 'true')) { echo pxl_print_html('pxl-section-scroll', 'kaitex'); } ?> <?php if(($settings['scroll_revesal'] == 'true')) { echo pxl_print_html('revesal', 'kaitex'); } ?>">
	<div class="pxl-heading--inner <?php if(($settings['scroll_horizontal'] == 'true')) { echo pxl_print_html('element-scroll', 'kaitex'); } ?>">
		<?php if(!empty($settings['sub_title'])) : ?>
			<div class="pxl-item--subtitle <?php echo esc_attr($settings['pxl_animate_sub']); ?>" data-wow-delay="<?php echo esc_attr($settings['pxl_animate_delay_sub']); ?>ms" data-wow-duration="<?php echo esc_attr($settings['pxl_animate_duration_sub']); ?>s">
				<span><?php echo esc_attr($settings['sub_title']); ?></span>
			</div>
		<?php endif; ?>
		<?php if ( ($settings['source_type'] == 'text' && !empty($editor_title)) || ($settings['source_type'] == 'title') ) : ?>
			<<?php echo esc_attr($settings['title_tag']); ?> class="pxl-item--title <?php echo esc_attr('heading-'.$settings['style']); ?> <?php if(!empty($settings['title_split_text_anm'])) { echo esc_attr('pxl-split-text '.$settings['title_split_text_anm']); } ?> <?php echo esc_attr($settings['pxl_animate']); ?>" data-wow-delay="<?php echo esc_attr($settings['pxl_animate_delay']); ?>ms" data-wow-duration="<?php echo esc_attr($settings['pxl_animate_duration']); ?>s" <?php if($settings['title_split_text_anm'] == 'scroll-out') { echo esc_attr('data-splitting'); } ?>>
				<?php if($settings['source_type'] == 'text' && !empty($editor_title)) {
					echo wp_kses_post($editor_title);
				} elseif($settings['source_type'] == 'title') {
					$titles = kaitex()->page->get_title();
					pxl_print_html($titles['title']);
				} ?>
			</<?php echo esc_attr($settings['title_tag']); ?>>
		<?php endif; ?>
	</div>
</div>
<?php endif; ?>
