chevereto-free/app/themes/Peafowl/snippets/image_album_slice.php

22 lines
1023 B
PHP
Raw Normal View History

2020-06-24 18:35:15 +00:00
<?php if (!defined('access') or !access) {
die('This file cannot be directly accessed.');
} ?>
<?php
$image_album_slice = G\get_global('image_album_slice') ?: (function_exists('get_image_album_slice') ? get_image_album_slice() : null);
$image_id = function_exists('get_image') ? get_image()['id'] : G\get_global("image_id");
if (is_array($image_album_slice["images"]) && count($image_album_slice["images"]) > 0) {
foreach ($image_album_slice["images"] as $album_image) {
?>
<li<?php if ($album_image["id"] == $image_id) {
echo ' class="current"';
} ?><?php if ($album_image['nsfw']) {
echo ' data-flag="unsafe"';
} ?>><a href="<?php echo $album_image["url_viewer"]; ?>"><img class="image-container" src="<?php echo $album_image["thumb"]["url"]; ?>" alt="<?php echo $album_image["name"]; ?>"></a></li>
<?php
} ?>
<li class="more-link"><a href="<?php echo $image_album_slice["url"]; ?>" title=""><?php _se('view more'); ?></a></li>
<?php
}
2016-08-18 20:39:31 +00:00
?>