Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Plugin Name: Swift Performance Tweaks
- */
- add_action('swift_performance_cache_init', function(){
- remove_action('save_post', array('Swift_Performance_Cache', 'clear_post_cache'));
- remove_action('delete_post', array('Swift_Performance_Cache', 'clear_post_cache'));
- remove_action('wp_trash_post', array('Swift_Performance_Cache', 'clear_post_cache'));
- remove_action('pre_post_update', array('Swift_Performance_Cache', 'clear_post_cache'));
- remove_action('delete_attachment', array('Swift_Performance_Cache', 'clear_post_cache'));
- remove_action('woocommerce_product_object_updated_props', array('Swift_Performance_Cache', 'clear_post_cache'));
- remove_action('woocommerce_product_set_stock', array('Swift_Performance_Cache', 'clear_post_cache'));
- remove_action('woocommerce_variation_set_stock', array('Swift_Performance_Cache', 'clear_post_cache'));
- remove_action('fl_builder_after_save_layout', array('Swift_Performance_Cache', 'clear_post_cache'));
- // Clear pagecache after publish/update post
- remove_action('save_post', array('Swift_Performance_Cache', 'clear_cache_after_post'));
- remove_action('delete_post', array('Swift_Performance_Cache', 'clear_cache_after_post'));
- remove_action('wp_trash_post', array('Swift_Performance_Cache', 'clear_cache_after_post'));
- remove_action('delete_attachment', array('Swift_Performance_Cache', 'clear_cache_after_post'));
- remove_action('woocommerce_product_object_updated_props', array('Swift_Performance_Cache', 'clear_cache_after_post'));
- remove_action('woocommerce_product_set_stock', array('Swift_Performance_Cache', 'clear_cache_after_post'));
- remove_action('woocommerce_variation_set_stock', array('Swift_Performance_Cache', 'clear_cache_after_post'));
- remove_action('fl_builder_after_save_layout', array('Swift_Performance_Cache', 'clear_cache_after_post'));
- remove_action('init', array('Swift_Performance_Cache', 'clear_on_user_action'));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement