How can I get all urls of enqueued scripts after wp_head()?

After

wp_head(),
global $wp_scripts,
$wp_scripts

Read More

contains all handles of enqueued scripts but URLs. So how can I get all URLs of enqueued scripts?

Related posts

Leave a Reply

2 comments

  1. Well it would have been better if you would have explained your purpose behind doing so.

    I am assuming that you just want to check whether your JS file is getting enqueued or not.

    For that purpose I would suggest a much simpler solution which would be benificial and effective for all of your future references too.

    If you really want to check the URLs of all enqueued JS files, I would suggest you to install an addon FireBug for your FireFox browser.

    After you have installed it, just press F12 or right click on any part of page and select “Inspect with FireBug”.

    Now a small panel opens up in the bottom of the screen.

    Click on “Net” Tab. & Then select “Javascript” in the subordinate tab.

    Here you will get list of all of the JS files that have been enqueued by your theme & plugins.

    If the JS file didn’t get loaded, then it will show a “404 Not found” next to the name of your JS file.

    So you can easily check whether your JS file got enqueued or not.

    If you check the screenshot, you see that you get all the JS files under 1 tab with all the information like ‘URL, Size, Remote-ip & Time Line’.

    enter image description here

    So I guess this will solve your problem.

    In case it still doesn’t or you are trying to achieve something else, please do reply & give some more details about it.