Forums

[Plugin: pb-embedFlash] calling jquery script with wp_enqueue_script (2 posts)

  1. matthijs_b
    Member
    Posted 3 years ago #

    Hi, A bug report, not sure where else to report it to. In the file inc/functions.inc around line 173 the plugin calls jquery (and other scripts) with an absolute path.

    This can create (it did) a conflict easily with other scripts that also use and call jquery. WordPress can solve this problem by using wp_enqueue_script() which gives scripts a handle and avoids loading the same script twice (which broke mine).

  2. pasber
    Member
    Posted 3 years ago #

    You can tell the plugin not to load any JavaScript libraries, so that it uses the existing one/s (e.g. loaded by another plugin).

    pb-embedFlash Settings -> Shadowbox & Popup

    So principally you are right: wp_enqueue_script() can prevent errors. But most of the plugins out their load JavaScript files from their plugin folder, so it's not that safe as it's claimed to be.

    But my prime reason to use the "hard way" is that I cannot load scripts while being in the output. This is important because I don't want to load all the scripts but give the option to use the different modes (object tag, shadowbox, popup, ...) simultaneously.

Topic Closed

This topic has been closed to new replies.

About this Topic