What’s the better way to add an inline script?
wp_add_inline_script() is intended to be used for inline scripts that use or depend on another script that’s been enqueued with wp_enqueue_script(). It ensures that the inline script is placed appropriately relative to the main script and will won’t appear if the main script is unregistered. The example from the announcement was using Typekit: function mytheme_enqueue_typekit() … Read more