Title: Consider using wp_enqueue_script
Last modified: February 28, 2018

---

# Consider using wp_enqueue_script

 *  [Matthieu](https://wordpress.org/support/users/theschappy/)
 * (@theschappy)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/consider-using-wp_enqueue_script/)
 * Hi Rob,
 * please consider to replace the manual inclusion of relevant javascript (and stylesheet)
   resources provided by Google through the use of the WordPress `wp_enquque_script`
   method. Furthermore, please consider externalizing eventual javascript snippets
   in a separate js-file in your plugins directory and include it in a similar way.
 * For example, it resolves dependencies, duplicate inclusion of the same script
   is prevented automatically, and optimizations, such as minification, are automatically
   applied to them.
 * In particular, I am using a filter in my theme to remove `type="text/javascript"`
   tags from all enqueued javascripts as the type tag is deprecated, which cannot
   handle your included javascript tags.
 * Thanks in advance,
 * Matthieu
 * **Plugin-Version**
    5.0.41
 * **Affected Methods**
    `google-language-translator.php:334` `public function footer_script()``
   <script type='text/javascript' src='//translate.google.com/translate_a/element.
   js?cb=GoogleLanguageTranslatorInit'></script>`

The topic ‘Consider using wp_enqueue_script’ is closed to new replies.

 * ![](https://ps.w.org/google-language-translator/assets/icon-256x256.png?rev=3007649)
 * [Translate WordPress - Google Language Translator](https://wordpress.org/plugins/google-language-translator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-language-translator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-language-translator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-language-translator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-language-translator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-language-translator/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * 0 replies
 * 1 participant
 * Last reply from: [Matthieu](https://wordpress.org/support/users/theschappy/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/consider-using-wp_enqueue_script/)
 * Status: not resolved