<?php
/**
 * Plugin Name: EasySite Distributor Config
 * Description: Connect EasySite Pro to your license server and update manifest.
 * Version: 1.0
 *
 * Copy this file to wp-content/mu-plugins/easysite-distributor.php
 * and update the URLs below.
 */

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

/**
 * Remote license API endpoint (POST: license_key, site_url, action).
 *
 * action: activate | deactivate | check
 * Response: { "success": true, "message": "..." }
 */
add_filter( 'easysite_license_api_url', function () {
	return 'https://your-license-server.example/api/license';
} );

/**
 * Remote update manifest URL (GET JSON).
 *
 * Response: {
 *   "version": "1.6.1",
 *   "download_url": "https://.../easysite-pro-ultimate-bundle.zip",
 *   "homepage": "https://yoursite.example",
 *   "changelog": "..."
 * }
 */
add_filter( 'easysite_update_url', function () {
	return 'https://your-license-server.example/api/update.json';
} );

/**
 * Optional: disable license enforcement on staging.
 */
// define( 'EASYSITE_DEV_MODE', true );
