should the configuration be injected differently?
Opened this issue · 2 comments
Responding to https://wordpress.org/support/topic/problem-with-inline-equations/
made me look at
Simple-Mathjax-wordpress-plugin/simple-mathjax.php
Lines 357 to 358 in 7bf526c
and this got me wondering if perhaps the configuration should also hook into wp_enqueue_scripts
rather than wp_head
.
cc @christianp @scoskey.
wp_enqueue_scripts
doesn't happen at the point that the script tags are produced, it's just used to set up the queue of script URLs that should be used. Since the configuration script is defined inside the script tag instead of being loaded from a URL, we can't set it up there.
Thanks, @christianp. My wordpress knowledge has degraded significantly in the past few years.
If anyone knows of a better way to handle the injection of the configuration, please leave a comment.