WordPress.org

Support

Support » Plugins and Hacks » File Un-Attach » [Plugin: File Un-Attach] redundant reference and compat fix

[Plugin: File Un-Attach] redundant reference and compat fix

  • See please comment in code.

    file-unattach.php li ~95

    function load_dependencies(){
    		if(is_admin() && !class_exists('FunAdmin'))
    			require_once(dirname(__FILE__).'/admin.php');
    		//[alx359] When image-store not installed, this #include produces multiple redundant calls
    		//to pre_get_images/db via pre_get_posts hook, and incompatibility with cleaner-gallery WP::get_children()
    		//elseif(!class_exists('ImStoreFront'))
    			//require_once(dirname(__FILE__).'/front.php');
    	}

    Would suggest a check for !empty constant or global specific to image-store, before #include of front.php.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hax

    @hax

    ignore

    Plugin Author Hax

    @hax

    actually it should be checking for the “FunFront” class, not the ImStoreFront, I but I will fix this on the next release thank you

    Thank to you for this very useful and straightforward plugin! Much appreciated.

    AFAIU, one needs FunFront only if image-store is installed, and it shouldn’t be included other ways. One would need to check something like tnis:

    elseif(defined('MY_IMAGESTORE_CONSTANT') && !class_exists('FunFront'))
        require_once(dirname(__FILE__).'/front.php');

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: File Un-Attach] redundant reference and compat fix’ is closed to new replies.
Skip to toolbar