1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php bp_displayed_user_id();  ?>

<div class="profile-box items-following">

<h3><?php _e('fav posts', 'bd_lang'); ?></h3>

<div class="profile-content">

<?php $favorite_post_ids = wpfp_get_users_favorites($user_id);
if($favorite_post_ids) { ?>

<?php foreach ($favorite_post_ids as $o) : $p = get_post($o); if ($p->post_status == 'publish') { ?>	

<div class="profile-item">

<!--Begin Image-->
<?php if(has_post_thumbnail($o)) { ?>
<div class="post-thumbnail">
<a href="<?php get_permalink($o); ?>" title="<?php echo $p->post_title; ?>">
<?php $image = bd_resize(get_post_thumbnail_id($o), '', 50, 0, true); ?>
<img src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" alt="<?php if(get_post_meta(get_post_thumbnail_id($o), '_wp_attachment_image_alt', true)) { echo get_post_meta(get_post_thumbnail_id($o), '_wp_attachment_image_alt', true); } else { echo $p->post_title; } ?>" />
</a>
</div>
<?php } ?>
<!--End Image-->
<a href="<?php echo get_permalink($o); ?>" title="<?php echo $p->post_title; ?>"><?php echo $p->post_title; ?></a>

</div>

<?php } endforeach; ?>

<?php } else { ?>
<div class="profile-item">
<strong><?php _e('No posts have been added yet.', 'bd_lang'); ?></strong>
</div>
<?php } ?>

</div>

</div>

<?php } ?>