/home/altere25/infinet.finance/wp-content/plugins/th-widget-pack/elements
Edit: /home/altere25/infinet.finance/wp-content/plugins/th-widget-pack/elements/itinerary.php (8612B)
get_name();
}
protected function _register_controls() {
$this->start_controls_section(
'section_toggles',
[
'label' => __( 'Itinerary', 'th-widget-pack' ),
]
);
$this->add_control(
'tabs',
[
'label' => __( 'Items', 'th-widget-pack' ),
'type' => Controls_Manager::REPEATER,
'default' => [
[
'tab_title' => __( 'Day 1 Training', 'th-widget-pack' ),
'tab_content' => __( 'Nulla vitae elit libero, a pharetra augue. Sed posuere consectetur est at lobortis. Fusce dapibus, tellus ac cursus commodo.', 'th-widget-pack' ),
],
[
'tab_title' => __( 'Day 2 Rafting Whitewater', 'th-widget-pack' ),
'tab_content' => __( 'Nulla vitae elit libero, a pharetra augue. Sed posuere consectetur est at lobortis. Fusce dapibus, tellus ac cursus commodo.', 'th-widget-pack' ),
],
[
'tab_title' => __( 'Day 3 Rafting The Chilko', 'th-widget-pack' ),
'tab_content' => __( 'Nulla vitae elit libero, a pharetra augue. Sed posuere consectetur est at lobortis. Fusce dapibus, tellus ac cursus commodo.', 'th-widget-pack' ),
],
],
'fields' => [
[
'name' => 'tab_title',
'label' => __( 'Title & Content', 'th-widget-pack' ),
'type' => Controls_Manager::TEXT,
'label_block' => true,
'default' => __( 'Itinerary Title' , 'th-widget-pack' ),
'dynamic' => [
'active' => true,
],
],
[
'name' => 'tab_content',
'label' => __( 'Content', 'th-widget-pack' ),
'type' => Controls_Manager::TEXTAREA,
'default' => __( 'Itinerary Content', 'th-widget-pack' ),
'show_label' => false,
'dynamic' => [
'active' => true,
],
],
],
'title_field' => '{{{ tab_title }}}',
]
);
$this->add_control(
'view',
[
'label' => __( 'View', 'th-widget-pack' ),
'type' => Controls_Manager::HIDDEN,
'default' => 'traditional',
]
);
$this->add_control(
'expanded',
[
'label' => __( 'Start all Items Expanded', 'th-widget-pack' ),
'type' => Controls_Manager::SWITCHER,
'label_off' => __( 'Off', 'th-widget-pack' ),
'label_on' => __( 'On', 'th-widget-pack' ),
'default' => 'yes',
]
);
$this->add_control(
'width',
[
'label' => __( 'Width', 'th-widget-pack' ),
'type' => Controls_Manager::SELECT,
'default' => 'th-itin-narrow',
'options' => [
'th-itin-narrow' => __( 'Narrow', 'th-widget-pack' ),
'th-itin-med' => __( 'Medium', 'th-widget-pack' ),
'th-itin-fw' => __( 'Full Width', 'th-widget-pack' ),
],
]
);
$this->add_control(
'alignment',
[
'label' => __( 'Alignment', 'th-widget-pack' ),
'type' => Controls_Manager::SELECT,
'default' => 'th-itin-center',
'options' => [
'th-itin-center' => __( 'Center', 'th-widget-pack' ),
'th-itin-left' => __( 'Left', 'th-widget-pack' ),
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_style_colors',
[
'label' => __( 'Content', 'th-widget-pack' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'section_content_title_heading',
[
'label' => __( 'Title', 'elementor' ),
'type' => Controls_Manager::HEADING,
]
);
$this->add_control(
'title_color',
[
'label' => __( 'Color', 'th-widget-pack' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .th-itin-title' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'label' => __( 'Typography', 'elementor' ),
'name' => 'section_content_title_typography',
'selector' => '{{WRAPPER}} .th-itin-title',
]
);
$this->add_control(
'section_content_content_heading',
[
'label' => __( 'Content', 'elementor' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'content_color',
[
'label' => __( 'Color', 'th-widget-pack' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .th-itin-content *' => 'color: {{VALUE}};',
'{{WRAPPER}} .th-itin-content' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'label' => __( 'Typography', 'elementor' ),
'name' => 'section_content_content_typography',
'selector' => '{{WRAPPER}} .th-itin-content *, {{WRAPPER}} .th-itin-content',
]
);
$this->add_control(
'section_vertical_line_heading',
[
'label' => __( 'Vertical line', 'elementor' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'vertical_line_color',
[
'label' => __( 'Vertical Line Color', 'th-widget-pack' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .th-itin-content' => 'border-color: {{VALUE}};',
],
]
);
$this->add_control(
'dot_color',
[
'label' => __( 'Dot Color', 'th-widget-pack' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .th-itin-icon' => 'color: {{VALUE}};',
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
$tabs = $this->get_settings_for_display( 'tabs' );
$this->add_render_attribute( 'itin-main', 'class', 'th-itinerary' );
$this->add_render_attribute( 'itin-main', 'class', esc_attr( $settings['width'] ) );
$this->add_render_attribute( 'itin-main', 'class', esc_attr( $settings['alignment'] ) );
?>
get_render_attribute_string( 'itin-main' ); ?>>
parse_text_editor( $item['tab_content'] ) ); ?>
<#
if ( settings.tabs ) {
_.each(settings.tabs, function( item ) { #>
{{{ item.tab_title }}}
{{{ item.tab_content }}}
<#
} );
} #>
get_name() ] = [
'conditions' => [ 'widgetType' => $this->get_name() ],
'fields' => array(),
'integration-class' => 'WPML_Themo_Itinerary',
];
return $widgets;
}
}
Plugin::instance()->widgets_manager->register_widget_type( new Themo_Widget_Itinerary() );