PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
wilcity-shortcodes
/
core
<?php use \WilokeListingTools\Framework\Helpers\General; use \WilokeListingTools\Frontend\Gallery; function wilcityRenderRestaurantMenuItem($aAtts, $postID, $isReturnJson = false) { $aAtts = shortcode_atts( array( 'gallery' => '', 'title' => '', 'description' => '', 'price' => '', 'link_to' => '', 'is_open_new_window' => '', 'post_id' => '' ), $aAtts ); $target = '_self'; if ( !empty($aAtts['is_open_new_window'])) { $target = '_blank'; } if ( !empty($aAtts['gallery']) && !is_array($aAtts['gallery'])) { $aGallery = json_decode($aAtts['gallery'], true); } else { $aGallery = $aAtts['gallery']; } if ( !empty($aGallery)) { $belongsTo = \WilokeListingTools\Framework\Helpers\GetSettings::getListingBelongsToPlan($postID); if ( !empty($belongsTo)) { $aPlanSettings = \WilokeListingTools\Framework\Helpers\GetSettings::getPlanSettings($belongsTo); if (isset($aPlanSettings['maximum_restaurant_gallery_images']) && !empty($aPlanSettings['maximum_restaurant_gallery_images'])) { $aGallery = array_slice($aGallery, 0, $aPlanSettings['maximum_restaurant_gallery_images'], true); } } $aGalleryKeys = array_keys($aGallery); $aThumbnails = array_map(function ($galleryID){ return wp_get_attachment_image_url($galleryID, 'thumbnail'); }, $aGalleryKeys); } if ( !$isReturnJson): ?> <li> <div class="utility-box-1_module__MYXpX utility-box-1_menus__17rbu"> <?php if ( !empty($aGallery)) : ?> <restaurant-gallery raw-thumbnails='<?php echo json_encode($aThumbnails); ?>' raw-images='<?php echo json_encode(array_values($aGallery)); ?>'></restaurant-gallery> <?php endif; ?> <?php if ( !empty($aAtts['link_to'])) : ?> <a href="<?php echo esc_url($aAtts['link_to']); ?>" target="<?php echo esc_attr($target); ?>" rel="<?php echo esc_attr(General::renderRel($aAtts['link_to'])); ?>"> <?php endif; ?> <div class="utility-box-1_body__8qd9j"> <div class="utility-box-1_group__2ZPA2"> <?php if ( !empty($aAtts['title'])) : ?> <h3 class="utility-box-1_title__1I925"><?php Wiloke::ksesHTML($aAtts['title']); ?></h3> <?php endif; ?> <?php if ( !empty($aAtts['description'])) : ?> <div class="utility-box-1_content__3jEL7"><?php Wiloke::ksesHTML($aAtts['description']); ?></div> <?php endif; ?> </div> <?php if ( !empty($aAtts['price'])) : ?> <div class="utility-box-1_description__2VDJ6"><?php Wiloke::ksesHTML($aAtts['price']); ?></div> <?php endif; ?> </div> <?php if ( !empty($aAtts['link_to'])) : ?> </a> <?php endif; ?> </div> </li> <?php else: unset($aAtts['gallery']); return array( 'aGallery' => json_encode(array_values($aGallery)), 'aThumbnails' => json_encode($aThumbnails), 'oAtts' => $aAtts ); endif; } add_shortcode('wilcity_render_restaurant_menu_item', 'wilcityRenderRestaurantMenuItem');
[+]
..
[-] wilcity_render_event_item.php
[edit]
[-] wilcity_render_team_intro_slider.php
[edit]
[-] wilcity_render_modern_term_boxes.php
[edit]
[-] wilcity_listing_slider_item.php
[edit]
[-] wilcity_render_author_slider.php
[edit]
[-] wilcity_render_term_box.php
[edit]
[-] wilcity_render_testimonial_item.php
[edit]
[-] wilcity_render_rectangle_term_boxes.php
[edit]
[-] wilcity_render_rectangle_term_box.php
[edit]
[-] wilcity_render_restaunrant_menu_item.php
[edit]
[-] wilcity_render_hero_search_form.php
[edit]
[-] wilcity_render_grid_post.php
[edit]
[-] wilcity_render_events_grid.php
[edit]
[-] wilcity_render_listings_tabs.php
[edit]
[-] wilcity_render_map.php
[edit]
[-] wilcity_render_modern_term_box.php
[edit]
[-] wilcity_render_contact_us.php
[edit]
[-] wilcity_render_hero.php
[edit]
[-] wilcity_render_restaurant_list_menu.php
[edit]
[-] wilcity_render_terms_slider.php
[edit]
[-] wilcity_terms_box.php
[edit]
[-] wilcity_render_image_box.php
[edit]
[-] wilcity_render_intro_box.php
[edit]
[-] wilcity_render_wiloke_wave.php
[edit]
[-] wilcity_render_restaurant_listing.php
[edit]
[-] wilcity_render_grid.php
[edit]
[-] wilcity_post_slider_item.php
[edit]
[-] wilcity_render_term_masonry_item.php
[edit]
[-] wilcity_render_slider.php
[edit]
[-] wilcity_render_team_intro_slider_item.php
[edit]
[-] wilcity_widget_list_style.php
[edit]
[-] wilcity_render_term_masonry_items.php
[edit]
[-] wilcity_render_grid_item.php
[edit]
[-] wilcity_render_box_icon.php
[edit]
[-] wilcity_render_new_grid.php
[edit]
[-] wilcity_render_heading_ribbon.php
[edit]
[-] wilcity_render_testimonials.php
[edit]
[-] wilcity_render_post_types.php
[edit]
[-] wilcity_event_slider_item.php
[edit]
[-] wilcity_render_heading.php
[edit]
[-] wilcity_render_term_boxes.php
[edit]
[-] wilcity_render_restaurant_listings.php
[edit]
[-] wilcity_render_full_width_list_item.php
[edit]