Support » Plugin: Varnish HTTP Purge » Just works

  • I tried other varnish plugins before this, but they didn’t work. this one worked right off the bat! Great work 🙂

    I ended up adding my own function + filter into the code in order to have the purge right now button in my admin bar. Easy:

    In init:
    add_action('admin_bar_menu', array($this, 'varnish_right_now_admin_bar_link'), 100);

    Within the class

    function varnish_right_now_admin_bar_link($admin_bar){
            $admin_bar->add_menu( array(
                'id'    => 'purge-varnish-cache-all',
                'title' => 'Purge Varnish',
                'href'  => wp_nonce_url(admin_url('?vhp_flush_all'), 'varnish-http-purge'),
                'meta'  => array(
                    'title' => __('Purge your varnish cache'),

Viewing 5 replies - 1 through 5 (of 5 total)
  • Are you looking at my dev code? Actually the reason I’m holding off on it is because I’m trying to suss out a sane way to handle that flush on multisite subfolders (right now, if the main site flushes, it’ll flush ALL sites on a subfodler network, which is bad….)

    I didn’t look at the dev code, it was from the one I downloaded from

    I noticed that there was a commented out admin_bar hook after I added in my function.

    Should that be uncommented in the version downloaded from

    I was making a joke 🙂 No, don’t use the commented out thing, it’s not working right since I’m trying to get some multisite-ability in with it too. Yours is perfect.

    I should say, when version 3.4 comes out (hopefully this week!) it’ll have an admin bar button that will actually work no mater what page you’re on, without redirecting you to the dashboard.

    Also it’ll be a little more robust (aka functional) for Multisite.

    Awesome 🙂 Looking forward to more of the great work you’re doing

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Just works’ is closed to new replies.