• Resolved John McCarthy

    (@john-lion)


    Hi this is a carry on from a feature request I posted feature-request-async-defer

    I’ve been attempting to determine the script handles produced by the plugin.

    From what I can deduce from the plugin code, the script handle for a footer script for example would be footer-[data] with data being a string of letters and numbers.

    When printing out the $wp_scripts variable, scripts loaded by the plugin were not there. Hopefully they are and I have something wrong.

    It’d be great if I could access the scripts via their handles, could you assist?

    Thanks in advance,

    John

Viewing 1 replies (of 1 total)
  • Plugin Author launchinteractive

    (@launchinteractive)

    Hi John,

    MMR inspects all the scripts that has been enqueued and attempts to merge the files all into one. Once it has a list of files to merge it then removes their handles from wp_scripts and adds a new handle which is a new file containing the contents of all the merged files.

    That means that you can’t access the script handles once MMR has run because its likely to change the handles (unless its an external script).

Viewing 1 replies (of 1 total)
  • The topic ‘Accessing scripts loaded by the plugin’ is closed to new replies.