Skip to content

Commit

Permalink
Add First Name and Last Name Notification Shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
rizaardiyanto1412 authored Dec 14, 2023
1 parent ec3db11 commit a1defbd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Notifications/Shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ protected function get_actor()
* - login
* - url
* - display_name
* - first_name
* - last_name
* - email
* - separator
*
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a1defbd

Please sign in to comment.