Check URLs of enqueued scripts to see if a JS lib is loaded by different handle? (1 post)

  1. datdesignguy
    Posted 3 years ago #

    Hi All,

    I'm having some issues with developing a Plugin that uses the Facebook Javascript SDK. The problem relates to the fact that the WP_Dependencies class doesn't check the actual URL of the library being queued up, which will allow two plugins using different handles for the same library to queue and load.

    This leads to some very bad behavior.

    I'm wondering if we can come up with a solution to prevent this from happening, and hopefully pitch it as an enhancement to the Core team.

    If it's alright to share, I have detailed the problem, and my thoughts on what to do about it on my blog, here: http://innerbot.com/wordpress-development/wordpress-needs-a-new-dependency-handler/

    I'd like to be able to post a followup with some potential solutions/workarounds, but I'm still in the "figuring it all out" stage right now.

    Anyone have any idea how to work around this issue?

Topic Closed

This topic has been closed to new replies.

About this Topic