function get_post_format_quote_content($pagecreator = false, $box = array()) { /* if pagecreatgor is active , all needed variables are provided by $box */ if ($pagecreator) { $content = !empty($box['quote']) ? lambda_translate_meta($box['quote']) : ''; $source_name = !empty($box['quote_cite']) ? lambda_translate_meta($box['quote_cite']) : ''; $source_url = !empty($box['quote_url']) ? lambda_translate_meta($box['quote_url']) : ''; /* blog is requesting the quote */ } else { $quotefound = ''; /* Get the post content. */ $content = get_the_content(); /* retrieve meta data */ $value = lambda_return_meta('postformat'); /* check if there is a valid quote author and url shortcode inside the meta */ if (isset($value['_format_quote_source_name']) && isset($value['_format_quote_source_url'])) { $source_name = !empty($value['_format_quote_source_name']) ? lambda_translate_meta($value['_format_quote_source_name']) : ''; $source_url = !empty($value['_format_quote_source_url']) ? lambda_translate_meta($value['_format_quote_source_url']) : ''; /* Start Quote */ $quote = ''; $quote .= '<figure class="quote">'; $quote .= '<blockquote>'; $quote .= '<p>' . $content . '</p>'; $quote .= '</blockquote>'; if (empty($source_url)) { $quote .= '<figcaption class="quote-caption">- ' . $source_name . '</figcaption>'; } else { $quote .= '<figcaption class="quote-caption"><a href="' . $source_url . '">- ' . $source_name . '</a></figcaption>'; } $quote .= '</figure>'; /* Return Quote */ } else { /* there is no valid source name and url */ $quote = ''; $quote .= '<figure class="quote">'; $quote .= $content; $quote .= '</figure>'; } } /* return final quote */ return $quote; }
function home_cta($metadata) { ?> <?php /* Required Variables */ $buttonlink = isset($metadata['cta_buttonlink']) ? $metadata['cta_buttonlink'] : ''; $buttontext = isset($metadata['cta_buttontext']) ? $metadata['cta_buttontext'] : ''; $title = !empty($metadata['cta_main_headline']) ? lambda_translate_meta($metadata['cta_main_headline']) : ''; ?> <section class="ut-cta clearfix"> <div class="container"> <?php if (!empty($title)) { ?> <header class="ut-title-header clearfix"> <h3 class="ut-title remove-bottom"><span><?php echo lambda_translate_meta($title); ?> </span></h3> </header> <?php } ?> <?php echo do_shortcode('[cta title="' . $title . '" headline="' . lambda_translate_meta($metadata['cta_headline']) . '" buttonlink="' . $buttonlink . '" buttontext="' . lambda_translate_meta($buttontext) . '"] ' . lambda_translate_meta($metadata['cta_content']) . ' [/cta]'); ?> </div> </section> <?php }
<?php //retrieve faq items $faqitems = $lambda_meta_data->get_the_value(UT_THEME_INITIAL . 'faq_items'); //check if faq items exists if (is_array($faqitems)) { ?> <section class="faq clearfix"> <?php foreach ($faqitems as $item) { ?> <article class="list"><h3 class="trigger"><span class="faq-marker"></span><a href="#"><?php echo isset($item['faq_question']) ? lambda_translate_meta($item['faq_question']) : ''; ?> </a></h3> <div class="toggle_container entry-content"><div class="block"><?php echo isset($item['faq_answer']) ? apply_filters('the_content', do_shortcode($item['faq_answer'])) : ''; ?> </div></div></article> <?php } ?> </section> <div class="clear"></div> <?php
</figure> <div class="member-info"> <h3 class="member-name"><?php echo $member['member_name']; ?> </h3> <?php if (isset($member['member_title']) && !empty($member['member_title'])) { ?> <span class="member-title"> <?php echo lambda_translate_meta($member['member_title']); ?> </span> <?php } ?> </div> <?php echo do_shortcode(apply_filters('the_content', $member['member_text'])); ?> <div class="member-contact"> <ul class="lambda-sociallinks clearfix">
function home_clients($count, $lastborder = false) { global $lambda_meta_data, $theme_path, $columnset; //receive standard meta $metadata = $lambda_meta_data->the_meta(); $clients = isset($metadata[UT_THEME_INITIAL . 'home_clients']) && !empty($metadata[UT_THEME_INITIAL . 'home_clients']) ? $metadata[UT_THEME_INITIAL . 'home_clients'] : ''; if (isset($metadata['client_type']) && $metadata['client_type'] == 'page') { //get page meta data $pagemetadata = get_post_meta($metadata['home_client_page'], $lambda_meta_data->get_the_id(), TRUE); $clients = $pagemetadata[UT_THEME_INITIAL . 'client_images']; } if (isset($metadata[UT_THEME_INITIAL . 'home_client_layout'])) { switch ($metadata[UT_THEME_INITIAL . 'home_client_layout']) { case 4: $grid = "four columns"; $columnset = 4; break; case 5: $grid = "one_fifth"; $columnset = 5; break; } } ?> <section class="client-wrap remove-bottom clearfix<?php echo $count == 1 ? ' padding-top' : ''; echo $lastborder ? ' last-border' : ''; ?> "> <?php if (isset($metadata['client_headline']) && !empty($metadata['client_headline'])) { ?> <div class="title-wrap clearfix"> <h3 class="home-title"><span><?php echo lambda_translate_meta($metadata['client_headline']); ?> </span></h3> </div> <?php } ?> <ul class="clients clearfix"> <?php $z = 0; $loadmax = isset($metadata['client_load_last']) ? $metadata['client_load_last'] : $columnset; if (isset($clients) && is_array($clients)) { shuffle($clients); foreach ($clients as $client) { if ($z + 1 <= $loadmax) { $itemposition = ''; //reset position //fallback $url = isset($client['url']) ? $client['url'] : '#'; $title = isset($client['title']) ? $client['title'] : ''; $src = isset($client['imgurl']) ? $client['imgurl'] : ''; $name = isset($client['name']) ? $client['name'] : ''; if ($columnset == 4) { $z % 4 == 3 ? $itemposition = ' last' : ($itemposition = ''); } if ($columnset == 5) { $z % 5 == 4 ? $itemposition = ' last' : ($itemposition = ''); } if ($columnset == 6) { $z % 6 == 5 ? $itemposition = ' last' : ($itemposition = ''); } //Output client echo '<li class="overflow-hidden imagepost ' . $grid . $itemposition . '">'; echo '<div class="client-holder"> <a href="' . $url . '"> <span class="client-img"><img alt="' . $title . '" src="' . $src . '" /></span> <div class="hover-overlay"> <span class="client-title"><strong>' . $name . '</strong></span> </div> </a></div>'; echo '</li>'; } $z++; } } ?> </ul> </section><!-- end client-wrap --> <?php }
function render_testimonial_carousel($metadata, $testimonials = '', $ID = 1, $type) { global $lambda_meta_data, $theme_path; if ($type == 'page') { //get page meta data $pagemetadata = get_post_meta($metadata['testimonialcarousel'], $lambda_meta_data->get_the_id(), TRUE); $testimonials = $pagemetadata[UT_THEME_INITIAL . 'testimonial_items']; } if (isset($metadata['testimonial_headline'])) { ?> <div class="title-wrap clearfix"> <h3 class="home-title"><span><?php echo lambda_translate_meta($metadata['testimonial_headline']); ?> </span></h3> <?php if ($type == 'home') { ?> <div class="carousel-navi clearfix"> <a class="tnext gon_<?php echo $ID; ?> " href="#">next</a> <a class="tprev pon_<?php echo $ID; ?> " href="#">prev</a> </div> <?php } ?> </div> <?php } ?> <?php if (isset($metadata['box_type'])) { ?> <div class="title-wrap clearfix"> <h3 class="home-title"><span><?php echo isset($metadata['box_title']) && !empty($metadata['box_title']) ? $metadata['box_title'] : ''; ?> </span></h3> <div class="carousel-navi clearfix"> <a class="tnext gon_<?php echo $ID; ?> " href="#">next</a> <a class="tprev pon_<?php echo $ID; ?> " href="#">prev</a> </div> </div> <?php } ?> <?php if (is_array($testimonials)) { ?> <script type="text/javascript"> (function($){ $(document).ready(function(){ var testimonials = $(".single-testimonial_<?php echo $ID; ?> ").find('ul').children().length; $(".single-testimonial_<?php echo $ID; ?> ").jCarouselLite({ btnNext: ".gon_<?php echo $ID; ?> ", btnPrev: ".pon_<?php echo $ID; ?> ", <?php if (isset($metadata['testimonials_autoplay']) && $metadata['testimonials_autoplay'] == 'on') { echo isset($metadata['testimonial_time']) ? 'auto:' . $metadata['testimonial_time'] . ',' : 'auto:1000,'; } ?> visible: testimonials }); }); })(jQuery); </script> <?php } ?> <div class="single-testimonial_<?php echo $ID; ?> "> <ul class="clearfix"> <?php if (is_array($testimonials)) { $z = 1; foreach ($testimonials as $testimonial) { ?> <li style="margin-bottom:0px !important; margin-left:0px !important; padding:0 1px;"> <?php if (isset($testimonial['author_image'])) { $authorimage = aq_resize($testimonial['author_image'], 50, 50, true); } ?> <?php if (empty($testimonial['author_image'])) { $authorimage = $theme_path . '/images/default-avatar.jpg'; } ?> <article class="testimonial-entry"> <?php echo do_shortcode(lambda_translate_meta($testimonial['author_comment'])); ?> </article> <figure class="testimonial-photo"> <img alt="<?php _e('customer photo', UT_THEME_INITIAL); ?> " class="testimonial-img" src="<?php echo $authorimage; ?> "> </figure> <p class="testimonial-name"><?php echo $testimonial['author_name']; echo $testimonial['author_company'] ? ', <span>' . $testimonial['author_company'] . '</span>' : ''; ?> </p> </li> <?php $z++; } } ?> </ul> </div> <?php }
</a> </span></h3> <div id="author-info" class="clearfix"> <figure id="author-avatar"> <?php echo get_avatar(get_the_author_meta('user_email'), apply_filters('lambda_author_bio_avatar_size', 60)); ?> </figure><!-- #author-avatar --> <div id="author-description"> <?php lambda_translate_meta(the_author_meta('description')); ?> <div class="author-links clearfix"> <ul class="lambda-sociallinks clearfix"> <?php $author_id = $post->post_author; ?> <?php if (get_the_author_meta('user_url', $author_id)) { ?> <li><a class="link" href="<?php
<section class="verticaltabs-wrap clearfix"> <div id="vtab" class="clearfix overflow-hidden"> <div class="one_fourth" id="vmenu"> <ul> <?php $z = 1; foreach ($tab_items as $tab) { ?> <li class="tab tab_<?php echo $z; ?> "><h3><?php echo isset($tab['tab_name']) ? lambda_translate_meta($tab['tab_name']) : ''; ?> </h3></li> <?php $z++; } ?> </ul> </div> <div id="vtabs" class="clearfix"> <?php $z = 1;
function render_testimonial($metadata = array(), $async = 2, $shortcode = false, $page = '', $testimonial = '', $class = '') { $color = $async % 2 == 0 ? 'dark' : 'white'; if ($shortcode && !empty($page)) { $metadata = lambda_return_meta('page', $page); if (is_array($metadata[UT_THEME_INITIAL . 'testimonial_items'])) { foreach ($metadata[UT_THEME_INITIAL . 'testimonial_items'] as $singletestimonial) { if (isset($singletestimonial['testimonial_id']) && $singletestimonial['testimonial_id'] == $testimonial) { // testimonial shortcode $testimonial = $singletestimonial; $testimonial['testimonial_class'] = $class . ' ' . $color; } } } } else { // testimonial template $testimonial = $metadata; $testimonial['testimonial_class'] = !empty($testimonial['testimonial_class']) ? $testimonial['testimonial_class'] . ' ' . $color : $color; } //create testimonialbox $testimonialbox = '<article class="testimonial-entry clearfix ' . $testimonial['testimonial_class'] . '">'; if (isset($testimonial['author_image'])) { $authorimage = lambda_resize($testimonial['author_image'], 50, 50, true); } if (empty($testimonial['author_image'])) { $authorimage = THEME_WEB_ROOT . '/images/default-avatar.jpg'; } $testimonialbox .= '<figure class="testimonial-photo">'; $testimonialbox .= '<img alt="' . $testimonial['author_name'] . '" class="testimonial-img" src="' . $authorimage . '">'; $testimonialbox .= '</figure>'; $testimonialbox .= '<p>' . do_shortcode(lambda_translate_meta($testimonial['author_comment'])) . '</p>'; $testimonialbox .= '<span class="testimonial-name clearfix">'; $testimonialbox .= isset($testimonial['author_name']) ? $testimonial['author_name'] : ''; $testimonialbox .= isset($testimonial['author_company']) ? ', <strong>' . $testimonial['author_company'] . '</strong>' : ''; $testimonialbox .= '</span>'; $testimonialbox .= '</article>'; return $testimonialbox; }