Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2ddc02cb
authored
2016-01-07 12:37:43 -0500
by
Insu Mun
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add a course note listing shortcode for notification.
1 parent
f0aa165b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
com/Notifications/Notifications.php
com/Notifications/Notifications.php
View file @
2ddc02c
...
...
@@ -424,7 +424,8 @@ function send_triggered_notification($uid = 0, $trigger = 'NO_TRIGGER', $args =
'preferred_language'
,
'email_address_preference'
,
'preferred_email'
,
'member_id'
'member_id'
,
'course_note_listing'
];
$user_data
=
array_flip
(
$user_data
);
...
...
@@ -432,9 +433,15 @@ function send_triggered_notification($uid = 0, $trigger = 'NO_TRIGGER', $args =
foreach
(
$user_data
as
$field
=>
$value
)
{
$user_data
[
$field
]
=
User\clean_string
(
get_user_meta
(
$uid
,
$field
,
true
));
// Choose user's preferred email address
if
(
$field
==
'preferred_email'
)
{
$user_data
[
'preferred_email'
]
=
$user_data
[
'email_address_preference'
]
==
'Home'
?
$user_data
[
'home_email'
]
:
$user_data
[
'work_email'
];
}
// Set course note listing page
if
(
$field
==
'course_note_listing'
&&
empty
(
$args
[
'course_note_listing'
]))
{
$user_data
[
'course_note_listing'
]
=
'<a href="'
.
get_bloginfo
(
'url'
)
.
CBV\PAGE_COURSENOTES
.
'">Course Note Listing page</a>'
;
}
}
foreach
(
$user_data
as
$key
=>
$val
)
{
...
...
Please
register
or
sign in
to post a comment