• Resolved Galfom

    (@galfom)


    First off I do have a multisite network with some twenty sites but those are all clubs and family & friends stuff and zero business so the price range of pro is way out of question (tbh I probably wouldn’t even pay 20 bucks/year for all sites combined and my limit would probably be 20 bucks/lifetime since it is only volunteering and even there I’m not sure ??).

    Anyways, in return I don’t mind some hassle and usually stick to doing things with just some custom code and/or workarounds. However the ugliest of those workarounds currently is a WP admin backend hook that just disables the cache management buttons since those always clear the whole cache folder. Obviously hooking into the plugin would enable nicer workarounds but would not be as update-stable (though the JS approach isn’t as well ??).

    So having at least site id based cache folders even in the free version would be nice. I can understand if this contradicts your monetization strategy but since I assume most WP installation are private and not business related even/especially the multi sites (since I would get gray hair if would need to install a new WP instance for every friend asking to host something just to not care about it 4 weeks later and there are probably a lot people like me out there) I thought I mention it. Feel free to ignore it or not ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi!

    You’re right! The free version of OMGF doesn’t support Multisite, but I’ll give you a code snippet to make it work, as long as you promise you won’t tell anyone: ??

    Put this code in your theme’s functions.php or in a custom plugin:

    add_filter( 'omgf_upload_dir', [ $this, 'rewrite_upload_dir' ] );
    add_filter( 'omgf_upload_url', [ $this, 'rewrite_upload_url' ] );
    
    function rewrite_upload_dir() {
    	return wp_upload_dir()['basedir'] . '/omgf';
    }
    
    public function rewrite_upload_url() {
          	return wp_upload_dir()['baseurl'] . '/omgf';
    }
    

    This code is fully update proof.

    Enjoy!

    Thread Starter Galfom

    (@galfom)

    ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multisite Cache Handling’ is closed to new replies.