mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 14:06:23 +05:30
Rename to scan_images()
Rename for more meaningful
This commit is contained in:
parent
675cf51259
commit
8d58741b88
2 changed files with 9 additions and 8 deletions
|
|
@ -1627,15 +1627,16 @@ function reorder_subpages($subpages = null)
|
|||
rebuilt_cache();
|
||||
}
|
||||
|
||||
// Return image gallery in pager.
|
||||
// Return image gallery in pager.
|
||||
function image_gallery($images, $page = 1, $perpage = 0)
|
||||
{
|
||||
if (empty($images)) {
|
||||
$images = get_gallery();
|
||||
$images = scan_images();
|
||||
}
|
||||
$pagination = has_pagination(count($images), $perpage, $page);
|
||||
$tmp = '';
|
||||
$images = array_slice($images, ($page - 1) * $perpage, $perpage);
|
||||
$pagination = has_pagination(count($images), $perpage, $page);
|
||||
$tmp .= '<div class="cover-container">';
|
||||
foreach ($images as $index => $v) {
|
||||
$tmp .= '<div class="cover-item"><img loading="lazy" class="img-thumbnail the-img" src="' . site_url() . $v['dirname'] . '/'. $v['basename'].'"></div>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue