PluginProbe
Elementor Website Builder – more than just a page builder / 3.17.0-dev3
Elementor Website Builder – more than just a page builder v3.17.0-dev3
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 4.0.7 All 451 releases
← All changes | includes/widgets/toggle.php +16 -61 4.2.43.17.0-dev3 View file →
@@ -73,27 +73,9 @@
73 73 public function get_keywords() {
74 74 return [ 'tabs', 'accordion', 'toggle' ];
75 75 }
76 76
77 - protected function is_dynamic_content(): bool {
78 - return false;
79 - }
80 -
81 77 /**
82 - * Get style dependencies.
83 - *
84 - * Retrieve the list of style dependencies the widget requires.
85 - *
86 - * @since 3.24.0
87 - * @access public
88 - *
89 - * @return array Widget style dependencies.
90 - */
91 - public function get_style_depends(): array {
92 - return [ 'widget-toggle' ];
93 - }
94 -
95 - /**
96 78 * Hide widget from panel.
97 79 *
98 80 * Hide the toggle widget from the panel if nested-accordion experiment is active.
99 81 *
@@ -100,15 +82,11 @@
100 82 * @since 3.15.0
101 83 * @return bool
102 84 */
103 85 public function show_in_panel(): bool {
104 - return ! Plugin::$instance->experiments->is_feature_active( 'nested-elements', true );
86 + return ! Plugin::$instance->experiments->is_feature_active( 'nested-elements' );
105 87 }
106 88
107 - public function has_widget_inner_wrapper(): bool {
108 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
109 - }
110 -
111 89 /**
112 90 * Register toggle widget controls.
113 91 *
114 92 * Adds different input fields to allow the user to change and customize the widget settings.
@@ -182,8 +160,17 @@
182 160 ]
183 161 );
184 162
185 163 $this->add_control(
164 + 'view',
165 + [
166 + 'label' => esc_html__( 'View', 'elementor' ),
167 + 'type' => Controls_Manager::HIDDEN,
168 + 'default' => 'traditional',
169 + ]
170 + );
171 +
172 + $this->add_control(
186 173 'selected_icon',
187 174 [
188 175 'label' => esc_html__( 'Icon', 'elementor' ),
189 176 'type' => Controls_Manager::ICONS,
@@ -304,9 +291,9 @@
304 291 [
305 292 'label' => esc_html__( 'Border Color', 'elementor' ),
306 293 'type' => Controls_Manager::COLOR,
307 294 'selectors' => [
308 - '{{WRAPPER}} .elementor-tab-content' => 'border-block-end-color: {{VALUE}};',
295 + '{{WRAPPER}} .elementor-tab-content' => 'border-bottom-color: {{VALUE}};',
309 296 '{{WRAPPER}} .elementor-tab-title' => 'border-color: {{VALUE}};',
310 297 ],
311 298 ]
312 299 );
@@ -315,22 +302,16 @@
315 302 'space_between',
316 303 [
317 304 'label' => esc_html__( 'Space Between', 'elementor' ),
318 305 'type' => Controls_Manager::SLIDER,
319 - 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
320 306 'range' => [
321 307 'px' => [
308 + 'min' => 0,
322 309 'max' => 100,
323 310 ],
324 - 'em' => [
325 - 'max' => 10,
326 - ],
327 - 'rem' => [
328 - 'max' => 10,
329 - ],
330 311 ],
331 312 'selectors' => [
332 - '{{WRAPPER}} .elementor-toggle-item:not(:last-child)' => 'margin-block-end: {{SIZE}}{{UNIT}}',
313 + '{{WRAPPER}} .elementor-toggle-item:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}}',
333 314 ],
334 315 ]
335 316 );
336 317
@@ -485,22 +466,17 @@
485 466 'icon_space',
486 467 [
487 468 'label' => esc_html__( 'Spacing', 'elementor' ),
488 469 'type' => Controls_Manager::SLIDER,
489 - 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
490 470 'range' => [
491 471 'px' => [
472 + 'min' => 0,
492 473 'max' => 100,
493 474 ],
494 - 'em' => [
495 - 'max' => 10,
496 - ],
497 - 'rem' => [
498 - 'max' => 10,
499 - ],
500 475 ],
501 476 'selectors' => [
502 - '{{WRAPPER}} .elementor-toggle-icon' => 'margin-inline-end: {{SIZE}}{{UNIT}};',
477 + '{{WRAPPER}} .elementor-toggle-icon.elementor-toggle-icon-left' => 'margin-right: {{SIZE}}{{UNIT}};',
478 + '{{WRAPPER}} .elementor-toggle-icon.elementor-toggle-icon-right' => 'margin-left: {{SIZE}}{{UNIT}};',
503 479 ],
504 480 ]
505 481 );
506 482
@@ -737,27 +713,6 @@
737 713 } );
738 714 } #>
739 715 </div>
740 716 <?php
741 - }
742 -
743 - public function render_markdown(): string {
744 - $settings = $this->get_settings_for_display();
745 - if ( empty( $settings['tabs'] ) ) {
746 - return '';
747 - }
748 - $sections = [];
749 - foreach ( $settings['tabs'] as $item ) {
750 - $title = Utils::html_to_plain_text( $item['tab_title'] ?? '' );
751 - $content = \Elementor\Modules\MarkdownRender\Html_To_Markdown::convert( $item['tab_content'] ?? '' );
752 - if ( empty( $title ) && empty( $content ) ) {
753 - continue;
754 - }
755 - $section = '### ' . $title;
756 - if ( ! empty( $content ) ) {
757 - $section .= "\n\n" . $content;
758 - }
759 - $sections[] = $section;
760 - }
761 - return implode( "\n\n", $sections );
762 717 }
763 718 }