PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.3
Elementor Website Builder – more than just a page builder v4.0.3
4.3.4 4.3.3 4.3.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 All 457 releases
← All changes | modules/global-classes/global-classes-parser.php +15 -0 4.0.2 → 4.0.3 View file →
@@ -136,5 +136,20 @@
136 136 }
137 137 }
138 138 return $duplicates;
139 139 }
140 +
141 + public static function sanitize_order( array $items, array $order ): array {
142 + if ( empty( $items ) ) {
143 + return [];
144 + }
145 +
146 + $item_ids = array_keys( $items );
147 + $order = array_filter( $order, 'is_string' );
148 + $order = array_unique( $order );
149 + $order_existing = array_values( array_intersect( $order, $item_ids ) );
150 + $missing = array_diff( $item_ids, $order_existing );
151 + sort( $missing, SORT_STRING );
152 +
153 + return array_merge( $order_existing, $missing );
154 + }
140 155 }