Title: javascript not properly enqueued
Last modified: August 21, 2016

---

# javascript not properly enqueued

 *  [Pieter Bos](https://wordpress.org/support/users/senlin/)
 * (@senlin)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/javascript-not-properly-enqueued/)
 * Hi, great plugin.
 * I found that the call for the javascript has not been properly enqueued and causes
   conflicts with other plugins.
 * So I made some changes to the plugin and now it works fine. Wanted to share those
   changes with you, so you can implement them (and show that the plugin is still
   in active development, hahaha).
 * change function butc_script() into:
 *     ```
       function butc_script() {
       	if (!isset($_GET['page']) || !$_GET['page'] == "bind-user.php") return;
       		wp_enqueue_script('bind-user.js');
       }
       ```
   
 * Then change the add_action to that function into:
    `add_action('init', 'butc_script');`
 * One more thing:
    I was trying to bind multiple taxonomies to a user as I would
   like to bind a category as well as a custom taxonomy to a user. As it turns out,
   your plugin only remembers the last input. Would it be possible to change the
   plugin so it does the trick for more than one taxonomies?
 * [http://wordpress.org/extend/plugins/bind-user-taxonomy/](http://wordpress.org/extend/plugins/bind-user-taxonomy/)

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

 *  Thread Starter [Pieter Bos](https://wordpress.org/support/users/senlin/)
 * (@senlin)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/javascript-not-properly-enqueued/#post-3946169)
 * You will also need to change the function `function butc_adminHead($in)` as it
   checks for $user_level, which has been deprecated **a long time ago** already…
 *  Thread Starter [Pieter Bos](https://wordpress.org/support/users/senlin/)
 * (@senlin)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/javascript-not-properly-enqueued/#post-3946171)
 * Instead of checking for a version and offer alternate methods for older versions,
   you could also give the plugin a minimum WordPress version requirement.
 * Once you do that, you don’t have to offer backward compatibility, but just let
   it all die if the version doesn’t match the minimum requirement:
 *     ```
       /* Version check */
       global $wp_version;
       $exit_msg=__('The Bind Users to Taxonomy plugin requires WordPress version 3.0 or higher; please update first.', 'butc');
       if (version_compare($wp_version,"3.0","<"))
       {
       	exit ($exit_msg);
       }
       ```
   
 *  [physalis](https://wordpress.org/support/users/physalis/)
 * (@physalis)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/javascript-not-properly-enqueued/#post-3946439)
 * Damnit, this is the only plugin working so far for binding users to a taxonomy
   term, but by reading this it seems I should head for another solution. I have
   the same problems: I would like to attach a user to different taxonomies’ terms
   AND have conflicts with other plugins. Since no-one answers here since almost
   a year I have to consider this plugin being slowly discontinued?!

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

The topic ‘javascript not properly enqueued’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bind-user-taxonomy.svg)
 * [Bind Users to Taxonomy](https://wordpress.org/plugins/bind-user-taxonomy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bind-user-taxonomy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bind-user-taxonomy/)
 * [Active Topics](https://wordpress.org/support/plugin/bind-user-taxonomy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bind-user-taxonomy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bind-user-taxonomy/reviews/)

## Tags

 * [enqueue script](https://wordpress.org/support/topic-tag/enqueue-script/)

 * 3 replies
 * 2 participants
 * Last reply from: [physalis](https://wordpress.org/support/users/physalis/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/javascript-not-properly-enqueued/#post-3946439)
 * Status: not resolved