• Resolved stevemullen

    (@stevemullen)


    This plugin appears to call wp_enqueue_script directly in a handful of its extensions. This is not supported and generates PHP warnings. These are the instances I found. I believe there are more:

    w3-total-cache/Extension_Swarmify_Widget.php
    ln 18 – wp_enqueue_style is called directly.

    w3-total-cache/Cdnfsd_LimeLight_Page.php
    ln 7 – wp_enqueue_script is called directly.

    w3-total-cache/Extension_NewRelic_Widget.php
    ln 42 – wp_enqueue_script is called directly.

    w3-total-cache/PageSpeed_Plugin_Widget.php
    ln 36 & ln 39 – wp_enqueue_script is called directly.

    w3-total-cache/PgCache_Page_CookieGroups.php
    ln 8 & ln 9 – wp_enqueue_script is called directly.

    The correct way to load js is via an action:
    https://codex.www.ads-software.com/Plugin_API/Action_Reference/wp_enqueue_scripts

    Thank you

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘PHP Notice: wp_enqueue_script was called incorrectly’ is closed to new replies.