* Good luck
*/
-function tp_get_latest_photos($num_images, $owner_guid = 0) {
- $prev_context = set_context('front');
+function tp_get_latest_photos($num_images, $owner_guid = 0, $context = 'front') {
+ $prev_context = set_context($context);
$image_html = tp_list_entities('object', 'image', $owner_guid, null, $num_images, false, false, false);
set_context($prev_context);
return $image_html;
* front page view
*
****************************************************************/
-} else if (get_context() == "front") {
+} else if (get_context() == "front" || get_context() == "widget") {
// the front page view is a clickable thumbnail of the image
?>
<a href="<?php echo $image->getURL(); ?>">
}
echo '<div class="tidypics_widget_latest">';
-echo tp_get_latest_photos($number, page_owner());
+echo tp_get_latest_photos($number, page_owner(), 'widget');
echo '</div>';
?>