/** * A callback called whenever a post is edited or commented on * @param int $postId The id of the post/page */ public function editCallback($postId) { WPSearch_Log::add('debug', "Edit post callback executed for post #{$postId}"); if (self::$_addPostHookRan) { return; } WPSearch_Search::instance()->addToIndex($postId); self::$_editPostHookRan = TRUE; }