Title: Broken link
Last modified: August 21, 2016

---

# Broken link

 *  Resolved [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * (@ate-up-with-motor)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/broken-link-21/)
 * Hi,
 * I just tried installing this plugin, but found it doesn’t work. I ran an external
   test and discovered the problem.
 * The plugin appears to have the following script path hard-coded into it:
 * [domain]/wp-content/plugins/wp-donottrack/donottrack-min.js?dntver=0.8.4
 * The problem is that the website’s content folder is no longer called wp-content;
   I changed it for security reasons.
 * Is there a way to update the plugin to allow for that? I could try to hack the
   code, but I’m leery of doing that because it will just disappear the next time
   you update.
 * Thanks!
 * [https://wordpress.org/plugins/wp-donottrack/](https://wordpress.org/plugins/wp-donottrack/)

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

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/broken-link-21/#post-5073884)
 * If you’re up to it; feel free to change and provide me with a patch-set. If it
   works I’ll push it out in a next version 🙂
 *  Thread Starter [Ate Up With Motor](https://wordpress.org/support/users/ate-up-with-motor/)
 * (@ate-up-with-motor)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/broken-link-21/#post-5073885)
 * Unfortunately, I don’t really know how to do that, at least not in a way that
   would be useful to you. (I could find the references in the code to wp-content
   and change that to the actual folder name, but I don’t have the technical skills
   to come up with a patch that would automatically insert the correct directory.)
   I’m not a programmer…
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/broken-link-21/#post-5074016)
 * OK, I’ll put in my “to do”-list, but it might take some time.
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/broken-link-21/#post-5074166)
 * had a quick look and I’m afraid there’s no wp-content hardcoded. this is the 
   essence of the code that creates the URL for the JS-file;
 *     ```
       $dnt_file="donottrack-min.js";
       $dnt_plugin_url = trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__)).'/';
       $wp_donottrack_js=$dnt_plugin_url.$dnt_file."?dntver=".$dnt_version;
       ```
   
 * This implies that on the condition the constant PLUGINDIR is set correctly to
   e.g. my-content-folder, wp-donottrack will indeed be loaded from the correct 
   URL (without /wp-content/).
 * But apperantly PLUGINDIR is deprecated (or returning wrong info), so I just pushed
   out 0.8.6 (hot on the heals of 0.8.5) switching to [wordpress’ plugins_url() function](http://codex.wordpress.org/Function_Reference/plugins_url)
   instead.
 * hope this helps,
    frank

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

The topic ‘Broken link’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-donottrack.svg)
 * [WP DoNotTrack](https://wordpress.org/plugins/wp-donottrack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-donottrack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-donottrack/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-donottrack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-donottrack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-donottrack/reviews/)

## Tags

 * [wp-content](https://wordpress.org/support/topic-tag/wp-content/)

 * 4 replies
 * 2 participants
 * Last reply from: [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/broken-link-21/#post-5074166)
 * Status: resolved