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'); Dev – Chana

Category: Dev

We Love It When You Love It

2

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type […]

Read More