forked from colorlabsproject/lensa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-flickr.php
33 lines (29 loc) · 1.08 KB
/
template-flickr.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
<?php
global $user_photo;
$api_key = get_option( 'colabs_api_flickr' );
$api_secret = get_option( 'colabs_secret_flickr' );
$user_id = get_option('colabs_username_flickr');
$flickr = new Colabs_WP_Flickr( $api_key, $api_secret );
$page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$user_photo = $flickr->get_user_photos( $user_id, get_option( 'colabs_piccount_flickr' ), $page );
foreach( $user_photo['photos'] as $photo ) {
$date = date(get_option('date_format'), $photo['dateuploaded'] );
echo '<li class="gallery-item" id="flickr-photo-'. $photo['id'] .'">';
echo '<a href="'. $photo['image']['o'] .'" title="'. $photo['title'] .'" rel="lightbox" data-url="'. $photo['page_url'] .'">';
echo '<img src="'. $photo['image']['m'] .'">';
echo '</a>';
echo
'<div class="like">
<p class="entry-likes">
<span>'.$photo['views'].' </span>
<i class="icon-heart"></i>
</p>
</div>
<div class="time">
<p class="entry-time">
<i class="icon-time"></i>
<span>'.$date.'</span>
</p>
</div>';
echo '</li>';
}