Group admin joined time showing as the UNIX epoch
-
For some reason, many (most?) of the group creators in my installation have date_joined = the unix epoch. Needless to say it is not the case that they joined the group in 1970. I’m not sure what’s causing this (not happening on bp.org) but I wrote a filter that displays the group creation time if the date_joined is the unix epoch.
function cac_fix_admin_group_join_since( $joined ) {
global $members_template, $groups_template;
if ( $members_template->member->date_modified == '1969-12-31 19:00:00' )
return bp_core_get_last_activity( $groups_template->group->date_created, __( 'joined %s ago', 'buddypress') );
else
return $joined;
}
add_filter( 'bp_get_group_member_joined_since', 'cac_fix_admin_group_join_since' );Obviously you may need to change the datestamp, as mine has been adjusted for my time zone.
- The topic ‘Group admin joined time showing as the UNIX epoch’ is closed to new replies.