Created
April 18, 2017 22:23
-
-
Save cybersholt/26b82ee523c675f5a987c2aec1ba8bba to your computer and use it in GitHub Desktop.
Clear wp cache on save or update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function clear_cache_c() { | |
wp_cache_clear_cache(); | |
} | |
add_action( 'publish_post', 'clear_cache_c', 10, 2 ); | |
add_action( 'post_updated', 'clear_cache_c', 10, 3 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment