function enqueue_superflow() { wp_enqueue_script('superflow'); // Add apiKey as a window-level variable add_action('wp_footer', 'add_superflow_api_key_script'); function add_superflow_api_key_script() { $apiKey = 'syh7w55LM2dURAgOHUe1'; echo ''; } // Register the script wp_register_script('superflow', 'https://cdn.jsdelivr.net/npm/@snippyly/plugin/snippyly.min.js', array(), null, true); // Add 'type' attribute with value 'module' to the script tag add_filter('script_loader_tag', 'add_superflow_script', 10, 3); function add_superflow_script($tag, $handle, $src) { if ('superflow' === $handle) { $tag = ''; } return $tag; } // Enqueue the registered script wp_enqueue_script('superflow'); } add_action('wp_enqueue_scripts', 'enqueue_superflow'); Log In ‹ Chana — WordPress

Powered by WordPress

← Go to Chana