• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP foogallery_gallery_template_setting函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中foogallery_gallery_template_setting函数的典型用法代码示例。如果您正苦于以下问题:PHP foogallery_gallery_template_setting函数的具体用法?PHP foogallery_gallery_template_setting怎么用?PHP foogallery_gallery_template_setting使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了foogallery_gallery_template_setting函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: render_template

 /**
  * Locates and renders the gallery based on the template
  * Will look in the following locations
  *  wp-content/themes/{child-theme}/foogallery/gallery-{template}.php
  *    wp-content/themes/{theme}/foogallery/gallery-{template}.php
  *  wp-content/plugins/foogallery/templates/gallery-{template}.php
  *
  * @param $args array       Arguments passed in from the shortcode
  */
 public function render_template($args)
 {
     //do some work before we locate the template
     global $current_foogallery;
     global $current_foogallery_arguments;
     global $current_foogallery_template;
     //set the arguments
     $current_foogallery_arguments = $args;
     //load our gallery
     $current_foogallery = $this->find_gallery($args);
     if (false === $current_foogallery) {
         //we could not find the gallery!
         _e('The gallery was not found!', 'foogallery');
     } else {
         //find the gallery template we will use to render the gallery
         $current_foogallery_template = $this->get_arg($args, 'template', $current_foogallery->gallery_template);
         //set a default if we have no gallery template
         if (empty($current_foogallery_template)) {
             $current_foogallery_template = foogallery_get_default('gallery_template');
         }
         //check if we have any attachments
         if (!$current_foogallery->has_attachments()) {
             //no attachments!
             do_action("foogallery_template_no_attachments-({$current_foogallery_template})", $current_foogallery);
         } else {
             //create locator instance
             $loader = $this->create_locator_instance();
             if (false !== ($template_location = $loader->locate_file("gallery-{$current_foogallery_template}.php"))) {
                 //we have found a template!
                 do_action('foogallery_located_template', $current_foogallery);
                 do_action("foogallery_located_template-{$current_foogallery_template}", $current_foogallery);
                 //try to include some JS
                 if (false !== ($js_location = $loader->locate_file("gallery-{$current_foogallery_template}.js"))) {
                     wp_enqueue_script("foogallery-template-{$current_foogallery_template}", $js_location['url']);
                     do_action('foogallery_template_enqueue_script', $current_foogallery_template, $js_location['url']);
                 }
                 //try to include some CSS
                 if (false !== ($css_location = $loader->locate_file("gallery-{$current_foogallery_template}.css"))) {
                     foogallery_enqueue_style("foogallery-template-{$current_foogallery_template}", $css_location['url'], array(), FOOGALLERY_VERSION);
                 }
                 //finally include the actual php template!
                 if ($template_location) {
                     load_template($template_location['path'], false);
                 }
                 //cater for lightbox extensions needing to add styles and javascript
                 $lightbox = foogallery_gallery_template_setting('lightbox');
                 if (!empty($lightbox)) {
                     do_action("foogallery_template_lightbox-{$lightbox}", $current_foogallery);
                 }
                 //we have loaded all files, now let extensions do some stuff
                 do_action("foogallery_loaded_template", $current_foogallery);
                 do_action("foogallery_loaded_template-({$current_foogallery_template})", $current_foogallery);
             } else {
                 //we could not find a template!
                 _e('No gallery template found!', 'foogallery');
             }
         }
     }
 }
开发者ID:renatodex,项目名称:submundo-blogstore,代码行数:68,代码来源:class-foogallery-template-loader.php


示例2: handle_lightbox_field

 /**
  * Handle a gallery that has a lightbox. This allows us to include any scripts or CSS that is needed for the lightbox
  *
  * @param $gallery FooGallery
  */
 function handle_lightbox_field($gallery)
 {
     if ($gallery->gallery_template_has_field_of_type('lightbox')) {
         $lightbox = foogallery_gallery_template_setting('lightbox');
         if (false != $lightbox) {
             do_action("foogallery_template_lightbox-{$lightbox}", $gallery);
         }
     }
 }
开发者ID:RA2WP,项目名称:RA2WP,代码行数:14,代码来源:class-shortcodes.php


示例3: foogallery_gallery_template_setting

 * FooGallery justufued gallery template
 */
global $current_foogallery;
global $current_foogallery_arguments;
$height = foogallery_gallery_template_setting('thumb_height', '250');
$row_height = foogallery_gallery_template_setting('row_height', '150');
$max_row_height = foogallery_gallery_template_setting('max_row_height', '200%');
if (strpos($max_row_height, '%') !== false) {
    $max_row_height = '"' . $max_row_height . '"';
}
$margins = foogallery_gallery_template_setting('margins', '1');
$captions = foogallery_gallery_template_setting('captions', '') == 'on';
$gutter_width = foogallery_gallery_template_setting('gutter_width', '10');
$args = array('height' => $height, 'link' => foogallery_gallery_template_setting('thumbnail_link', 'image'));
$lightbox = foogallery_gallery_template_setting('lightbox', 'unknown');
$caption_source = foogallery_gallery_template_setting('caption_source', 'title');
?>
<div data-justified-options='{ "rowHeight": <?php 
echo $row_height;
?>
, "maxRowHeight": <?php 
echo $max_row_height;
?>
, "margins": <?php 
echo $margins;
?>
, "captions": <?php 
echo $captions ? 'true' : 'false';
?>
 }' id="foogallery-gallery-<?php 
echo $current_foogallery->ID;
开发者ID:idhamhafidz,项目名称:foogallery,代码行数:31,代码来源:gallery-justified.php


示例4: foogallery_gallery_template_setting

/**
 * FooGallery single thumbnail gallery template
 */
global $current_foogallery;
global $current_foogallery_arguments;
$args = foogallery_gallery_template_setting('thumbnail_dimensions', array());
$lightbox = foogallery_gallery_template_setting('lightbox', 'unknown');
$position = foogallery_gallery_template_setting('position', 'position-block');
$caption_style = foogallery_gallery_template_setting('caption_style', 'caption-simple');
$caption_title = foogallery_gallery_template_setting('caption_title', '');
$caption_desc = foogallery_gallery_template_setting('caption_description', '');
$caption_bgcolor = foogallery_gallery_template_setting('caption_bgcolor', 'rgba(0, 0, 0, 0.8)');
$caption_color = foogallery_gallery_template_setting('caption_color', '#fff');
$featured_attachment = $current_foogallery->featured_attachment($args);
$thumb_url = $featured_attachment->url;
if (foogallery_gallery_template_setting('link_custom_url', '') == 'on') {
    if (!empty($featured_attachment->custom_url)) {
        $thumb_url = $featured_attachment->custom_url;
    }
    $args['link'] = 'custom';
}
$args['link_attributes'] = array('rel' => 'foobox[' . $current_foogallery->ID . ']');
?>
<div id="foogallery-gallery-<?php 
echo $current_foogallery->ID;
?>
" class="<?php 
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-lightbox-' . $lightbox, $caption_style, $position);
?>
">
    <?php 
开发者ID:andreasonny83,项目名称:RhythmicExcellence,代码行数:31,代码来源:gallery-thumbnail.php


示例5: foogallery_gallery_template_setting

<?php

/**
 * FooGallery portfolio gallery template
 */
global $current_foogallery;
global $current_foogallery_arguments;
$args = foogallery_gallery_template_setting('thumbnail_dimensions', array());
$args['link'] = foogallery_gallery_template_setting('thumbnail_link', 'image');
$args['image_attributes'] = array('class' => 'bf-img', 'height' => $args['height']);
$lightbox = foogallery_gallery_template_setting('lightbox', 'unknown');
$gutter = foogallery_gallery_template_setting('gutter', 40);
?>
<div data-brickfolio-gutter="<?php 
echo $gutter;
?>
" id="foogallery-gallery-<?php 
echo $current_foogallery->ID;
?>
" class="<?php 
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-lightbox-' . $lightbox, 'brickfolio');
?>
">
<?php 
foreach ($current_foogallery->attachments() as $attachment) {
    echo '<div class="bf-item" style="width:' . $args['width'] . 'px">';
    echo $attachment->html($args);
    if ($attachment->caption) {
        echo '<h4>' . $attachment->caption . '</h4>';
    }
    if ($attachment->description) {
开发者ID:idhamhafidz,项目名称:foogallery,代码行数:31,代码来源:gallery-simple_portfolio.php


示例6: foogallery_gallery_template_setting

<?php

/**
 * FooGallery default responsive gallery template
 */
global $current_foogallery;
global $current_foogallery_arguments;
$args = foogallery_gallery_template_setting('thumbnail_dimensions', array());
$link = foogallery_gallery_template_setting('thumbnail_link', 'image');
$args['link'] = $link;
$lightbox = foogallery_gallery_template_setting('lightbox', 'unknown');
$spacing = foogallery_gallery_template_setting('spacing', '');
$hover_effect = foogallery_gallery_template_setting('hover-effect', 'hover-effect-zoom');
$border_style = foogallery_gallery_template_setting('border-style', 'border-style-square-white');
$alignment = foogallery_gallery_template_setting('alignment', 'alignment-center');
?>
<div id="foogallery-gallery-<?php 
echo $current_foogallery->ID;
?>
" class="<?php 
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-link-' . $link, 'foogallery-lightbox-' . $lightbox, $spacing, $hover_effect, $border_style, $alignment);
?>
">
	<?php 
foreach ($current_foogallery->attachments() as $attachment) {
    echo $attachment->html($args);
}
?>
	<div style="clear:both"></div>
</div>
开发者ID:racypepper,项目名称:foogallery,代码行数:30,代码来源:gallery-default.php


示例7: foogallery_gallery_template_setting

<?php

/**
 * FooGallery justufued gallery template
 */
global $current_foogallery;
global $current_foogallery_arguments;
$height = foogallery_gallery_template_setting('row_height', '150');
$margins = foogallery_gallery_template_setting('margins', '1');
$captions = foogallery_gallery_template_setting('captions', 'on') == 'on';
$gutter_width = foogallery_gallery_template_setting('gutter_width', '10');
$args = array('height' => $height, 'link' => foogallery_gallery_template_setting('thumbnail_link', 'image'));
$lightbox = foogallery_gallery_template_setting('lightbox', 'unknown');
?>
<div id="foogallery-gallery-<?php 
echo $current_foogallery->ID;
?>
" class="<?php 
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-lightbox-' . $lightbox);
?>
">
	<?php 
foreach ($current_foogallery->attachments() as $attachment) {
    echo $attachment->html($args, true, false);
    if ($captions) {
        echo '<div class="caption">' . $attachment->caption . '</div>';
    }
    echo '</a>';
}
?>
</div>
开发者ID:racypepper,项目名称:foogallery,代码行数:31,代码来源:gallery-justified.php


示例8: foogallery_gallery_template_setting

 * FooGallery default responsive gallery template
 */
global $current_foogallery;
global $current_foogallery_arguments;
$args = foogallery_gallery_template_setting('thumbnail_dimensions', array());
$link = foogallery_gallery_template_setting('thumbnail_link', 'image');
$args['link'] = $link;
$lightbox = foogallery_gallery_template_setting('lightbox', 'unknown');
$spacing = foogallery_gallery_template_setting('spacing', '');
$hover_effect = foogallery_gallery_template_setting('hover-effect', 'hover-effect-zoom');
$border_style = foogallery_gallery_template_setting('border-style', 'border-style-square-white');
$alignment = foogallery_gallery_template_setting('alignment', 'alignment-center');
$hover_effect_type = foogallery_gallery_template_setting('hover-effect-type', '');
$caption_hover_effect = foogallery_gallery_template_setting('caption-hover-effect', 'hover-caption-simple');
$caption_content = foogallery_gallery_template_setting('caption-content', 'title');
$loading_animation = 'yes' === foogallery_gallery_template_setting('loading_animation', 'yes') ? 'foogallery-default-loading' : '';
if ('hover-effect-caption' === $hover_effect_type) {
    $hover_effect = '';
}
?>
<div id="foogallery-gallery-<?php 
echo $current_foogallery->ID;
?>
" class="<?php 
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-link-' . $link, 'foogallery-lightbox-' . $lightbox, $spacing, $hover_effect, $hover_effect_type, $border_style, $alignment, $caption_hover_effect, $loading_animation);
?>
">
	<?php 
foreach ($current_foogallery->attachments() as $attachment) {
    echo $attachment->html($args, true, false);
    if ('hover-effect-caption' === $hover_effect_type) {
开发者ID:gawlp,项目名称:trzyserca,代码行数:31,代码来源:gallery-default.php


示例9: foogallery_gallery_template_setting

<?php

/**
 * FooGallery single thumbnail gallery template
 */
global $current_foogallery;
global $current_foogallery_arguments;
$args = foogallery_gallery_template_setting('thumbnail_dimensions', array());
$lightbox = foogallery_gallery_template_setting('lightbox', 'unknown');
$position = foogallery_gallery_template_setting('position', 'position-block');
$caption_style = foogallery_gallery_template_setting('caption_style', 'caption-simple');
$caption_title = foogallery_gallery_template_setting('caption_title', '');
$caption_desc = foogallery_gallery_template_setting('caption_description', '');
$caption_bgcolor = foogallery_gallery_template_setting('caption_bgcolor', 'rgba(0, 0, 0, 0.8)');
$caption_color = foogallery_gallery_template_setting('caption_color', '#fff');
$featured_attachment = $current_foogallery->featured_attachment($args);
?>
<div id="foogallery-gallery-<?php 
echo $current_foogallery->ID;
?>
" class="<?php 
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-lightbox-' . $lightbox, $caption_style, $position);
?>
">
    <a href="<?php 
echo $featured_attachment->url;
?>
">
        <?php 
echo $featured_attachment->html_img($args);
?>
开发者ID:EliasGoldberg,项目名称:troop-sim,代码行数:31,代码来源:gallery-thumbnail.php


示例10: foogallery_gallery_template_setting

<?php

/**
 * FooGallery default responsive gallery template
 */
global $current_foogallery;
global $current_foogallery_arguments;
$args = foogallery_gallery_template_setting('thumbnail_dimensions', array());
$link = foogallery_gallery_template_setting('thumbnail_link', 'image');
$args['link'] = $link;
$lightbox = foogallery_gallery_template_setting('lightbox', 'unknown');
$spacing = foogallery_gallery_template_setting('spacing', '');
$hover_effect = foogallery_gallery_template_setting('hover-effect', 'hover-effect-zoom');
$border_style = foogallery_gallery_template_setting('border-style', 'border-style-square-white');
$alignment = foogallery_gallery_template_setting('alignment', 'alignment-center');
$hover_effect_type = foogallery_gallery_template_setting('hover-effect-type', '');
?>
<div id="foogallery-gallery-<?php 
echo $current_foogallery->ID;
?>
" class="<?php 
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-link-' . $link, 'foogallery-lightbox-' . $lightbox, $spacing, $hover_effect, $hover_effect_type, $border_style, $alignment, 'foogallery-default-loading');
?>
">
	<?php 
foreach ($current_foogallery->attachments() as $attachment) {
    echo $attachment->html($args);
}
?>
</div>
开发者ID:idhamhafidz,项目名称:foogallery,代码行数:30,代码来源:gallery-default.php


示例11: foogallery_gallery_template_setting

$autoplay = foogallery_gallery_template_setting('autoplay', 'true');
$hash = foogallery_gallery_template_setting('hash', 'true');
$pause = foogallery_gallery_template_setting('pause', 'true');
$seconds = foogallery_gallery_template_setting('seconds', '4000');
$loop = foogallery_gallery_template_setting('loop', 'true');
$margin = foogallery_gallery_template_setting('margin', '10');
$hover_effect = foogallery_gallery_template_setting('hover-effect', 'hover-effect-zoom');
$border_style = foogallery_gallery_template_setting('border-style', 'border-style-square-white');
$animation = foogallery_gallery_template_setting('animation', false);
$showdesc = foogallery_gallery_template_setting('showdesc', false);
$advanced = foogallery_gallery_template_setting('enable_advanced', 'no');
$responsive = foogallery_gallery_template_setting('enable-responsive', 'no');
$itemsat0 = foogallery_gallery_template_setting('items-at-0', false);
$itemsat480 = foogallery_gallery_template_setting('items-at-480', false);
$itemsat960 = foogallery_gallery_template_setting('items-at-960', false);
$autowidth = foogallery_gallery_template_setting('autowidth', false);
if ($border_style == '' || $border_style == 'border-style-rounded') {
    $hasborder = '';
} else {
    $hasborder = 'hasborder';
}
//general FooGallery settings that are useful for owl
if ($hasborder == 'hasborder') {
    $height = $args['height'] + 20;
} else {
    $height = $args['height'];
}
$width = $args['width'];
//image width
$gallid = $current_foogallery->ID;
// current FooGallery ID
开发者ID:THC-eSolutions,项目名称:arquiwallfachadas,代码行数:31,代码来源:gallery-owl-carousel.php


示例12: foogallery_gallery_template_setting

.fiv-custom > .fiv-inner > .fiv-ctrls > .fiv-next {
		border-color: <?php 
    echo foogallery_gallery_template_setting('theme_custom_bordercolor', '#e6e6e6');
    ?>
;
	}
	#foogallery-gallery-<?php 
    echo $current_foogallery->ID;
    ?>
.fiv-custom > .fiv-inner > .fiv-ctrls > .fiv-prev:hover,
	#foogallery-gallery-<?php 
    echo $current_foogallery->ID;
    ?>
.fiv-custom > .fiv-inner > .fiv-ctrls > .fiv-next:hover {
		background-color: <?php 
    echo foogallery_gallery_template_setting('theme_custom_hovercolor', '#F2F2F2');
    ?>
;
	}
</style>
<?php 
}
?>
<div id="foogallery-gallery-<?php 
echo $current_foogallery->ID;
?>
" class="<?php 
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-link-' . $link, 'foogallery-lightbox-' . $lightbox, $theme, $hover_effect, $hover_effect_type, $alignment);
?>
">
	<div class="fiv-inner">
开发者ID:andreasonny83,项目名称:RhythmicExcellence,代码行数:31,代码来源:gallery-image-viewer.php


示例13: foogallery_gallery_template_setting

    $max_row_height = '"' . $max_row_height . '"';
}
$margins = foogallery_gallery_template_setting('margins', '1');
$caption_source = foogallery_gallery_template_setting('caption_source', 'title');
if (foogallery_gallery_template_setting('caption_source', '') == 'none') {
    $captions = false;
} else {
    $captions = true;
}
$thumb_size = foogallery_gallery_template_setting('thumbnail_size', 'dynamic');
$thumb_link = foogallery_gallery_template_setting('thumbnail_link', 'image');
$lightbox = foogallery_gallery_template_setting('lightbox', 'unknown');
$page_mode = foogallery_gallery_template_setting('advance-page-mode', 'page');
$first_page = foogallery_gallery_template_setting('first_page', '10');
$per_page = foogallery_gallery_template_setting('per_page', '10');
$footer_offset = foogallery_gallery_template_setting('footer_offset', '300');
$total_count = sizeof($current_foogallery->attachments());
// Set the args to be used to generate the html code (image links, etc.)
$args = array('height' => $height, 'link' => $thumb_link, 'thumb_size' => $thumb_size);
//future enhancement to allow setting this parameter...hard code for now.
$last_row = "justify";
$last_row = '"' . $last_row . '"';
?>
<div data-justified-options='{ "rowHeight": <?php 
echo $height;
?>
, 
	"maxRowHeight": <?php 
echo $max_row_height;
?>
, "margins": <?php 
开发者ID:sbaeder,项目名称:foogallery-justified-infinite-scroll-template,代码行数:31,代码来源:gallery-justified-infinite-scroll.php



注:本文中的foogallery_gallery_template_setting函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP foogallery_get_setting函数代码示例发布时间:2022-05-15
下一篇:
PHP foogallery_build_class_attribute函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap