From 75d9516da0926662b37333ed7809a9039967285c Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Mon, 11 Mar 2024 14:52:24 +0100 Subject: [PATCH] Define permissions with label and description Fixes "User deprecated function: Permission 'access Twingle API' should be declared with 'label' and 'description' keys." deprecation warnings --- twingle.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twingle.php b/twingle.php index 0e72d8e..062152e 100644 --- a/twingle.php +++ b/twingle.php @@ -81,7 +81,10 @@ function twingle_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_permission */ function twingle_civicrm_permission(&$permissions) { - $permissions['access Twingle API'] = 'Twingle API: Access Twingle API'; + $permissions['access Twingle API'] = [ + 'label' => E::ts('Twingle API: Access Twingle API'), + 'description' => E::ts('Allows access to the Twingle API actions.'), + ]; } /**