Skip to:
Content
Pages
Categories
Search
Top
Bottom

Private Message – Change Time Format


  • jcfromkc
    Participant

    @jcfromkc

    Using bp_message_thread_last_post_date. Does anyone know how to create a filter to change the time format from October 16, 2020 at 4:01 pm to Oct 16?

    I ran across this article but can’t make heads or tails of it.

    https://stackoverflow.com/questions/45837606/how-do-i-customise-the-last-reply-timestamp-in-messages-in-buddypress

    add_filter( 'bp_message_thread_last_post_date', 'fluffyKittenDate', 10, 1 );
    
    function fluffyKittenDate($oldformat) {
       // reformat date contained in oldformat here and return the new value
     }

    I’m not sure what to place as the new function and if I need to change $oldformat to something else.

    Thx

  • You must be logged in to reply to this topic.
Skip to toolbar