Rename to scan_images()

Rename for more meaningful
This commit is contained in:
danpros 2024-03-03 18:33:33 +07:00
commit 8d58741b88
2 changed files with 9 additions and 8 deletions

View file

@ -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>';