where( 'post_id', $post_id ) ->where( 'taxonomy', $taxonomy ) ->find_one(); if ( $auto_create && ! $indexable ) { $indexable = Yoast_Model::of_type( 'Primary_Term' )->create(); } return $indexable; } /** * Enhances the save method. * * @return boolean True on succes. */ public function save() { if ( ! $this->created_at ) { $this->created_at = gmdate( 'Y-m-d H:i:s' ); } if ( $this->updated_at ) { $this->updated_at = gmdate( 'Y-m-d H:i:s' ); } return parent::save(); } }