start_controls_section(
‘section_content_2495a989’,
[
‘label’ => esc_html__( ‘Menu Items’, ‘angie-snippets’ ),
‘tab’ => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
‘item_title’,
[
‘label’ => esc_html__( ‘Title’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::TEXT,
‘default’ => esc_html__( ‘Country Name’, ‘angie-snippets’ ),
‘label_block’ => true,
]
);
$repeater->add_control(
‘item_image’,
[
‘label’ => esc_html__( ‘Reveal Image’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::MEDIA,
‘default’ => [
‘url’ => \Elementor\Utils::get_placeholder_image_src(),
],
]
);
$this->add_control(
‘menu_items’,
[
‘label’ => esc_html__( ‘Menu List’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::REPEATER,
‘fields’ => $repeater->get_controls(),
‘default’ => [
[
‘item_title’ => esc_html__( ‘England’, ‘angie-snippets’ ),
‘item_image’ => [ ‘url’ => ‘https://images.unsplash.com/photo-1513635269975-59663e0ac1ad?auto=format&fit=crop&w=1200&q=80’ ],
],
[
‘item_title’ => esc_html__( ‘Brazil’, ‘angie-snippets’ ),
‘item_image’ => [ ‘url’ => ‘https://images.unsplash.com/photo-1483728642387-6c3bdd6c93e5?auto=format&fit=crop&w=1200&q=80’ ],
],
[
‘item_title’ => esc_html__( ‘France’, ‘angie-snippets’ ),
‘item_image’ => [ ‘url’ => ‘https://images.unsplash.com/photo-1502602898657-3e91760cbb34?auto=format&fit=crop&w=1200&q=80’ ],
],
[
‘item_title’ => esc_html__( ‘Japan’, ‘angie-snippets’ ),
‘item_image’ => [ ‘url’ => ‘https://images.unsplash.com/photo-1493976040374-85c8e12f0c0e?auto=format&fit=crop&w=1200&q=80’ ],
],
[
‘item_title’ => esc_html__( ‘Italy’, ‘angie-snippets’ ),
‘item_image’ => [ ‘url’ => ‘https://images.unsplash.com/photo-1529260830199-445821ec2402?auto=format&fit=crop&w=1200&q=80’ ],
],
],
‘title_field’ => ‘{{{ item_title }}}’,
]
);
$this->end_controls_section();
// Style Tab
$this->start_controls_section(
‘section_style_2495a989’,
[
‘label’ => esc_html__( ‘Styling’, ‘angie-snippets’ ),
‘tab’ => \Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
‘text_color’,
[
‘label’ => esc_html__( ‘Text Color’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::COLOR,
‘default’ => ‘#ffffff’,
‘selectors’ => [
‘{{WRAPPER}} .reveal-menu-item’ => ‘color: {{VALUE}};’,
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
‘name’ => ‘text_typography’,
‘selector’ => ‘{{WRAPPER}} .reveal-menu-item’,
]
);
$this->add_control(
‘underline_color’,
[
‘label’ => esc_html__( ‘Hover Underline Color’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::COLOR,
‘default’ => ‘#ffffff’,
‘selectors’ => [
‘{{WRAPPER}} .reveal-menu-item::after’ => ‘background-color: {{VALUE}};’,
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
?>