From 3bb4a63a47b82398c6f42ad8a177da0c2bfb3a9a Mon Sep 17 00:00:00 2001 From: Jacson Passold Date: Mon, 27 Nov 2017 22:11:08 -0200 Subject: [PATCH] remove log call, use action --- src/classes/repositories/class-tainacan-repository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/repositories/class-tainacan-repository.php b/src/classes/repositories/class-tainacan-repository.php index 14dd21e36..7d1da2f94 100644 --- a/src/classes/repositories/class-tainacan-repository.php +++ b/src/classes/repositories/class-tainacan-repository.php @@ -88,8 +88,8 @@ abstract class Repository { } } - //not log the log - if($this->entities_type != '\Tainacan\Entities\Log') Entities\Log::create($this->log_message, $this->log_description, $obj); + do_action('tainacan-insert', $obj); + do_action('tainacan-insert-'.$obj->get_post_type(), $obj); // return a brand new object return new $this->entities_type($obj->WP_Post);