 delvartS
|
J'ai mon widget elementor
protected function register_controls() {
$this->start_controls_section(
'section_content',
[
'label' => __( 'Content', 'elementor-fs-ancre' ),
]
);
$this->add_control(
'titre',
[
'label' => __( 'Titre', 'elementor-fs-ancre' ),
'type' => Controls_Manager::TEXT,
]
);
$repeater = new Repeater();
$repeater->add_control(
'titre',
[
'label' => __( 'Titre', 'elementor-fs-ancre' ),
'type' => Controls_Manager::TEXT,
]
);
$repeater->add_control(
'sous-titre',
[
'label' => __( 'Sous-titre', 'elementor-fs-ancre' ),
'type' => Controls_Manager::TEXT,
]
);
$repeater->add_control(
'selector',
[
'label' => __( 'Sélecteur', 'elementor-fs-ancre' ),
'type' => Controls_Manager::TEXT,
]
);
$this->add_control(
'ancre',
[
'label' => __( 'Ancre', 'elementor-fs-ancre' ),
'type' => Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
'title_field' => '{{{ titre }}}',
'prevent_empty' => false,
]
);
$this->end_controls_section();
}
Avec cette conf XML
fs-ancre
titre
title
sous-titre
Mais les element du widget ne sont pas traduisible
|