Skip to content

Commit

Permalink
Updated delete function to check enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
kepol committed Mar 7, 2024
1 parent 56e3089 commit 5313cab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quant.module
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@ function _quant_unpublish_entity(EntityInterface $entity) {
* Implements hook_entity_translation_delete().
*/
function quant_entity_translation_delete($entity) {
$quant_enabled = \Drupal::config('quant.settings')->get('quant_enabled');

if (!$quant_enabled) {
return;
}

_quant_unpublish_entity($entity);

Expand Down

0 comments on commit 5313cab

Please sign in to comment.