@snowfeald,
I just fooled around with this a little. I didn’t dig into the plugin code to see how the favorites were being set. Because of this I couldn’t use a standard loop, so basically I had to write some custom PHP - didn’t use any WordPress action.
<?php
$user = isset($_REQUEST['user']) ? $_REQUEST['user'] : "";
$favorite_post_ids = wpfp_get_users_favorites($user);
if ($favorite_post_ids){
$favorite_post_ids = array_reverse($favorite_post_ids);
foreach ($favorite_post_ids as $post_id) {
?>
<a href="<?php the_permalink($post_id); ?>" title="<?php the_title_attribute($post_id); ?>"><?php echo esc_html(get_the_title($post_id));?></a>
<?php $the_content = apply_filters('the_content', get_the_content($post_id);?>
<p><?php echo $the_content; ?> </p>
<?php
}
}
?>
So this checks for the user id. If it exists it uses the function wpfp_get_users_favorites()
from the plugin to get an array of the post ids. Then it runs through each, outputing the title as a link, followed by the content. You can change this up how you would like it displayed. This also doesn’t take into account the number of posts to show that the plugin defines.
I guess to do this more correctly I would have to look at what the wpfp_get_users_favorites()
does and how the favorites are stored. Then I could use a proper loop. I guess I would also use wpfp_get_options()
to get the limit.
Anyway, this is a good starting point. If you want to try to alter this more to your liking I can help.
Bob