Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbp_get_time_since'

Viewing 4 results - 26 through 29 (of 29 total)
  • Author
    Search Results
  • #119989

    Search for: ‘function bbp_get_time_since(‘

    #112253
    highexistence
    Participant

    Anyone else interested, place this in your functions.php file:

    function bbp_get_reply_last_active_time( $reply_id ) {

    $last_active = get_post_field( 'post_date', $reply_id );

    $last_active = !empty( $last_active ) ? bbp_get_time_since( bbp_convert_date( $last_active ) ) . ' ago' : '';

    return $last_active;

    }

    and then call it in loop-single-reply.php

    #108109
    ebharding
    Participant

    This was my solution

    I edited line 178 in my /wp-content/plugins/bbpress/bbp-includes/bbp-common-functions.php

    function bbp_get_time_since( $time ) {

    return apply_filters( ‘bbp_get_time_since’, human_time_diff( $time – 25200, current_time( ‘timestamp’ ) ), $time );

    }

    In my case (Pacific Time) I needed to subtract 7 hours which translated to 25200 seconds.

    #95271

    @miruru – You could filter

    bbp_get_topic_last_active

    and output your own time, or you could hook into

    bbp_get_time_since

    and have it return the second parameter that’s passed to it.

Viewing 4 results - 26 through 29 (of 29 total)
Skip to toolbar