Viewing 1 post (of 1 total)
  • Author
    Posts
  • #55030
    daniele.dfn
    Participant

    Hi there.
    I’ve noticed that since a specific version, the function wp_enqueue_notice_scripts (inside frontend.php in the includes folder) has been modified: cnArgs is added using wp_add_inline_script instead of using wp_localize_script. This change do not work for my theme. The script block for cnArgs is not printed and I receive the error “cnArgs is not defined”.
    If I change the $script_data instance and the wp_add_inline_script with all the previous wp_localize_script function, everything works as expected.
    So wp_add_inline_script do not work for my theme maybe.
    Any idea why this is happening?
    Thanks in advance for your help

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.