There’s a filter: script_loader_tag
.
add_filter( 'script_loader_tag', 'wpse397773_change_script_tags', 10, 3 );
function wpse397773_change_script_tags( $tag, $handle, $src ) {
$tag = '<script type="text/plain" src="' . $src . '" id="' . $handle . '-js"></script>';
return $tag;
}
This should change all the <script>
tags in the page (assuming they’re properly enqueued) to <script type="text/plain">
.
Update: To only change the <script>
tag for the juicerembed
script, you can do this:
add_filter( 'script_loader_tag', 'wpse397773_change_script_tags', 10, 3 );
function wpse397773_change_script_tags( $tag, $handle, $src ) {
if ( 'juicerembed' == $handle ) {
$tag = '<script type="text/plain" src="' . $src . '" id="' . $handle . '-js"></script>';
}
return $tag;
}
I haven’t tested this at all, but hopefully it’ll be a starting point for you.