diff --git a/src/classes/entities/class-tainacan-log.php b/src/classes/entities/class-tainacan-log.php index e8dfca90d..2eababbb6 100644 --- a/src/classes/entities/class-tainacan-log.php +++ b/src/classes/entities/class-tainacan-log.php @@ -283,4 +283,20 @@ class Log extends Entity { return $repository->approve( $this ); } + + /** + * + * {@inheritDoc} + * @see \Tainacan\Entities\Entity::diff() + */ + public function diff($which = 0) + { + $log = $this; + if($which != 0) { + $log = new self($which); + } + $value = $log->get_value(); + $old = $log->get_old_value(); + return $value->diff($old); + } } \ No newline at end of file