<?php
/**
 * Shared functionality loader for Divi Supreme Modules
 * 
 * This file loads all shared functionality that can be used across different versions
 * 
 * @since 1.0.0
 * @package dsm-supreme-modules-pro-for-divi
 */

// Prevent direct access
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// Require attachment fields functionality
require_once plugin_dir_path( __FILE__ ) . 'dsm-attachment-fields.php';

// Enable Dynamic Assets option helper (`dsm_settings_misc`).
require_once plugin_dir_path( __FILE__ ) . 'dsm-dynamic-assets-option.php';

// Shared text path extra shape presets (D4 / D5).
require_once plugin_dir_path( __FILE__ ) . 'dsm-text-path-shape-presets.php';

if ( ! function_exists( 'dsm_is_marketplace_build' ) || ! dsm_is_marketplace_build() ) {
	// Shared remote licensing (deactivate API; uninstall + settings).
	require_once plugin_dir_path( __FILE__ ) . 'dsm-license-remote.php';

	// Beta update channel (optional; gated by Misc → Allow Beta Updates + licence checks).
	require_once plugin_dir_path( __FILE__ ) . 'dsm-beta-updates.php';

	// Stable channel: same license API updater as Divi 4 (Divi 5 does not load it from the D4 bootstrap).
	require_once plugin_dir_path( __FILE__ ) . 'dsm-stable-plugin-updater-loader.php';
}