public function save_post($post) { $post_id = $post->ID; $saved = false; if (!empty($post_id)) { $refs_for_taxonomies = $this->index->refsForTaxonomiesOfPost($post); foreach ($refs_for_taxonomies as $taxonomy => $ref) { $saved = $this->save_item(array('item_id' => $post->ID, 'taxonomy' => $taxonomy), $ref) || $saved; } } return $saved; }