Link Library
Doesn't support wp_plugin_url (6 posts)

  1. staze
    Posted 5 years ago #

    I have wp_content_url set to help speed up load times by moving static content off to static.hostname.org.

    It seems wp_plugin_url is normally based off wp_content_url, but you can set to to be something normal, like http://www.hostname.org. It seems link library doesn't support having wp_plugin_url set. The main symptom of this is the icon for the settings page doesn't load, it just shows as a question mark, and the url points to static.hostname.org/wp-content/plugins/...

    Any chance we can get this fixed? =)



  2. Yannick Lefebvre
    Plugin Author

    Posted 5 years ago #

    I will only be able to look at this in two weeks or so as I am currently on a 10-day business trip.

  3. staze
    Posted 5 years ago #

    That's just fine, thanks!!

  4. Yannick Lefebvre
    Plugin Author

    Posted 5 years ago #

    I looked at the code and I use both WP_CONTENT_URL and WP_PLUGIN_URL in my code, both of which are constants that are supposed to be available in WordPress.

    Now, are you redirecting both or only one of the two? What are you storing on static.hostname.org? Is it the entire site?

  5. staze
    Posted 5 years ago #

    Okay, I responded to this a couple days ago, but it didn't post. Weird.

    Anyway, WP_CONTENT_URL points to static.hostname.org, and WP_PLUGIN_URL points to http://www.hostname.org.

    static.hostname.org is just for static content (images, css, js, etc)... but WP_PLUGIN_URL has to be set so things like wordpress-seo work.

    The only thing that seems broken with link library is the icon on the admin page is a "?" since it's trying to connect over HTTPS to static.hostname.org, when the SSL cert is for http://www.hostname.org.

    That said, I was able to work around that just now by changing line 539 in link-library.php to:

    $pagehooktop = add_menu_page(__('Link Library General Options', 'link-library'), "Link Library", 'manage_options', LINK_LIBRARY_ADMIN_PAGE_NAME, array($this, 'on_show_page'), WP_PLUGIN_URL . '/link-library/icons/folder-beige-internet-icon.png');

    It's ugly, but it allows that icon to load. Not sure what else might be broken, but the only thing obvious is the admin menu icon.

  6. Yannick Lefebvre
    Plugin Author

    Posted 5 years ago #

    Upgrade to version 4.6.7, which will be available soon, and it should resolve the path issues that you were seeing.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Link Library
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic