function sckls_exhibit_builder_display_random_featured_exhibit() { $html = ''; $featuredExhibit = exhibit_builder_random_featured_exhibit(); if ($featuredExhibit) { $image = sckls_exhibit_builder_get_first_image_object($featuredExhibit); } else { $image = ''; } if ($featuredExhibit) { $html .= '<a href="' . sckls_exhibit_builder_link_to_exhibit($featuredExhibit) . '" class="featured">'; $html .= ' <h6 class="header-label">Featured Exhibit</h6>'; $html .= ' <div class="overlay"></div>'; $html .= ' <span class="title">' . $featuredExhibit->title . '</span>'; if ($image) { $html .= '<div style="background-image: url(' . file_display_url($image, 'fullsize') . ');" class="img"></div>'; } else { $html .= '<div style="background-image: url(' . img('*****@*****.**') . ');" class="img default"></div>'; } $html .= '</a>'; } else { $html .= '<h4 class="not-featured">No exhibits added, yet.</h4>'; } $html = apply_filters('exhibit_builder_display_random_featured_exhibit', $html); return $html; }
/** * Return the HTML for summarizing a random featured exhibit * * @return string */ function custom_exhibit_builder_display_random_featured_exhibit() { $html = '<div id="featured-exhibit">'; $featuredExhibit = exhibit_builder_random_featured_exhibit(); $html .= '<h2> L\'exposition </h2>'; if ($featuredExhibit) { $html .= '<h3>' . exhibit_builder_link_to_exhibit($featuredExhibit) . '</h3>' . "\n"; $html .= '<p>' . snippet_by_word_count(metadata($featuredExhibit, 'description', array('no_escape' => true))) . '</p>'; } else { $html .= '<p>' . __('You have no featured exhibits.') . '</p>'; } $html .= '</div>'; $html = apply_filters('exhibit_builder_display_random_featured_exhibit', $html); return $html; }
function hijack_exhibit_builder_random_featured_exhibit() { $html = '<div id="featured-exhibit">'; $featuredExhibit = exhibit_builder_random_featured_exhibit(); $html .= '<h2>' . __('Featured Exhibit') . '</h2>'; if ($featuredExhibit) { $html .= '<h3>' . exhibit_builder_link_to_exhibit($featuredExhibit) . '</h3>' . "\n"; if ($item = get_record('Item', array('sort_field' => 'random', 'exhibit' => $featuredExhibit->id, 'hasImage' => true))) { $html .= exhibit_builder_link_to_exhibit($featuredExhibit, item_image('square_thumbnail', array(), 0, $item), array('class' => 'image')); } $html .= '<p class="description">' . snippet_by_word_count(metadata($featuredExhibit, 'description', array('no_escape' => true))) . '</p>'; } else { $html .= '<p>' . __('You have no featured exhibits.') . '</p>'; } $html .= '</div>'; return $html; }
/** * Return the HTML for summarizing a random featured exhibit * * @return string */ function exhibit_builder_display_random_featured_exhibit() { $html = '<div id="featured-exhibit">'; $featuredExhibit = exhibit_builder_random_featured_exhibit(); $html .= '<h2>' . __('Featured Exhibit') . '</h2>'; if ($featuredExhibit) { $html .= get_view()->partial('exhibits/single.php', array('exhibit' => $featuredExhibit)); } else { $html .= '<p>' . __('You have no featured exhibits.') . '</p>'; } $html .= '</div>'; $html = apply_filters('exhibit_builder_display_random_featured_exhibit', $html); return $html; }