Created
November 20, 2017 13:42
-
-
Save wpbullet/65490743b3d2540b8f0beac120424f0d 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
/** | |
* Exclude certain post types from nginx cache cleanup by Till Kruss | |
* | |
*/ | |
function nginx_cache_excluded_custom_post_types( $post_types ) { | |
$post_types[] = 'shop_order'; | |
$post_types[] = 'shop_order_refund'; | |
$post_types[] = 'shop_subscription'; | |
$post_types[] = 'ticket'; | |
$post_types[] = 'ticket_reply'; | |
$post_types[] = 'ticket_history'; | |
$post_types[] = 'ticket_log'; | |
return $post_types; | |
} | |
add_filter( 'nginx_cache_excluded_post_types' , 'nginx_cache_excluded_custom_post_types' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment