Skip to content

Commit 2b270f7

Browse files
committed
clear cache on term updates
1 parent 5be5ba9 commit 2b270f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

php/class-delivery.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ protected function setup_hooks() {
8282
add_action( 'update_option_cloudinary_media_display', array( $this, 'clear_cache' ) );
8383
add_filter( 'cloudinary_current_post_id', array( $this, 'get_current_post_id' ) );
8484
add_filter( 'the_content', array( $this, 'add_post_id' ) );
85+
86+
// Clear cache on taxonomy update.
87+
$taxonomies = get_taxonomies( array( 'show_ui' => true ) );
88+
foreach ( $taxonomies as $taxonomy ) {
89+
add_action( "saved_{$taxonomy}", array( $this, 'clear_cache' ) );
90+
}
8591
}
8692

8793
/**

0 commit comments

Comments
 (0)