Esempio n. 1
0
 function the_post_format_gallery_content($pagebuilder = false, $mediaheight = 300, $mediawidth)
 {
     $theme_options = get_option('option_tree');
     /* retrieve gallery height and cropping status from theme options panel */
     $galleryheight = is_single() ? $theme_options['blog_single_gallery_height'] : $theme_options['blog_preview_gallery_height'];
     $imagecropping = $theme_options['activate_image_cropping'] == 'yes' ? true : false;
     /* special height and width for pagebuilder items */
     $galleryheight = $pagebuilder ? $mediaheight : $galleryheight;
     $gallerywidth = $pagebuilder ? $mediawidth : 'span12';
     /* check if user wants to display the lambda gallery */
     if ($theme_options['blog_use_lambda_gallery'] == 'yes') {
         lambda_revolution_slider(get_the_ID(), $galleryheight, $gallerywidth, $imagecropping, $pagebuilder);
     } else {
         $content = get_the_content();
         $pattern = get_shortcode_regex();
         preg_match("/{$pattern}/s", $content, $match);
         $shortcode = isset($match[0]) && !empty($match[0]) ? $match[0] : '';
         echo do_shortcode($shortcode);
     }
 }
Esempio n. 2
0
<?php

#-----------------------------------------------------------------
# Pprtfolio Format : Gallery
#-----------------------------------------------------------------
$portfoliometa = lambda_return_meta('page');
$portfolioheight = !empty($portfoliometa['portfolio_gallery_height']) ? $portfoliometa['portfolio_gallery_height'] : 500;
$imagecropping = !empty($portfoliometa['portfolio_gallery_cropping']) && $portfoliometa['portfolio_gallery_cropping'] == 'off' ? false : true;
lambda_revolution_slider(get_the_ID(), $portfolioheight, '', $imagecropping);