• File: default-children-utils.php
  • Full Path: /home/slvgwrnz/public_html/wp-content/plugins/elementor/modules/mcp/abilities/utils/default-children-utils.php
  • Date Modified: 09/01/2026 8:47 AM
  • File size: 477 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace Elementor\Modules\Mcp\Abilities\Utils;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Default_Children_Utils {
	public static function get_required_child_types( array $default_children ): array {
		$types = [];

		foreach ( $default_children as $child ) {
			if ( empty( $child['meta']['required'] ) ) {
				continue;
			}

			$type = $child['widgetType'] ?? $child['elType'] ?? null;

			if ( $type ) {
				$types[] = $type;
			}
		}

		return $types;
	}
}