PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0-beta3
Elementor Website Builder – more than just a page builder v4.3.0-beta3
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
elementor / modules / components / variants / component-variant-class-collector.php

component-variant-class-collector.php in Elementor Website Builder – more than just a page builder 4.3.0-beta3, at modules/components/variants/component-variant-class-collector.php

32 lines 673 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\Components\Variants;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit;
7 }
8
9 class Component_Variant_Class_Collector {
10 public static function collect( Component_Variants $variants ): array {
11 $class_ids = [];
12
13 foreach ( $variants->variants as $variant ) {
14 foreach ( $variant->widgets as $widget_entry ) {
15 $add_list = $widget_entry['settings']['classes'][ Component_Variant_Parser::ACTION_ADD ] ?? [];
16
17 if ( ! is_array( $add_list ) ) {
18 continue;
19 }
20
21 foreach ( $add_list as $class_id ) {
22 if ( is_string( $class_id ) && '' !== $class_id ) {
23 $class_ids[] = $class_id;
24 }
25 }
26 }
27 }
28
29 return $class_ids;
30 }
31 }
32