[ad_1]
you can disable “aggregate inline JS” with a filter;
add_filter('autoptimize_js_include_inline', '__return_false' );
so based on that you can do something like;
add_filter('autoptimize_js_include_inline', function( $state ) {
if ( true === $example_condition ) {
return false;
}
return true;
} );so if you change the $example_condition to something relevant for identifying a page (based on URL or page ID) , you could use that?
Hello,
It works! Except that the first return must be true and the second false.
Thank you!
