Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Plugin Name: Cloudways Varnish Purge Helper
- * Plugin Description: Cloudways Varnish Purge Helper for Swift Performance
- */
- add_action('swift_performance_before_purge_varnish', function($url, $wildcard){
- remove_all_filters('swift_performance_purge_varnish_method');
- add_filter('swift_performance_purge_varnish_method', function() use($wildcard){
- return $wildcard ? 'PURGE' : 'URLPURGE';
- });
- },10,2);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement