Example #1
0
 function load()
 {
     if (isset($_REQUEST[$this->action])) {
         if ($_REQUEST[$this->action] == 'add') {
             $this->add_favorite();
         } else {
             if ($_REQUEST[$this->action] == 'remove') {
                 $this->remove_favorite();
             } else {
                 if ($_REQUEST[$this->action] == 'clear') {
                     if ($this->clear_favorites()) {
                         wpfp_die_or_go(wpfp_get_option('cleared'));
                     } else {
                         wpfp_die_or_go("ERROR");
                     }
                 }
             }
         }
     }
 }
$wpfp_before = "";
echo "<div class='wpfp-span'>";
if (!empty($user)) {
    if (wpfp_is_user_favlist_public($user)) {
        $wpfp_before = "{$user}'s Favorite Posts.";
    } else {
        $wpfp_before = "{$user}'s list is not public.";
    }
}
if ($wpfp_before) {
    echo '<div class="wpfp-page-before">' . $wpfp_before . '</div>';
}
if ($favorite_post_ids) {
    $favorite_post_ids = array_reverse($favorite_post_ids);
    $post_per_page = wpfp_get_option("post_per_page");
    $page = intval(get_query_var('paged'));
    $qry = array('post__in' => $favorite_post_ids, 'posts_per_page' => $post_per_page, 'orderby' => 'post__in', 'paged' => $page);
    // custom post type support can easily be added with a line of code like below.
    // $qry['post_type'] = array('post','page');
    query_posts($qry);
    echo "<ul>";
    while (have_posts()) {
        the_post();
        echo "<li><a href='" . get_permalink() . "' title='" . get_the_title() . "'>" . get_the_title() . "</a> ";
        wpfp_remove_favorite_link(get_the_ID());
        echo "</li>";
    }
    echo "</ul>";
    echo '<div class="navigation">';
    if (function_exists('wp_pagenavi')) {
function wpfp_cookie_warning()
{
    if (!is_user_logged_in() && !isset($_GET['user'])) {
        echo "<p>" . wpfp_get_option('cookie_warning') . "</p>";
    }
}
Example #4
0
        echo $url;
    }
    ?>
&description=<?php 
    echo get_the_title($post->ID);
    ?>
" class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a></li>
				</ul>

				<div class="cleaner">&nbsp;</div>
 
			</div>

			<?php 
    if (function_exists('wpfp_link') && function_exists('wpfp_get_option')) {
        $showbkmkbtn = function_exists('wpfp_link') && function_exists('wpfp_get_option') ? wpfp_get_option('opt_only_registered') ? is_user_logged_in() : true : false;
        if ($showbkmkbtn) {
            wpfp_link();
        }
    }
    ?>
 		</div><?php 
}
?>

	<?php 
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar')) {
}
?>

</div><!-- / #sidebar -->