/home/vianto5/ceibaresidencial.mx/wp-content/themes/moore_old/elementor/widgets
Edit: /home/vianto5/ceibaresidencial.mx/wp-content/themes/moore_old/elementor/widgets/menu-canvas.php (4923B)
start_controls_section(
'section_menu_type',
[
'label' => esc_html__( 'Global', 'moore' ),
]
);
$menus = \wp_get_nav_menus();
$list_menu = array();
foreach ($menus as $menu) {
$list_menu[$menu->slug] = $menu->name;
}
$this->add_control(
'menu_slug',
[
'label' => esc_html__( 'Select Menu', 'moore' ),
'type' => Controls_Manager::SELECT,
'options' => $list_menu,
'default' => '',
'prefix_class' => 'elementor-view-',
]
);
$this->add_control(
'menu_dir',
[
'label' => esc_html__( 'Menu Direction', 'moore' ),
'type' => \Elementor\Controls_Manager::CHOOSE,
'options' => [
'dir_left' => [
'title' => esc_html__( 'Left', 'moore' ),
'icon' => 'eicon-text-align-right',
],
'dir_right' => [
'title' => esc_html__( 'Right', 'moore' ),
'icon' => 'eicon-text-align-left',
],
],
'default' => 'dir_left'
]
);
$this->end_controls_section();
/* Parent Menu Section *******************************/
/***********************************************/
$this->start_controls_section(
'section_content',
[
'label' => esc_html__( 'Style', 'moore' ),
]
);
$this->add_control(
'btn_color',
[
'label' => esc_html__( 'Button', 'moore' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .menu-toggle:before' => 'background-color: {{VALUE}};',
'{{WRAPPER}} .menu-toggle span:before' => 'background-color: {{VALUE}};',
'{{WRAPPER}} .menu-toggle:after' => 'background-color: {{VALUE}};',
],
]
);
$this->add_control(
'background_btn_color',
[
'label' => esc_html__( 'Background Button', 'moore' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} button.menu-toggle:hover' => 'background-color: {{VALUE}};',
],
]
);
$this->add_control(
'bg_color',
[
'label' => esc_html__( 'Menu Background', 'moore' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .container-menu' => 'background-color: {{VALUE}};',
],
'separator' => 'before'
]
);
$this->add_control(
'text_color',
[
'label' => esc_html__( 'Link', 'moore' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} ul li a' => 'color: {{VALUE}};',
],
]
);
$this->add_control(
'text_color_hover',
[
'label' => esc_html__( 'Link Hover', 'moore' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} ul li a:hover' => 'color: {{VALUE}};',
]
]
);
$this->add_control(
'text_color_active',
[
'label' => esc_html__( 'Link Active', 'moore' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} ul li.current-menu-item > a' => 'color: {{VALUE}};',
'{{WRAPPER}} ul li.current-menu-ancestor > a' => 'color: {{VALUE}};',
'{{WRAPPER}} ul li.current-menu-parent > a' => 'color: {{VALUE}};',
]
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
'name' => 'typography',
'selector' => '{{WRAPPER}} ul li a'
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings();
?>
register( new Moore_Elementor_Canvas_Menu() );