hahah not yet, but I guess this is not related to autopmimize so I opened a new thread in our plugin section 🙂
https://ww.wp.xz.cn/support/topic/how-to-move-wp_enqueue_scripts-in-front-of
hmm, autopmimize sets inline css infront of <title> …
would it be possible to set this infront of </head> ?
then it could work w/ the nonce script order in head
Regards, Ralph
yeah, there’s a filter in the API for that as well 🙂
you can check out autoptimize_helper.php_example for the code.
frank
Hello Frank,
I was able to move the javascript below wp_head(), by changing the plugin add_action from wp_enqueue_scripts to wp_head so the nonce function is still working …
I tried to place the autoptimze inline css from above <title> infront of </head> but without success …
added to function.php
function my_ao_override_css_replacetag($replacetag) {
return array(“</head>”,”before”);
}
Ralph
ah, but you need to hook that function to the “autoptimize_filter_css_replacetag”-filter for it to work off course;
add_filter('autoptimize_filter_css_replacetag','my_ao_override_css_replacetag',10,1);
did you do that?
frank
ugh, you’re right 😉
thank you for the great support !!!
Ralph