• Hi Scott,

    I noticed in your code (several times so why not once and make it global??)

    // Pre-2.6 compatibility
    	if ( !defined('WP_CONTENT_DIR') ) {
    		define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
    		}
    	// Guess the location
    	$wpsf_plugin_path = WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__));

    Would it not be wiser to do something like

    // Pre-2.6 compatibility
    	if ( !defined('WP_CONTENT_DIR') )
    		define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
    	if ( ! defined( 'WP_PLUGIN_DIR' ) )
    		define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
    	// Know the location
    	$wpsf_plugin_path = WP_PLUGIN_DIR.'/'.plugin_basename(dirname(__FILE__));

    http://wordpress.org/extend/plugins/wp-spamfree/

Viewing 1 replies (of 1 total)
  • Maybe this accounts for why nobody can post comments unless they’re logged in when I “network activate” that plugin?

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP-SpamFree Anti-Spam] plugin dir hardcoded. why?’ is closed to new replies.