-
-
Save billerickson/0bad984d476cd328158a to your computer and use it in GitHub Desktop.
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 be_purge_recent_post_cache( $new, $old, $post ) { | |
if( 'publish' == $new ) | |
delete_transient( 'recent_posts_query_results' ); | |
} | |
add_action( ‘transition_post_status’, ‘be_purge_recent_post_cache’, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment