Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mike_hasarms

    (@mike_hasarms)

    I think part of my problem is WP_PLUGIN_DIR in a Windows development environment can contain backslashes, while __FILE__ does not.

    This code is in class-Plugin.php

    elseif ( stripos( __FILE__, WP_PLUGIN_DIR ) !== false ) {
    			// This is a plugin
    			$this->folder = rtrim( basename( dirname( __FILE__ ) ), '/' );
    			$this->type = 'plugin';
    			$this->dir = trailingslashit( WP_PLUGIN_DIR ) . $this->folder;
    			$this->url = plugins_url( $this->folder );
    		} else {
    			// WTF?
    			error_log( 'PLUGIN/THEME ERROR: Cannot find ' . WP_PLUGIN_DIR . ' or "themes" in ' . __FILE__ );
    		}

    In my local install stripos(__FILE__, WP_PLUGIN_DIR) will ALWAYS be false (even in wp-admin because the slashes in those two paths don’t match.

    Not sure if this affects my front end issue, but I couldn’t manage the plugin in Admin because of this.

    Same for me.
    Would be nice to have it fixed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Taxonomy Images II] Plugin template could not be found’ is closed to new replies.