| Server IP : 172.67.71.254 / Your IP : 216.73.216.4 Web Server : nginx/1.27.1 System : Linux in-5 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : arabianexpress ( 1872) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /storage/v9321/leapdubai/public_html/wp-content/plugins/printx-core/include/elementor/ |
Upload File : |
<?php
namespace TPCore\Widgets;
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use \Elementor\Group_Control_Background;
use \Elementor\Group_Control_Image_Size;
use \Elementor\Repeater;
use \Elementor\Utils;
use \Elementor\Control_Media;
use TPCore\Elementor\Controls\Group_Control_TPBGGradient;
use TPCore\Elementor\Controls\Group_Control_TPGradient;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
/**
* Tp Core
*
* Elementor widget for hello world.
*
* @since 1.0.0
*/
class TP_Features extends Widget_Base {
use \TPCore\Widgets\TPCoreElementFunctions;
/**
* Retrieve the widget name.
*
* @since 1.0.0
*
* @access public
*
* @return string Widget name.
*/
public function get_name() {
return 'features';
}
/**
* Retrieve the widget title.
*
* @since 1.0.0
*
* @access public
*
* @return string Widget title.
*/
public function get_title() {
return __( 'Features', 'tpcore' );
}
/**
* Retrieve the widget icon.
*
* @since 1.0.0
*
* @access public
*
* @return string Widget icon.
*/
public function get_icon() {
return 'tp-icon';
}
/**
* Retrieve the list of categories the widget belongs to.
*
* Used to determine where to display the widget in the editor.
*
* Note that currently Elementor supports only one category.
* When multiple categories passed, Elementor uses the first one.
*
* @since 1.0.0
*
* @access public
*
* @return array Widget categories.
*/
public function get_categories() {
return [ 'tpcore' ];
}
/**
* Retrieve the list of scripts the widget depended on.
*
* Used to set scripts dependencies required to run the widget.
*
* @since 1.0.0
*
* @access public
*
* @return array Widget scripts dependencies.
*/
public function get_script_depends() {
return [ 'tpcore' ];
}
/**
* Register the widget controls.
*
* Adds different input fields to allow the user to change and customize the widget settings.
*
* @since 1.0.0
*
* @access protected
*/
protected function register_controls(){
$this->register_controls_section();
$this->style_tab_content();
}
protected function register_controls_section() {
// layout Panel
$this->start_controls_section(
'tp_layout',
[
'label' => esc_html__('Design Layout', 'tpcore'),
]
);
$this->add_control(
'tp_design_style',
[
'label' => esc_html__('Select Layout', 'tpcore'),
'type' => Controls_Manager::SELECT,
'options' => [
'layout-1' => esc_html__('Layout 1', 'tpcore'),
'layout-2' => esc_html__('Layout 2', 'tpcore'),
],
'default' => 'layout-1',
]
);
$this->end_controls_section();
// title/content section
$this->tp_section_title_render_controls('features', 'Section Title', 'Sub Title', 'your title here', $default_description = 'Hic nesciunt galisum aut dolorem aperiam eum soluta quod ea cupiditate.', 'layout-2');
// Features Sections
$this->start_controls_section(
'features_list_sec',
[
'label' => esc_html__( 'Features List', 'tpcore' ),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
'repeater_condition',
[
'label' => __( 'Field condition', 'tpcore' ),
'type' => Controls_Manager::SELECT,
'options' => [
'style_1' => __( 'Style 1', 'tpcore' ),
'style_2' => __( 'Style 2', 'tpcore' ),
],
'default' => 'style_1',
'frontend_available' => true,
'style_transfer' => true,
]
);
$repeater->add_control(
'tp_box_icon_type',
[
'label' => esc_html__('Select Icon Type', 'tpcore'),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'icon',
'options' => [
'image' => esc_html__('Image', 'tpcore'),
'icon' => esc_html__('Icon', 'tpcore'),
'svg' => esc_html__('SVG', 'tpcore'),
],
'condition' => [
'repeater_condition' => 'style_1'
]
]
);
$repeater->add_control(
'tp_box_icon_svg',
[
'show_label' => false,
'type' => Controls_Manager::TEXTAREA,
'label_block' => true,
'placeholder' => esc_html__('SVG Code Here', 'tpcore'),
'condition' => [
'tp_box_icon_type' => 'svg',
'repeater_condition' => 'style_1'
]
]
);
$repeater->add_control(
'tp_box_icon_image',
[
'label' => esc_html__('Upload Icon Image', 'tpcore'),
'type' => Controls_Manager::MEDIA,
'default' => [
'url' => Utils::get_placeholder_image_src(),
],
'condition' => [
'tp_box_icon_type' => 'image',
'repeater_condition' => 'style_1'
]
]
);
if (tp_is_elementor_version('<', '2.6.0')) {
$repeater->add_control(
'tp_box_icon',
[
'show_label' => false,
'type' => Controls_Manager::ICON,
'label_block' => true,
'default' => 'fa fa-star',
'condition' => [
'tp_box_icon_type' => 'icon',
'repeater_condition' => 'style_1'
]
]
);
} else {
$repeater->add_control(
'tp_box_selected_icon',
[
'show_label' => false,
'type' => Controls_Manager::ICONS,
'fa4compatibility' => 'icon',
'label_block' => true,
'default' => [
'value' => 'fas fa-star',
'library' => 'solid',
],
'condition' => [
'tp_box_icon_type' => 'icon',
'repeater_condition' => 'style_1'
]
]
);
}
$repeater->add_control(
'features_title',
[
'label' => esc_html__( 'List Title', 'tpcore' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => esc_html__( 'See the action in live', 'tpcore' ),
'label_block' => true,
]
);
$repeater->add_control(
'features_des',
[
'label' => esc_html__( 'Description', 'tpcore' ),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'default' => esc_html__( 'Understand how your keyword/group is ranking specific cases.', 'tpcore' ),
'label_block' => true,
]
);
$this->add_control(
'features_list',
[
'label' => esc_html__( 'Features List', 'tpcore' ),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
'default' => [
[
'features_title' => esc_html__( 'See the action in live', 'tpcore' ),
],
[
'features_title' => esc_html__( 'Intuitive dashboard', 'tpcore' ),
],
],
'title_field' => '{{{ features_title }}}',
]
);
$this->end_controls_section();
// _tp_image
$this->start_controls_section(
'_tp_image',
[
'label' => esc_html__('Thumbnail', 'tpcore'),
]
);
$this->add_control(
'tp_image',
[
'label' => esc_html__( 'Choose Image', 'tpcore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
]
);
$this->add_control(
'tp_image_2',
[
'label' => esc_html__( 'Choose Image 2', 'tpcore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
]
);
$this->add_control(
'tp_image_3',
[
'label' => esc_html__( 'Choose Image 3', 'tpcore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'tp_design_style' => 'layout-2'
]
]
);
$this->add_group_control(
Group_Control_Image_Size::get_type(),
[
'name' => 'tp_image_size',
'default' => 'full',
'exclude' => [
'custom'
]
]
);
$this->add_control(
'thumb_badge_title',
[
'label' => esc_html__( 'Thumbnail Badge Title', 'tpcore' ),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'default' => esc_html__( '500+ Customer Worldwide', 'tpcore' ),
'label_block' => true,
'condition' => [
'tp_design_style' => 'layout-2'
]
]
);
$this->end_controls_section();
// shape
$this->start_controls_section(
'tp_shape',
[
'label' => esc_html__( 'Shape Section', 'tpcore' ),
]
);
$this->add_control(
'tp_shape_switch',
[
'label' => esc_html__( 'Shape On/Off', 'tpcore' ),
'type' => \Elementor\Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'Show', 'tpcore' ),
'label_off' => esc_html__( 'Hide', 'tpcore' ),
'return_value' => 'yes',
'default' => '0',
]
);
$this->add_control(
'tp_shape_image_1',
[
'label' => esc_html__( 'Choose Shape Image 1', 'tpcore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'tp_shape_switch' => 'yes'
]
]
);
$this->add_control(
'tp_shape_image_2',
[
'label' => esc_html__( 'Choose Shape Image 2', 'tpcore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'tp_shape_switch' => 'yes',
]
]
);
$this->add_control(
'tp_shape_image_3',
[
'label' => esc_html__( 'Choose Shape Image 3', 'tpcore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'tp_shape_switch' => 'yes',
]
]
);
$this->add_control(
'tp_shape_image_4',
[
'label' => esc_html__( 'Choose Shape Image 4', 'tpcore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'tp_shape_switch' => 'yes',
'tp_design_style' => 'layout-2'
]
]
);
$this->add_control(
'tp_shape_image_5',
[
'label' => esc_html__( 'Choose Shape Image 5', 'tpcore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
'condition' => [
'tp_shape_switch' => 'yes',
'tp_design_style' => 'layout-2'
]
]
);
$this->add_group_control(
Group_Control_Image_Size::get_type(),
[
'name' => 'shape_image_size', // // Usage: `{name}_size` and `{name}_custom_dimension`, in this case `thumbnail_size` and `thumbnail_custom_dimension`.
'exclude' => ['custom'],
'condition' => [
'tp_shape_switch' => 'yes'
],
'default' => 'full'
]
);
$this->end_controls_section();
}
// style_tab_content
protected function style_tab_content(){
$this->tp_section_style_controls('feature_section', 'Section - Style', '.tp-el-section');
$this->tp_basic_style_controls('heading_subtitle', 'Subtitle', '.tp-el-subtitle', 'layout-2');
$this->tp_basic_style_controls('heading_title', 'Title', '.tp-el-title', 'layout-2');
$this->tp_basic_style_controls('heading_desc', 'Description', '.tp-el-content', 'layout-2');
// rep
$this->tp_icon_style('rep_icon', 'Features List Icon/Image/SVG', '.tp-el-rep-icon', 'layout-1');
$this->tp_basic_style_controls('rep_title', 'Features List Title', '.tp-el-rep-title', ['layout-1', 'layout-2']);
$this->tp_basic_style_controls('rep_desc', 'Features List Description', '.tp-el-rep-content', ['layout-1', 'layout-2']);
$this->tp_basic_style_controls('badge_title', 'Badge Title', '.tp-badge-title', 'layout-2');
}
/**
* Render the widget output on the frontend.
*
* Written in PHP and used to generate the final HTML.
*
* @since 1.0.0
*
* @access protected
*/
protected function render() {
$settings = $this->get_settings_for_display();
?>
<?php if ( $settings['tp_design_style'] == 'layout-2' ) :
// thumbnail
if ( !empty($settings['tp_image']['url']) ) {
$tp_image = !empty($settings['tp_image']['id']) ? wp_get_attachment_image_url( $settings['tp_image']['id'], $settings['tp_image_size_size']) : $settings['tp_image']['url'];
$tp_image_alt = get_post_meta($settings["tp_image"]["id"], "_wp_attachment_image_alt", true);
}
if ( !empty($settings['tp_image_2']['url']) ) {
$tp_image2 = !empty($settings['tp_image_2']['id']) ? wp_get_attachment_image_url( $settings['tp_image_2']['id'], $settings['tp_image_size_size']) : $settings['tp_image_2']['url'];
$tp_image_alt2 = get_post_meta($settings["tp_image_2"]["id"], "_wp_attachment_image_alt", true);
}
if ( !empty($settings['tp_image_3']['url']) ) {
$tp_image3 = !empty($settings['tp_image_3']['id']) ? wp_get_attachment_image_url( $settings['tp_image_3']['id'], $settings['tp_image_size_size']) : $settings['tp_image_3']['url'];
$tp_image_alt3 = get_post_meta($settings["tp_image_3"]["id"], "_wp_attachment_image_alt", true);
}
// shape image
if ( !empty($settings['tp_shape_image_1']['url']) ) {
$tp_shape_image = !empty($settings['tp_shape_image_1']['id']) ? wp_get_attachment_image_url( $settings['tp_shape_image_1']['id'], $settings['shape_image_size_size']) : $settings['tp_shape_image_1']['url'];
$tp_shape_image_alt = get_post_meta($settings["tp_shape_image_1"]["id"], "_wp_attachment_image_alt", true);
}
if ( !empty($settings['tp_shape_image_2']['url']) ) {
$tp_shape_image2 = !empty($settings['tp_shape_image_2']['id']) ? wp_get_attachment_image_url( $settings['tp_shape_image_2']['id'], $settings['shape_image_size_size']) : $settings['tp_shape_image_2']['url'];
$tp_shape_image_alt2 = get_post_meta($settings["tp_shape_image_2"]["id"], "_wp_attachment_image_alt", true);
}
if ( !empty($settings['tp_shape_image_3']['url']) ) {
$tp_shape_image3 = !empty($settings['tp_shape_image_3']['id']) ? wp_get_attachment_image_url( $settings['tp_shape_image_3']['id'], $settings['shape_image_size_size']) : $settings['tp_shape_image_3']['url'];
$tp_shape_image_alt3 = get_post_meta($settings["tp_shape_image_3"]["id"], "_wp_attachment_image_alt", true);
}
if ( !empty($settings['tp_shape_image_4']['url']) ) {
$tp_shape_image4 = !empty($settings['tp_shape_image_4']['id']) ? wp_get_attachment_image_url( $settings['tp_shape_image_4']['id'], $settings['shape_image_size_size']) : $settings['tp_shape_image_4']['url'];
$tp_shape_image_alt4 = get_post_meta($settings["tp_shape_image_4"]["id"], "_wp_attachment_image_alt", true);
}
if ( !empty($settings['tp_shape_image_5']['url']) ) {
$tp_shape_image5 = !empty($settings['tp_shape_image_5']['id']) ? wp_get_attachment_image_url( $settings['tp_shape_image_5']['id'], $settings['shape_image_size_size']) : $settings['tp_shape_image_5']['url'];
$tp_shape_image_alt5 = get_post_meta($settings["tp_shape_image_5"]["id"], "_wp_attachment_image_alt", true);
}
$this->add_render_attribute('title_args', 'class', 'tp-section-title-2 tp-el-title');
?>
<div class="tp-feature-2__area fix p-relative pb-35 tp-el-section">
<?php if(!empty($tp_shape_image)) : ?>
<div class="tp-feature-2__shape-1 d-none d-xl-block">
<img src="<?php echo esc_url($tp_shape_image); ?>" alt="<?php echo esc_attr($tp_shape_image_alt); ?>">
</div>
<?php endif; ?>
<?php if(!empty($tp_shape_image2)) : ?>
<div class="tp-feature-2__shape-2 d-none d-xl-block">
<img src="<?php echo esc_url($tp_shape_image2); ?>" alt="<?php echo esc_attr($tp_shape_image_alt2); ?>">
</div>
<?php endif; ?>
<?php if(!empty($tp_shape_image3)) : ?>
<div class="tp-feature-2__shape-3 d-none d-xl-block">
<img src="<?php echo esc_url($tp_shape_image3); ?>" alt="<?php echo esc_attr($tp_shape_image_alt3); ?>">
</div>
<?php endif; ?>
<?php if(!empty($tp_shape_image4)) : ?>
<div class="tp-feature-2__shape-4 d-none d-xl-block">
<img src="<?php echo esc_url($tp_shape_image4); ?>" alt="<?php echo esc_attr($tp_shape_image_alt4); ?>">
</div>
<?php endif; ?>
<div class="container">
<div class="row align-items-center">
<div class="col-xl-6 col-lg-6">
<div class="tp-feature-2__thumb-box p-relative text-end">
<?php if(!empty($tp_shape_image5)) : ?>
<div class="tp-feature-2__thumb-shape d-none d-md-block">
<img src="<?php echo esc_url($tp_shape_image5); ?>" alt="<?php echo esc_attr($tp_shape_image_alt5); ?>">
</div>
<?php endif; ?>
<?php if(!empty($tp_image)) : ?>
<div class="tp-feature-2__thumb-1">
<img src="<?php echo esc_url($tp_image); ?>" alt="<?php echo esc_attr($tp_image_alt); ?>">
</div>
<?php endif; ?>
<?php if(!empty($tp_image2)) : ?>
<div class="tp-feature-2__main-thumb">
<img src="<?php echo esc_url($tp_image2); ?>" alt="<?php echo esc_attr($tp_image_alt2); ?>">
</div>
<?php endif; ?>
<?php if(!empty($tp_image3)) : ?>
<div class="tp-feature-2__thumb-2">
<img src="<?php echo esc_url($tp_image3); ?>" alt="<?php echo esc_attr($tp_image_alt3); ?>">
</div>
<?php endif; ?>
<?php if(!empty($settings['thumb_badge_title'])) : ?>
<div class="tp-feature-2__thumb-text d-none d-lg-block">
<span class="tp-badge-title"><?php echo tp_kses($settings['thumb_badge_title']); ?></span>
</div>
<?php endif; ?>
</div>
</div>
<div class="col-xl-6 col-lg-6 wow tpfadeRight" data-wow-duration=".9s" data-wow-delay=".5s">
<div class="tp-feature-2__right-box">
<div class="tp-feature-2__section-box mb-40">
<?php if ( !empty($settings['tp_features_sub_title']) ) : ?>
<span class="tp-section-subtitle-3 tp-el-subtitle"><?php echo tp_kses($settings['tp_features_sub_title']); ?></span>
<?php endif; ?>
<?php
if ( !empty($settings['tp_features_title' ]) ) :
printf( '<%1$s %2$s>%3$s</%1$s>',
tag_escape( $settings['tp_features_title_tag'] ),
$this->get_render_attribute_string( 'title_args' ),
tp_kses( $settings['tp_features_title' ] )
);
endif;
?>
<?php if ( !empty($settings['tp_features_description']) ) : ?>
<p class="tp-el-content"><?php echo tp_kses( $settings['tp_features_description'] ); ?></p>
<?php endif; ?>
</div>
<div class="tp-feature-2__item-box">
<?php foreach($settings['features_list'] as $key => $item) : ?>
<div class="tp-feature-2__item <?php echo $key == 0 ? 'active' : NULL; ?>">
<?php if(!empty($item['features_title'])) : ?>
<h4 class="tp-feature-2__title tp-el-rep-title"><?php echo tp_kses($item['features_title']); ?></h4>
<?php endif; ?>
<?php if(!empty($item['features_des'])) : ?>
<p class="tp-el-rep-content"><?php echo tp_kses($item['features_des']); ?></p>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php else:
// thumbnail
if ( !empty($settings['tp_image']['url']) ) {
$tp_image = !empty($settings['tp_image']['id']) ? wp_get_attachment_image_url( $settings['tp_image']['id'], $settings['tp_image_size_size']) : $settings['tp_image']['url'];
$tp_image_alt = get_post_meta($settings["tp_image"]["id"], "_wp_attachment_image_alt", true);
}
if ( !empty($settings['tp_image_2']['url']) ) {
$tp_image_2 = !empty($settings['tp_image_2']['id']) ? wp_get_attachment_image_url( $settings['tp_image_2']['id'], $settings['tp_image_size_size']) : $settings['tp_image_2']['url'];
$tp_image_alt_2 = get_post_meta($settings["tp_image_2"]["id"], "_wp_attachment_image_alt", true);
}
// shape image
if ( !empty($settings['tp_shape_image_1']['url']) ) {
$tp_shape_image = !empty($settings['tp_shape_image_1']['id']) ? wp_get_attachment_image_url( $settings['tp_shape_image_1']['id'], $settings['shape_image_size_size']) : $settings['tp_shape_image_1']['url'];
$tp_shape_image_alt = get_post_meta($settings["tp_shape_image_1"]["id"], "_wp_attachment_image_alt", true);
}
if ( !empty($settings['tp_shape_image_2']['url']) ) {
$tp_shape_image2 = !empty($settings['tp_shape_image_2']['id']) ? wp_get_attachment_image_url( $settings['tp_shape_image_2']['id'], $settings['shape_image_size_size']) : $settings['tp_shape_image_2']['url'];
$tp_shape_image_alt2 = get_post_meta($settings["tp_shape_image_2"]["id"], "_wp_attachment_image_alt", true);
}
if ( !empty($settings['tp_shape_image_3']['url']) ) {
$tp_shape_image3 = !empty($settings['tp_shape_image_3']['id']) ? wp_get_attachment_image_url( $settings['tp_shape_image_3']['id'], $settings['shape_image_size_size']) : $settings['tp_shape_image_3']['url'];
$tp_shape_image_alt3 = get_post_meta($settings["tp_shape_image_3"]["id"], "_wp_attachment_image_alt", true);
}
?>
<div class="row align-items-center tp-el-section">
<div class="col-xl-6 col-lg-6">
<div class="tp-business__left-thumb text-center text-lg-start">
<?php if(!empty($tp_image)) : ?>
<img src="<?php echo esc_url($tp_image); ?>" alt="<?php echo esc_attr($tp_image_alt); ?>">
<?php endif; ?>
<?php if(!empty($tp_image_2)) : ?>
<div class="tp-business__shape-1 d-none d-md-block">
<img src="<?php echo esc_url($tp_image_2); ?>" alt="<?php echo esc_attr($tp_image_alt_2); ?>">
</div>
<?php endif; ?>
<?php if(!empty($tp_shape_image)) : ?>
<div class="tp-business__shape-2 d-none d-xl-block">
<img src="<?php echo esc_url($tp_shape_image); ?>" alt="<?php echo esc_attr($tp_shape_image_alt); ?>">
</div>
<?php endif; ?>
<?php if(!empty($tp_shape_image2)) : ?>
<div class="tp-business__shape-3 d-none d-xxl-block">
<img src="<?php echo esc_url($tp_shape_image2); ?>" alt="<?php echo esc_attr($tp_shape_image_alt2); ?>">
</div>
<?php endif; ?>
<?php if(!empty($tp_shape_image3)) : ?>
<div class="tp-business__shape-4 d-none d-xl-block">
<img src="<?php echo esc_url($tp_shape_image3); ?>" alt="<?php echo esc_attr($tp_shape_image_alt3); ?>">
</div>
<?php endif; ?>
</div>
</div>
<div class="col-xl-6 col-lg-6">
<div class="tp-business__content-box p-relative">
<div class="tp-business__content-shape d-none d-md-block">
<span>
<svg width="1" height="316" viewBox="0 0 1 316" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="0.25" y="0.25" width="0.5" height="315.5" stroke="#DCD4DC" stroke-width="0.5"
stroke-dasharray="2 2" />
</svg>
</span>
</div>
<ul>
<?php foreach($settings['features_list'] as $key => $item) : ?>
<li>
<div
class="tp-business__content d-flex align-items-start <?php echo $key == 1 ? 'active' : NULL; ?>">
<div class="tp-business__number">
<?php if($item['tp_box_icon_type'] == 'icon') : ?>
<?php if (!empty($item['tp_box_icon']) || !empty($item['tp_box_selected_icon']['value'])) : ?>
<span class="tp-el-rep-icon">
<?php tp_render_icon($item, 'tp_box_icon', 'tp_box_selected_icon'); ?>
</span>
<?php endif; ?>
<?php elseif( $item['tp_box_icon_type'] == 'image' ) : ?>
<?php if (!empty($item['tp_box_icon_image']['url'])): ?>
<span class="tp-el-rep-icon">
<img src="<?php echo $item['tp_box_icon_image']['url']; ?>"
alt="<?php echo get_post_meta(attachment_url_to_postid($item['tp_box_icon_image']['url']), '_wp_attachment_image_alt', true); ?>">
</span>
<?php endif; ?>
<?php else : ?>
<?php if (!empty($item['tp_box_icon_svg'])): ?>
<span class="tp-el-rep-icon">
<?php echo $item['tp_box_icon_svg']; ?>
</span>
<?php endif; ?>
<?php endif; ?>
</div>
<div class="tp-business__content-text">
<?php if(!empty($item['features_title'])) : ?>
<h5 class="tp-business__content-title tp-el-rep-title"><?php echo tp_kses($item['features_title']); ?></h5>
<?php endif; ?>
<?php if(!empty($item['features_des'])) : ?>
<p class="tp-el-rep-content"><?php echo tp_kses($item['features_des']); ?></p>
<?php endif; ?>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
<?php endif;
}
}
$widgets_manager->register( new TP_Features() );