From ec3db11dc774fb9b495d99ecb85630bdf9287194 Mon Sep 17 00:00:00 2001 From: Riza Maulana Ardiyanto <83811723+rizaardiyanto1412@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:53:04 +0700 Subject: [PATCH 1/2] Add First Name and Last Name Notification Shortcode --- modules/improved-notifications/improved-notifications.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/improved-notifications/improved-notifications.php b/modules/improved-notifications/improved-notifications.php index a72df55e..4f202c4c 100644 --- a/modules/improved-notifications/improved-notifications.php +++ b/modules/improved-notifications/improved-notifications.php @@ -903,6 +903,8 @@ private function getShortcodeActorFields() 'login', 'url', 'display_name', + 'first_name', + 'last_name', 'email', ] ); From a1defbd01de4676f443c47d466be258dd27a48ae Mon Sep 17 00:00:00 2001 From: Riza Maulana Ardiyanto <83811723+rizaardiyanto1412@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:54:10 +0700 Subject: [PATCH 2/2] Add First Name and Last Name Notification Shortcode --- lib/Notifications/Shortcodes.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Notifications/Shortcodes.php b/lib/Notifications/Shortcodes.php index 189abb59..6560569b 100644 --- a/lib/Notifications/Shortcodes.php +++ b/lib/Notifications/Shortcodes.php @@ -117,6 +117,8 @@ protected function get_actor() * - login * - url * - display_name + * - first_name + * - last_name * - email * - separator * @@ -185,6 +187,14 @@ private function get_user_field($user, $field, $attrs) $result = $user->display_name; break; + case 'first_name': + $result = $user->first_name; + break; + + case 'last_name': + $result = $user->last_name; + break; + case 'email': $result = $user->user_email; break;