WordPress.org

Ready to get started?Download WordPress

Forums

GET enqueued scripts? (8 posts)

  1. briang
    Member
    Posted 4 years ago #

    I am familiar with wp_enqueue_script() used by many Plugins.

    What I would like, is a way to see all what scripts have been enqueued. Like a get_enqueued_scripts().

    Anyone know a way to find what scripts all have been enqueued?

    thanks!

  2. JohnnyPea
    Member
    Posted 3 years ago #

    It is possible to display all enqueued scripts/styles?

    I need this to find out which scripts/styles have been added by the plugins or the theme.

  3. Ozh
    Member
    Posted 3 years ago #

    global $wp_scripts;
    var_dump( $wp_scripts );
  4. JohnnyPea
    Member
    Posted 3 years ago #

    Sorry but I tried this before and it returns NULL or nothing at all...where should I put it?

  5. Michael Fields
    Themer
    Posted 3 years ago #

    Try header.php after wp_head();

  6. JohnnyPea
    Member
    Posted 3 years ago #

    I already tried that. It returns NULL :(

  7. Michael Fields
    Themer
    Posted 3 years ago #

    Even with the global declaration? I just tried it and it printed out a whole lot of information. When I removed global $wp_scripts; it printed NULL.

  8. JohnnyPea
    Member
    Posted 3 years ago #

    Sorry, my mistake. I switched off all the plugins so actually there was nothing to show :)

    Thank you guys. It is working now.

Topic Closed

This topic has been closed to new replies.

About this Topic