Title: wp_add_inline_script
Last modified: February 18, 2025

---

# wp_add_inline_script

 *  Resolved [Insect Trojan](https://wordpress.org/support/users/insecttrojan/)
 * (@insecttrojan)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/wp_add_inline_script/)
 * **PHP Notice:** The function `wp_add_inline_script` was called **incorrectly**.
   Do not include `<script>` tags in `wp_add_inline_script()`. Please see the page
   [Debugging in WordPress](https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/)
   for more information. (This message was added in version 4.5.0.) in `/home/in584323/
   public_html/wp-includes/functions.php` on line **6114**.
 * This means that somewhere in your code, `wp_add_inline_script()` is being used
   incorrectly by passing JavaScript that contains `<script>` tags. You need to 
   remove those tags before passing the script.
 * hello i want you help i have this error on caos i know it because i deactivate
   all the other plugins how to solve it ?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwp_add_inline_script%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/wp_add_inline_script/#post-18313022)
 * Hi!
 * There’s no code in my plugin that calls `wp_add_inline_script()` on a string 
   with <script> tags. So, that’s odd!
 * Can you enable debugging (like the error suggests) to find out on which line 
   and which file the function is supposed to be triggered incorrectly?
 * Also, are you running the latest version? And which PHP version are you running?
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/wp_add_inline_script/#post-18313025)
 * Oops! Wait. Just found it.
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/wp_add_inline_script/#post-18313063)
 * Hi! I just released v4.8.5 which includes a fix for this warning.
 * Thanks for notifying me!
 *  Thread Starter [Insect Trojan](https://wordpress.org/support/users/insecttrojan/)
 * (@insecttrojan)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/wp_add_inline_script/#post-18313148)
 * thanks a lot [@daanvandenbergh](https://wordpress.org/support/users/daanvandenbergh/)
   you are super fast 😀
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/wp_add_inline_script/#post-18313170)
 * I can’t seem to add a Giphy here, but here’s the link 🙂
 * [https://giphy.com/gifs/B1uajA01vvL91Urtsp](https://giphy.com/gifs/B1uajA01vvL91Urtsp)
    -  This reply was modified 1 year, 1 month ago by [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/).
    -  This reply was modified 1 year, 1 month ago by [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘wp_add_inline_script’ is closed to new replies.

 * ![](https://ps.w.org/host-analyticsjs-local/assets/icon-256x256.png?rev=3307068)
 * [CAOS | Host Google Analytics Locally](https://wordpress.org/plugins/host-analyticsjs-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-analyticsjs-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-analyticsjs-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-analyticsjs-local/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/wp_add_inline_script/#post-18313170)
 * Status: resolved