Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How can I disable the "last active" time?

  • @marriagebroker

    Participant

    I would like to disable whatever causes the last active time-stamp (example: active 3 hours, 52 minutes ago) to appear at the Members profile image. How can I make the time information not appear?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @bitpath

    Participant

    I’m also searching for how to do this here and in the member listing. It seems like it might be a privacy issue for many, having their last activities stamped front and center. I could hide it with CSS but prefer to really suppress this type of display and give users the choice to display a “tag line” of their choosing instead, if possible.

    @danbp

    Participant

    @marriagebroker, @bitpath

    Here 2 snippets you can use (one or both depending your needs).
    Add them to your child-theme functions.php or to bp-custom.php

    
    /* remove "not recently active" */
    function bpfr_core_get_last_activity( $last_activity_date, $string ) {
    		if ( empty( $last_activity_date ) )
    				// we do nothing
    				$last_active = '';
    			else
    				$last_active = sprintf( $string, bp_core_time_since( $last_activity_date ) );
    		}
    add_filter( 'bp_core_get_last_activity', 'bpfr_core_get_last_activity' );
    
    /* remove whole recently active filter */
    function bpfr_remove_last_activity_filter() {
        remove_filter( 'bp_core_get_last_activity', $last_active, $last_activity_date, $string );
    }
    add_filter( 'bp_core_get_last_activity', 'bpfr_remove_last_activity_filter' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] How can I disable the "last active" time?’ is closed to new replies.
Skip to toolbar