Custom styling for automatic messages – SO CLOSE!
-
So I created a custom function where any time a user gets a tag, they automatically receive a private message. I would like to make these messages stand out a little from the other messages in a users inbox/thread by adding special styling. Would it be possible to put a border around this message? Below is the code I am using:
Thank you! Simmi
function send_message_to_student_113( $user_id, $tags_applied ) {
$tag_id = wp_fusion()->user->get_tag_id( ‘course tag 1.1.1’ );
if ( in_array( $tag_id, $tags_applied ) ) {
$args = array(
‘sender_id’ => 1,
‘thread_id’ => false,
‘recipients’ => $user_id,
‘subject’ => ‘Hello there’,
‘content’ => ‘You got a new tag! Congratulations. Please let me know if you need any help!’,
‘date_sent’ => bp_core_current_time()
);$result = messages_new_message( $args );
}
}
add_action( ‘wpf_tags_applied’, ‘send_message_to_student_113’, 10, 2 );
- You must be logged in to reply to this topic.