pass old value to log
This commit is contained in:
parent
da20e797f6
commit
1575aab7ae
|
@ -76,6 +76,8 @@ abstract class Repository {
|
||||||
// TODO: Throw Warning saying you must validate object before insert()
|
// TODO: Throw Warning saying you must validate object before insert()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$old = $obj;
|
||||||
|
|
||||||
$map = $this->get_map();
|
$map = $this->get_map();
|
||||||
|
|
||||||
// First iterate through the native post properties
|
// 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 ) );
|
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 );
|
do_action( 'tainacan-insert-' . $obj->get_post_type(), $obj );
|
||||||
|
|
||||||
// return a brand new object
|
// return a brand new object
|
||||||
|
|
Loading…
Reference in New Issue