Skip to content
Permalink
Browse files

add specific actions to metadata and filters order change #261

  • Loading branch information
leogermani committed Sep 27, 2019
1 parent 08838e2 commit 341cb5fcbccb356e7879da0d9ec9aeb84ce4e123
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/classes/repositories/class-tainacan-logs.php
@@ -501,7 +501,15 @@ public function insert_entity( Entities\Entity $entity ) {
$collection_id = $entity->get_id();
if ($this->current_action == 'update') {
$log->set_title( sprintf( __( 'Collection "%s" was updated', 'tainacan'), $entity->get_name() ) );
if (isset($diff['new']['metadata_order'])) {
$log->set_title( sprintf( __( 'Collection "%s" metadata order was updated', 'tainacan'), $entity->get_name() ) );
$log->set_action('update-metadata-order');
} elseif (isset($diff['new']['filters_order'])) {
$log->set_title( sprintf( __( 'Collection "%s" filters order was updated', 'tainacan'), $entity->get_name() ) );
$log->set_action('update-filters-order');
} else {
$log->set_title( sprintf( __( 'Collection "%s" was updated', 'tainacan'), $entity->get_name() ) );
}
} elseif ($this->current_action == 'create') {
$log->set_title( sprintf( __( 'Collection "%s" was created', 'tainacan'), $entity->get_name() ) );
}

0 comments on commit 341cb5f

Please sign in to comment.
You can’t perform that action at this time.