WordPress.org

Forums

SI CAPTCHA Anti-Spam
Bug when content directory is not "wp-content" (2 posts)

  1. Jason Judge
    Member
    Posted 4 years ago #

    I am using networked WP 3.2.1 (aka mu setup). I have the content directory set to "content" and not "wp-content" in the config. What is happening, is that the capture images are not being displayed because the URL for them starts with "wp-content" instead of just "content".

    I have narrowed it down to one line in si-capture.php, in the get_captcha_url_si() function.

    The URL is correctly set at first, until it reaches this line:

    // "MU domain mapping" plugin compatabilty
      if ( isset( $current_blog ) && !empty( $current_blog->domain ) && !empty( $current_blog->path ) )
        $url = (is_ssl() ? 'https://' : 'http://') . $current_blog->domain . $current_blog->path . ($wpmu == 1 ? MUPLUGINDIR : PLUGINDIR) . $si_dir;

    Then it gets incorrectly over-written. Commenting out this line allows it to work correctly (I'm using it with job-manager).

    Note that WP_PLUGIN_URL is correctly set, and so probably needs to be incorporated into this line, but I do not understand enough of the WP global variables to say exactly how, at least not without breaking other setups.

    http://wordpress.org/extend/plugins/si-captcha-for-wordpress/

  2. Jason Judge
    Member
    Posted 4 years ago #

    Just to add, these values are set for me:

    MUPLUGINDIR = wp-content/mu-plugins
    PLUGINDIR = wp-content/plugins
    WP_PLUGIN_URL = http://example.co.uk/content/plugins

    Note that PLUGINDIR and MUPLUGINDIR are both deprecated, and so should no longer be used (and IMO are now incorrectly set in core WP wp-settings.php).

    http://wordpress.org/support/topic/plugin-wp-page-numbers-link-to-css-files

    My workaround is to put the following in wp-config.php, and then I can use this plugin without modification:

    define( 'PLUGINDIR', 'content/plugins' );

    I don't know yet whether this will break other plugins, since we are mixing local and virtual directories here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • SI CAPTCHA Anti-Spam
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic