Skip to content

Commit 7105bdc

Browse files
Update group-control.md (#275)
* Update group-control.md Advanced Group Control Label Modify added * Update group-control.md * Apply suggestions from code review --------- Co-authored-by: Rami Yushuvaev <[email protected]>
1 parent 72580d9 commit 7105bdc

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/editor-controls/group-control.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,41 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base {
9090

9191
}
9292
```
93+
94+
### Group Control Label Modify
95+
96+
Here's an advanced setup for changing the background control label.
97+
98+
```php {13-25}
99+
class Elementor_Test_Widget extends \Elementor\Widget_Base {
100+
101+
protected function register_controls() {
102+
103+
$this->start_controls_section(
104+
'style_section',
105+
[
106+
'label' => esc_html__( 'Style', 'textdomain' ),
107+
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
108+
]
109+
);
110+
111+
$this->add_group_control(
112+
Group_Control_Background::get_type(),
113+
[
114+
'name' => 'control_name',
115+
'label' => esc_html__( 'Background', 'textdomain' ),
116+
'types' => [ 'classic', 'gradient', 'video' ],
117+
'fields_options' => [
118+
'background' => [
119+
'label' => esc_html__( 'New Label Here...', 'textdomain' ),
120+
],
121+
],
122+
]
123+
);
124+
125+
$this->end_controls_section();
126+
127+
}
128+
129+
}
130+
```

0 commit comments

Comments
 (0)