pass old value to log

This commit is contained in:
Jacson Passold 2018-04-05 14:45:30 -03:00
parent da20e797f6
commit 1575aab7ae
1 changed files with 3 additions and 1 deletions

View File

@ -76,6 +76,8 @@ abstract class Repository {
// TODO: Throw Warning saying you must validate object before insert()
}
$old = $obj;
$map = $this->get_map();
// First iterate through the native post properties
@ -110,7 +112,7 @@ abstract class Repository {
set_post_thumbnail( $obj->WP_Post, $obj->get_featured_img_id( $obj->WP_Post->ID ) );
}
do_action( 'tainacan-insert', $obj );
do_action( 'tainacan-insert', $obj, $old );
do_action( 'tainacan-insert-' . $obj->get_post_type(), $obj );
// return a brand new object