post_type == 'attachment' ) { $post_id = $post->post_parent; $post = get_post( $post_id ); } if ( !Util_Environment::is_flushable_post( $post, 'posts', Dispatcher::config() ) ) return; $cacheflush = Dispatcher::component( 'CacheFlush' ); $cacheflush->flush_post( $post_id ); } /** * Change action */ function on_change() { $cacheFlush = Dispatcher::component( 'CacheFlush' ); $cacheFlush->flush_posts(); } }