Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • simmidhaliwal
    Participant

    @simmidhaliwal

    Sorry for not listening to the rules! Here is a better version of my previous post –
    I am using WordPress 5.3 and I am actually using a theme called BuddyBoss to implement Buddyboss but that shouldn’t matter for my question.

    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 );
Viewing 1 replies (of 1 total)
Skip to toolbar