<?php
$wo['activity']['type_text'] = '';
$wo['activity']['icon']      = '';
$post_publisher              = '<a class="second-user-color" href="' . $wo['activity']['postData']['publisher']['url'] . '">' . $wo['activity']['postData']['publisher']['name'] . '</a>';
$orginal_txt                 = array(
    "{user}",
    "{post}"
);
$replaced_txt                = array(
    $post_publisher,
    $wo['activity']['postData']['url']
);
if (!empty($wo['activity']['activity_type'])) {
    if ($wo['activity']['activity_type'] == 'liked_post') {
        $wo['activity']['type_text'] = str_replace($orginal_txt, $replaced_txt, $wo['lang']['activity_liked_post']);
        $wo['activity']['icon'] .= 'thumbs-up';
    }
    if ($wo['activity']['activity_type'] == 'wondered_post') {
        $lang_type = ($wo['config']['second_post_button'] == 'wonder') ? $wo['lang']['activity_wondered_post'] : $wo['lang']['activity_disliked_post'];
        $wo['activity']['type_text'] = str_replace($orginal_txt, $replaced_txt, $lang_type);
        $wo['activity']['icon'] .= $wo['second_post_button_icon'];
    }
    if ($wo['activity']['activity_type'] == 'shared_post') {
        $wo['activity']['type_text'] = str_replace($orginal_txt, $replaced_txt, $wo['lang']['activity_share_post']);
        $wo['activity']['icon'] .= 'share';
    }
    if ($wo['activity']['activity_type'] == 'commented_post') {
        $wo['activity']['type_text'] = str_replace($orginal_txt, $replaced_txt, $wo['lang']['activity_commented_on_post']);
        $wo['activity']['icon'] .= 'comment';
    }
}
?>
<div class="activity <?php echo (!empty($wo['activity']['unread'])) ? ' unread' : '' ;?>" data-activity-id="<?php echo $wo['activity']['id']; ?>">
   <div class="notification-list">
      <div class="notification-user-avatar <?php echo Wo_RightToLeft('pull-left');?>">
         <a href="<?php echo $wo['activity']['activator']['url']; ?>" title="#"><img src="<?php echo $wo['activity']['activator']['avatar']; ?>" alt="<?php echo $wo['user']['avatar']; ?>Profile picture"></a>
      </div>
      <div class="notification-text">
         <span class="user-popover" data-id="<?php echo $wo['activity']['activator']['id'];?>" data-type="<?php echo $wo['activity']['activator']['type'];?>">
         <a class="main-color" href="<?php echo $wo['activity']['activator']['url'];?> ">
         <?php echo $wo['activity']['activator']['name']; ?>
         </a>
         </span>
         <?php echo $wo['activity']['type_text']; ?>
         <div class="notification-time active">
            <i class="fa fa-<?php echo $wo['activity']['icon'];?> active"></i>
            <span class="ajax-time" title="<?php echo date('c',$wo['activity']['time']); ?>">
            <?php echo Wo_Time_Elapsed_String($wo['activity']['time'])?>
            </span>
         </div>
      </div>
      <div class="clear"></div>
   </div>
</div>