flush(); return $v; } /** * Purges post from varnish * * @param integer $post_id Post ID. * @param boolean $force Force flag (optional). * * @return mixed */ public function varnish_flush_post( $post_id, $force = false ) { $varnishflush = Dispatcher::component( 'Varnish_Flush' ); $v = $varnishflush->flush_post( $post_id, $force ); return $v; } /** * Purges post from varnish * * @param string $url * @return mixed */ public function varnish_flush_url( $url ) { $varnishflush = Dispatcher::component( 'Varnish_Flush' ); $v = $varnishflush->flush_url( $url ); return $v; } public function w3tc_admin_bar_menu( $menu_items ) { $menu_items['20610.varnish'] = array( 'id' => 'w3tc_flush_varnish', 'parent' => 'w3tc_flush', 'title' => __( 'Reverse Proxy', 'w3-total-cache' ), 'href' => wp_nonce_url( admin_url( 'admin.php?page=w3tc_dashboard&w3tc_flush_varnish' ), 'w3tc' ) ); return $menu_items; } }