Check if a script/style was enqueued/registered

Posted by Prem Tiwari | Updated on

There is a function called wp_script_is( $handle, $list )$list can be one of:

  • ‘registered’ — was registered through wp_register_script()
  • ‘queue’ — was enqueued through wp_enqueue_script()
  • ‘done’ — has been printed
  • ‘to_do’ — will be printed

Ditto all that for wp_style_is().


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers