Stop notifications for certain categories
-
Hi,
So I have a user form where they can create draft posts in four categories. Later, our staff will look at these and on approval, publish them.
But I don’t want these low-level users receiving notifications. Since they are worded with way too much information. What function can check not only a status change, but also check for category before sending a notification?
I know something along these lines:
/* Change PublishPress notifications trigger */
/* Don't Trigger notification when trashing posts or changing to draft/pending */
add_filter('pp_notification_status_change', 'ppchangetrigger');
function ppchangetrigger($new_status) {
if (($new_status === "publish") and CATEGORY != (cat1, cat2, cat3...) {
return false;
}
return true;
}
So my “and category is…” part is obviously wrong and I’m asking you how to access a check for this. THANKS!
- The topic ‘Stop notifications for certain categories’ is closed to new replies.