/** * Internal update comment function * Called to re-index a comment * * @param string Comment ID * @param object Comment * @param array Search Unleashed options * @return void **/ function update_comment($comment_ID, $comment, $options) { include_once dirname(__FILE__) . '/models/spider.php'; include_once dirname(__FILE__) . '/models/search-engine.php'; $spider = new SearchSpider($options); $engine = SearchEngine::get_engine($options, $options['search_engine']); $this->disable_filters($options['disabled_filters']); $engine->remove($comment_ID, 'comment'); if (!empty($comment) && $spider->is_allowed(get_post($comment->comment_post_ID))) { $engine->store($comment->comment_post_ID, $spider->gather_for_comment($comment), $comment); } $engine->flush(); }