You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/widgets/widget-inner-wrapper.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,33 +28,33 @@ The new, optimized markup, has only one wrapping element:
28
28
</div>
29
29
```
30
30
31
-
Elementor had previously utilized unoptimized markup. Nowadays, all widgets use optimized markup.
31
+
Elementor had previously utilized unoptimized markup. Nowadays, all Elementor and Elementor Pro widgets use optimized markup. Elementor provided a transition period for external developers to adopt the optimized widget markup.
32
32
33
33
### Wrapping Elements
34
34
35
-
The number of wrapping elements that each widget needs is up to the widget developer. It provides external developers a transition period to move to optimized widget markup.
35
+
The number of wrapping elements required for each widget is determined by the widget developer. Elementor provided a transition period for external developers to adopt the optimized widget markup.
36
36
37
-
Legacy widgets that require both `<div>` wrappers, including the inner `.elementor-widget-container` wrapper, should add the following method to the widget:
37
+
Legacy widgets that require both `<div>` wrappers, including the inner `.elementor-widget-container` wrapper, use the following method in the widget:
38
38
39
39
```php
40
40
public function has_widget_inner_wrapper(): bool {
41
41
return true;
42
42
}
43
43
```
44
44
45
-
New widgets that can work with only the outer `<div>` wrapper, without the inner `.elementor-widget-container` wrapper, should add the following method to the widget:
45
+
New widgets that can work with only the outer `<div>` wrapper, without the inner `.elementor-widget-container` wrapper, use the following method in the widget:
46
46
47
47
```php
48
48
public function has_widget_inner_wrapper(): bool {
49
49
return false;
50
50
}
51
51
```
52
52
53
-
Finnaly, widgets that do not employ the `has_widget_inner_wrapper()` function will behave like unoptimized widgets with two wrapping `<div>` elements.
53
+
Finnaly, widgets that do not employ the `has_widget_inner_wrapper()` function will behave like unoptimized widgets with two wrapping `<div>` elements. This behaviour may change in the future to optimize the remaining widgets.
54
54
55
55
### Future
56
56
57
-
Developers need to think about the future when unoptimized widgets will no longer be rendered. To prevent compatibility and styling issues, all widgets should have `has_widget_inner_wrapper()` method, returning`false`.
57
+
Developers should plan ahead for when unoptimized widgets will stop being rendered. To avoid compatibility and styling problems, every widget should include the `has_widget_inner_wrapper()` method set to return`false`.
0 commit comments