-
Notifications
You must be signed in to change notification settings - Fork 1
/
your_favorites.php
43 lines (40 loc) · 1.49 KB
/
your_favorites.php
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
43
<?php
/*
Template Name: Your Favorites
*/
get_header(); ?>
<?php roots_content_before(); ?>
<div id="content" class="<?php echo CONTAINER_CLASSES; ?>">
<?php roots_main_before(); ?>
<div id="main" class="<?php echo FULLWIDTH_CLASSES; ?>" role="main">
<?php roots_loop_before(); ?>
<?php get_template_part('loop', 'artpage'); ?>
<?php roots_loop_after(); ?>
<?php
if (is_user_logged_in()) {
get_currentuserinfo();
$favs = eas_get_favorites($user_ID);
if (count($favs)) {
foreach ($favs as $f) {
echo eas_get_figure_tag($f->id, 'large');
}
} else {
echo '<p>This is where your favorite works of art from EAS will go! Just click the star (<a class="btn btn-mini">★</a>) next to any work of art on the site.</p>
<p>Here are works that EAS users are looking at right now. If any of these catch your eye... Click the star next to them and they\'ll be here next time you visit!</p>
';
echo '<div class="showfavbutton">';
$recentlyviewed = eas_recently_viewed_works(0, true);
foreach ($recentlyviewed as $a) {
eas_figure_tag($a, 'large');
}
echo '</div>';
}
} else {
eas_not_logged_in();
}
?>
</div><!-- /#main -->
<?php roots_main_after(); ?>
</div><!-- /#content -->
<?php roots_content_after(); ?>
<?php get_footer(); ?>