PluginProbe
Elementor Website Builder – more than just a page builder / 3.17.2
Elementor Website Builder – more than just a page builder v3.17.2
4.3.1 4.3.0 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 All 454 releases
← All changes | includes/widgets/accordion.php +15 -62 4.3.0-beta2 → 3.17.2 View file →
@@ -73,27 +73,9 @@
73 73 public function get_keywords() {
74 74 return [ 'accordion', 'tabs', '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-accordion' ];
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( 'container' );
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 accordion widget controls.
113 91 *
114 92 * Adds different input fields to allow the user to change and customize the widget settings.
@@ -179,8 +157,17 @@
179 157 ]
180 158 );
181 159
182 160 $this->add_control(
161 + 'view',
162 + [
163 + 'label' => esc_html__( 'View', 'elementor' ),
164 + 'type' => Controls_Manager::HIDDEN,
165 + 'default' => 'traditional',
166 + ]
167 + );
168 +
169 + $this->add_control(
183 170 'selected_icon',
184 171 [
185 172 'label' => esc_html__( 'Icon', 'elementor' ),
186 173 'type' => Controls_Manager::ICONS,
@@ -303,10 +290,10 @@
303 290 'label' => esc_html__( 'Border Color', 'elementor' ),
304 291 'type' => Controls_Manager::COLOR,
305 292 'selectors' => [
306 293 '{{WRAPPER}} .elementor-accordion-item' => 'border-color: {{VALUE}};',
307 - '{{WRAPPER}} .elementor-accordion-item .elementor-tab-content' => 'border-block-start-color: {{VALUE}};',
308 - '{{WRAPPER}} .elementor-accordion-item .elementor-tab-title.elementor-active' => 'border-block-end-color: {{VALUE}};',
294 + '{{WRAPPER}} .elementor-accordion-item .elementor-tab-content' => 'border-top-color: {{VALUE}};',
295 + '{{WRAPPER}} .elementor-accordion-item .elementor-tab-title.elementor-active' => 'border-bottom-color: {{VALUE}};',
309 296 ],
310 297 ]
311 298 );
312 299
@@ -461,22 +448,17 @@
461 448 'icon_space',
462 449 [
463 450 'label' => esc_html__( 'Spacing', 'elementor' ),
464 451 'type' => Controls_Manager::SLIDER,
465 - 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
466 452 'range' => [
467 453 'px' => [
454 + 'min' => 0,
468 455 'max' => 100,
469 456 ],
470 - 'em' => [
471 - 'max' => 1,
472 - ],
473 - 'rem' => [
474 - 'max' => 1,
475 - ],
476 457 ],
477 458 'selectors' => [
478 - '{{WRAPPER}} .elementor-accordion-icon' => 'margin-inline-end: {{SIZE}}{{UNIT}};',
459 + '{{WRAPPER}} .elementor-accordion-icon.elementor-accordion-icon-left' => 'margin-right: {{SIZE}}{{UNIT}};',
460 + '{{WRAPPER}} .elementor-accordion-icon.elementor-accordion-icon-right' => 'margin-left: {{SIZE}}{{UNIT}};',
479 461 ],
480 462 ]
481 463 );
482 464
@@ -657,37 +639,8 @@
657 639 *
658 640 * @since 2.9.0
659 641 * @access protected
660 642 */
661 - public function render_markdown(): string {
662 - $settings = $this->get_settings_for_display();
663 -
664 - if ( empty( $settings['tabs'] ) ) {
665 - return '';
666 - }
667 -
668 - $sections = [];
669 -
670 - foreach ( $settings['tabs'] as $item ) {
671 - $title = Utils::html_to_plain_text( $item['tab_title'] ?? '' );
672 - $content = \Elementor\Modules\MarkdownRender\Html_To_Markdown::convert( $item['tab_content'] ?? '' );
673 -
674 - if ( empty( $title ) && empty( $content ) ) {
675 - continue;
676 - }
677 -
678 - $section = '### ' . $title;
679 -
680 - if ( ! empty( $content ) ) {
681 - $section .= "\n\n" . $content;
682 - }
683 -
684 - $sections[] = $section;
685 - }
686 -
687 - return implode( "\n\n", $sections );
688 - }
689 -
690 643 protected function content_template() {
691 644 ?>
692 645 <div class="elementor-accordion">
693 646 <#