PluginProbe
Elementor Website Builder – more than just a page builder / 3.6.7
Elementor Website Builder – more than just a page builder v3.6.7
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | core/kits/documents/tabs/settings-layout.php +20 -63 4.0.73.6.7 View file →
@@ -8,9 +8,9 @@
8 8 use Elementor\Core\Base\Document;
9 9 use Elementor\Modules\PageTemplates\Module as PageTemplatesModule;
10 10
11 11 if ( ! defined( 'ABSPATH' ) ) {
12 - exit; // Exit if accessed directly.
12 + exit; // Exit if accessed directly
13 13 }
14 14
15 15 class Settings_Layout extends Tab_Base {
16 16
@@ -51,13 +51,12 @@
51 51
52 52 $this->add_responsive_control(
53 53 'container_width',
54 54 [
55 - 'label' => esc_html__( 'Content Width', 'elementor' ),
55 + 'label' => esc_html__( 'Content Width', 'elementor' ) . ' (px)',
56 56 'type' => Controls_Manager::SLIDER,
57 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
58 57 'default' => [
59 - 'size' => 1140,
58 + 'size' => '1140',
60 59 ],
61 60 'tablet_default' => [
62 61 'size' => $breakpoints_default_config[ $breakpoint_key_tablet ]['default_value'],
63 62 ],
@@ -70,12 +69,12 @@
70 69 'max' => 1500,
71 70 'step' => 10,
72 71 ],
73 72 ],
74 - 'description' => esc_html__( 'Sets the default width of the content area (Default: 1140px)', 'elementor' ),
73 + 'description' => esc_html__( 'Sets the default width of the content area (Default: 1140)', 'elementor' ),
75 74 'selectors' => [
76 75 '.elementor-section.elementor-section-boxed > .elementor-container' => 'max-width: {{SIZE}}{{UNIT}}',
77 - '.e-con' => '--container-max-width: {{SIZE}}{{UNIT}}',
76 + '.e-container' => '--container-max-width: {{SIZE}}{{UNIT}}',
78 77 ],
79 78 ]
80 79 );
81 80
@@ -80,57 +79,34 @@
80 79 );
81 80
82 81 $is_container_active = Plugin::instance()->experiments->is_feature_active( 'container' );
83 82
84 - if ( $is_container_active ) {
85 - $this->add_responsive_control(
86 - 'container_padding',
87 - [
88 - 'label' => esc_html__( 'Container Padding', 'elementor' ),
89 - 'type' => Controls_Manager::DIMENSIONS,
90 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
91 - 'description' => esc_html__( 'Sets the default space inside the container (Default is 10px)', 'elementor' ),
92 - 'selectors' => [
93 - '.e-con' => '--container-default-padding-top: {{TOP}}{{UNIT}}; --container-default-padding-right: {{RIGHT}}{{UNIT}}; --container-default-padding-bottom: {{BOTTOM}}{{UNIT}}; --container-default-padding-left: {{LEFT}}{{UNIT}};',
94 - ],
95 - ]
96 - );
97 - }
98 -
99 83 $widgets_space_label = $is_container_active
100 - ? esc_html__( 'Gaps', 'elementor' )
84 + ? esc_html__( 'Elements Gap', 'elementor' )
101 85 : esc_html__( 'Widgets Space', 'elementor' );
102 86
103 87 $this->add_control(
104 88 'space_between_widgets',
105 89 [
106 - 'label' => $widgets_space_label,
107 - 'type' => Controls_Manager::GAPS,
90 + 'label' => $widgets_space_label . ' (px)',
91 + 'type' => Controls_Manager::SLIDER,
108 92 'default' => [
109 - 'row' => '20',
110 - 'column' => '20',
111 - 'unit' => 'px',
93 + 'size' => 20,
112 94 ],
113 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
95 + 'range' => [
96 + 'px' => [
97 + 'min' => 0,
98 + 'max' => 40,
99 + ],
100 + ],
114 101 'placeholder' => [
115 - 'row' => '20',
116 - 'column' => '20',
102 + 'size' => '20',
117 103 ],
118 - 'description' => esc_html__( 'Sets the default space between widgets (Default: 20px)', 'elementor' ),
119 - 'selectors' => $this->get_spacing_selectors(),
120 - 'conversion_map' => [
121 - 'old_key' => 'size',
122 - 'new_key' => 'column',
104 + 'description' => esc_html__( 'Sets the default space between widgets (Default: 20)', 'elementor' ),
105 + 'selectors' => [
106 + '.elementor-widget:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}}',
107 + '.elementor-element' => '--widgets-spacing: {{SIZE}}{{UNIT}}',
123 108 ],
124 - 'upgrade_conversion_map' => [
125 - 'old_key' => 'size',
126 - 'new_keys' => [ 'column', 'row' ],
127 - ],
128 - 'validators' => [
129 - 'Number' => [
130 - 'min' => 0,
131 - ],
132 - ],
133 109 ]
134 110 );
135 111
136 112 $this->add_control(
@@ -141,11 +117,8 @@
141 117 'default' => 'h1.entry-title',
142 118 'placeholder' => 'h1.entry-title',
143 119 'description' => esc_html__( 'Elementor lets you hide the page title. This works for themes that have "h1.entry-title" selector. If your theme\'s selector is different, please enter it above.', 'elementor' ),
144 120 'label_block' => true,
145 - 'ai' => [
146 - 'active' => false,
147 - ],
148 121 'selectors' => [
149 122 // Hack to convert the value into a CSS selector.
150 123 '' => '}{{VALUE}}{display: var(--page-title-display)',
151 124 ],
@@ -160,11 +133,8 @@
160 133 'placeholder' => 'body',
161 134 'description' => esc_html__( 'Enter parent element selector to which stretched sections will fit to (e.g. #primary / .wrapper / main etc). Leave blank to fit to page width.', 'elementor' ),
162 135 'label_block' => true,
163 136 'frontend_available' => true,
164 - 'ai' => [
165 - 'active' => false,
166 - ],
167 137 ]
168 138 );
169 139
170 140 /**
@@ -242,20 +212,8 @@
242 212
243 213 $this->end_controls_section();
244 214 }
245 215
246 - private function get_spacing_selectors(): array {
247 - $optimized_markup = Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
248 - $sections_widget_spacing = $optimized_markup
249 - ? '--kit-widget-spacing: {{ROW}}{{UNIT}}'
250 - : 'margin-block-end: {{ROW}}{{UNIT}}';
251 -
252 - return [
253 - '.elementor-widget:not(:last-child)' => $sections_widget_spacing,
254 - '.elementor-element' => '--widgets-spacing: {{ROW}}{{UNIT}} {{COLUMN}}{{UNIT}};--widgets-spacing-row: {{ROW}}{{UNIT}};--widgets-spacing-column: {{COLUMN}}{{UNIT}};',
255 - ];
256 - }
257 -
258 216 /**
259 217 * Before Save
260 218 *
261 219 * Runs Before the Kit document is saved.
@@ -332,9 +290,8 @@
332 290 'breakpoint_' . $breakpoint_key . '_heading',
333 291 [
334 292 'label' => $default_breakpoint_config['label'],
335 293 'type' => Controls_Manager::HEADING,
336 - 'separator' => 'before',
337 294 'conditions' => [
338 295 'terms' => [
339 296 [
340 297 'name' => 'active_breakpoints',