Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Adding xprofile fields to activity header

@karmatiger

Participant

dan that was extremely helpful 🙂 I’m so close now…

I’m using

function text_pre_timestamp() {
  $link = '';
  if ( bp_activity_user_can_delete() ) {
	  $url   = bp_get_activity_delete_url();
	  $link = '<a href="' . $url . '" class="activity-list delete">' . __( 'Delete', 'buddypress' ) . '</a>';
	  $test = 'sample text ';
  }
  
  $var = ' %s ago ';// %s = timestamp
  if (!$link == '') $var = $var . '| ' . $test . $link; 
  return $var;

}
add_filter( 'bp_core_time_since_ago_text', 'text_pre_timestamp' );

and it works! Well… for some reason it’s putting the Delete link on a separate line, and I can’t figure out why. As you can see I’ve included test text, which it includes on the same line as the timestamp. If I put $link before the timestamp it displays inline; but if I put it after the timestamp it puts the href one line down. Is this a Buddypress thing?

The CSS used:

.activity-list .delete {
  display: inline; 
  font-size:10px; 
  padding: 0; 
  margin: 0;
}

You can see by the display: inline I’m attempting to get the href to be on the same line as the rest of the text. have you any thoughts as to why it’s inserting a line break?

Skip to toolbar