post_type ) { self::flush(); } } /** * KB / category assignments. * * @param int $object_id Object. * @param array $terms Terms. * @param array $tt_ids Term taxonomy ids. * @param string $taxonomy Taxonomy. */ public function on_set_terms( $object_id, $terms, $tt_ids, $taxonomy ) { if ( in_array( $taxonomy, array( Taxonomies::KB, Taxonomies::CATEGORY ), true ) ) { self::flush(); } } /** * Term meta (order, icon, color, KB assignment). * * @param int|array $meta_id Meta id(s). * @param int $object_id Term. * @param string $meta_key Key. */ public function on_term_meta( $meta_id, $object_id, $meta_key ) { if ( 0 === strpos( (string) $meta_key, 'kdocs_' ) ) { self::flush(); } } /** * Post meta that changes how articles are listed (not views / votes). * * @param int|array $meta_id Meta id(s). * @param int $object_id Post. * @param string $meta_key Key. */ public function on_post_meta( $meta_id, $object_id, $meta_key ) { if ( in_array( $meta_key, self::POST_META, true ) ) { self::flush(); } } }