Ultimate Tag Cloud Widget
[resolved] Fix Hard-Coded Plugin Paths for those using custom content path (3 posts)

  1. Travis Tubbs
    Posted 3 years ago #

    Whenever I set up a WordPress site, I always change/rename my content folder path (normally wp-content) using the WP_CONTENT_DIR and WP_CONTENT_URL options in wp-config.php. Unfortunately, UTCW uses a hard-coded path for it's JavaScript and CSS files. This causes them to not load on my sites.

    If you could please update your plugin in the future to accomodate for this, I would appreciate it.

    For those that have run into the same issue as I have, here's what I did to fix it. In the file ultimate-tag-cloud-widget.php, I added the following line to the list of other defines:
    define("UTCW_DEFAULT_PLUGIN_PATH", plugin_dir_url(__FILE__) );

    Scroll down to near the bottom of the file (around Line 960) to find the registration of the JS and CSS files. Change them to:

    wp_register_script('utcw-js', UTCW_DEFAULT_PLUGIN_PATH . 'utcw.min.js', array('jquery'), "1.3", false);
    wp_register_style('utcw-css', UTCW_DEFAULT_PLUGIN_PATH . 'utcw.min.css', array(), "1.3", 'all');

    This should fix the issue.


  2. Rickard Andersson
    Plugin Author

    Posted 3 years ago #

    Thank you for your help in this matter. I will look into changing this in a future release of UTCW.

  3. Rickard Andersson
    Plugin Author

    Posted 3 years ago #

    This has been fixed now in 1.3.17, thanks for reporting this issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ultimate Tag Cloud Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic