PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
wiloke-listing-tools
/
app
/
Framework
/
Helpers
<?php namespace WilokeListingTools\Framework\Helpers; class GalleryHelper { public static function gallerySkeleton($aItems, $previewSize = 'large') { if (empty($aItems)) { return []; } $previewSize = apply_filters('wiloke-listing-tools/listing-card/gallery-size', $previewSize); $aGallery = []; foreach ($aItems as $id => $src) { $thumbnail = wp_get_attachment_image_url($id, $previewSize); $src = wp_get_attachment_image_url($id, 'full'); $aGallery[] = [ 'id' => $id, 'preview' => $thumbnail, 'src' => $src, 'full' => $src, 'fileName' => get_the_title($id) ]; } return $aGallery; } public static function parseGalleryToDB($aRawGallery) { if (empty($aRawGallery)) { return []; } return array_reduce( $aRawGallery, function ($aAcummulator, $aImg) { return $aAcummulator + [$aImg['id'] => $aImg['src']]; }, [] ); } public static function sureGalleryDoesNotExceededPlan($aPlanSettings, $aItems) { return PlanHelper::sureItemsDoNotExceededPlan($aPlanSettings, 'maximumGalleryImages', $aItems); } }
[+]
..
[-] SearchFieldSkeleton.php
[edit]
[-] FileSystem.php
[edit]
[-] Response.php
[edit]
[-] GetWilokeSubmission.php
[edit]
[-] AbstractSkeleton.php
[edit]
[-] InheritCMB2Styles.php
[edit]
[-] ReviewSkeleton.php
[edit]
[-] RestaurantMenu.php
[edit]
[-] WooCommerce.php
[edit]
[-] MapHelpers.php
[edit]
[-] .DS_Store
[edit]
[-] Message.php
[edit]
[-] GetSettings.php
[edit]
[-] QueryHelper.php
[edit]
[+]
Collection
[-] Inc.php
[edit]
[-] UserSkeleton.php
[edit]
[-] Firebase.php
[edit]
[-] Repository.php
[edit]
[-] DebugStatus.php
[edit]
[-] MapFactory.php
[edit]
[-] SetSettings.php
[edit]
[-] AddListingFieldSkeleton.php
[edit]
[-] VideoHelper.php
[edit]
[-] SearchFormSkeleton.php
[edit]
[-] PostSkeleton.php
[edit]
[-] KCHelpers.php
[edit]
[-] ProductSkeleton.php
[edit]
[-] QRCodeGenerator.php
[edit]
[-] HTML.php
[edit]
[-] Time.php
[edit]
[-] PlanHelper.php
[edit]
[-] SemanticUi.php
[edit]
[-] AjaxMsg.php
[edit]
[-] Logger.php
[edit]
[-] Cookie.php
[edit]
[-] Validation.php
[edit]
[-] GalleryHelper.php
[edit]
[-] AuthorSkeleton.php
[edit]
[-] General.php
[edit]
[-] Submission.php
[edit]
[-] TermSetting.php
[edit]