Advertisement
Guest User

Favorite posts wp plugin

a guest
May 22nd, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.43 KB | None | 0 0
  1. <?php
  2.     echo "<div class='wpfp-span'>";
  3.     if (!empty($user)):
  4.         if (!wpfp_is_user_favlist_public($user)):
  5.             echo "$user's Favorite Posts.";
  6.         else:
  7.             echo "$user's list is not public.";
  8.         endif;
  9.     endif;
  10.  
  11.     if ($wpfp_before):
  12.         echo "<p>".$wpfp_before."</p>";
  13.     endif;
  14.     echo "<ul>";
  15.     if ($favorite_post_ids):
  16.         $favorite_post_ids = array_reverse($favorite_post_ids);
  17. //----Table Starts----
  18.             echo "<table border=0 frame=void  cellspacing=30 width=430>";
  19.             echo "<tr>";
  20.         foreach ($favorite_post_ids as $post_id) {
  21.             $p = get_post($post_id);
  22.             echo "<td width=50 align=center >";
  23.             echo "<div class='wpfp-box'>";
  24.             echo "<div class='wpfp-thumb'>";
  25.             echo get_the_post_thumbnail ($post_id, array(200,200) );
  26.             echo "</div>";
  27.             echo "<div class='wpfp-meta'>";
  28.             echo "<div class='wpfp-title'>";
  29.             echo "<a href='".get_permalink($post_id)." ' title='". $p->post_title ."'>" . $p->post_title . "</a> ";
  30.             echo "</div>";
  31.             echo "</div>";
  32.             echo "</div>";
  33.             echo "<div class='wpfp-remove' >";
  34.             echo wpfp_remove_favorite_link($post_id);
  35.             echo "</div>";
  36.             echo "</td>";
  37.         }
  38.         echo "</tr>";
  39.         echo "</table>";
  40.     else:
  41.         echo "<li>";
  42.         echo $wpfp_options['favorites_empty'];
  43.         echo "</li>";
  44.     endif;
  45.    
  46.     echo "</ul>";
  47.     wpfp_clear_list_link();
  48.     echo "</div>";
  49.     wpfp_cookie_warning();
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement