hello,
I’d need to conditionally load a google map JS when the user is viewing a page in “readonly mode” $canEdit = false
while, if he is logged, or is watching a page one can edit $canEdit = true
such file must not be loaded or it creates a conflict with ACF jquery maps input field.
I can’t do it in the setup.php with wp_enqueue_script as I need a specific condition to be applied: $canEdit = true
and don’t wan’t to echo a tag…
is there a cleaner way to do this?
tyvm