PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Don't hardcode wp-content - bad things happen

  1. ptahdunbar
    Member

    Given that WordPress allows you to move the wp-content directory, you can't hardcode it's location. There are all sorts of broken issues like not being able to preview forms because of this.

    Affected constants:
    GRAVITY_MANAGER_URL, use WP_PLUGIN_URL

    Affected files:

    • downloads.php
    • preview.php
    • print-entry.php
    • select-columns.php

    If you need access to WordPress functions, or need to find dynamic paths like wp-content, I wrote some code that allows you to do this:
    https://gist.github.com/1241505

    Posted 13 years ago on Monday September 26, 2011 | Permalink
  2. Thanks for the tip Ptah.
    However, the GRAVITY_MANAGER_URL refers to the URL in our server (so we can trust on the location of the wp-content folder). I will look at the affected files and try to use your snippet.

    Posted 13 years ago on Monday September 26, 2011 | Permalink