本文整理汇总了PHP中foogallery_build_class_attribute函数的典型用法代码示例。如果您正苦于以下问题:PHP foogallery_build_class_attribute函数的具体用法?PHP foogallery_build_class_attribute怎么用?PHP foogallery_build_class_attribute使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了foogallery_build_class_attribute函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_thumbnail_preview
/**
* Renders the thumbnail preview field
*
* @param $field array
* @param $gallery FooGallery
* @param $template array
*/
function render_thumbnail_preview($field, $gallery, $template)
{
if ('default_thumb_preview' == $field['type']) {
$args = $gallery->get_meta('default_thumbnail_dimensions', array('width' => get_option('thumbnail_size_w'), 'height' => get_option('thumbnail_size_h'), 'crop' => true));
//override the link so that it does not actually open an image
$args['link'] = 'custom';
$args['custom_link'] = '#preview';
$hover_effect = $gallery->get_meta('default_hover-effect', 'hover-effect-zoom');
$border_style = $gallery->get_meta('default_border-style', 'border-style-square-white');
$hover_effect_type = $gallery->get_meta('default_hover-effect-type', '');
$caption_hover_effect = $gallery->get_meta('default_caption-hover-effect', 'hover-caption-simple');
$featured = $gallery->featured_attachment();
if (false === $featured) {
$featured = new FooGalleryAttachment();
$featured->url = FOOGALLERY_URL . 'assets/test_thumb_1.jpg';
$featured->caption = __('Caption Title', 'foogallery');
$featured->description = __('Long Caption Description Text', 'foogallery');
}
echo '<div class="foogallery-default-preview ' . foogallery_build_class_attribute($gallery, $hover_effect, $border_style, $hover_effect_type, $caption_hover_effect, 'foogallery-thumbnail-preview') . '">';
echo $featured->html($args, true, false);
echo $featured->html_caption('both');
echo '</a>';
echo '</div>';
}
}
示例2: render_thumbnail_preview
function render_thumbnail_preview($field, $gallery, $template)
{
if ('image_viewer_preview' == $field['type']) {
$args = $gallery->get_meta('thumbnail_size', array('width' => 640, 'height' => 360, 'crop' => true));
//override the link so that it does not actually open an image
$args['link'] = 'custom';
$args['custom_link'] = '#preview';
$args['link_attributes'] = array('class' => 'fiv-active');
$hover_effect = $gallery->get_meta('image-viewer_hover-effect', 'hover-effect-zoom');
$hover_effect_type = $gallery->get_meta('image-viewer_hover-effect-type', '');
$featured = $gallery->featured_attachment();
if (false === $featured) {
$featured = new FooGalleryAttachment();
$featured->url = FOOGALLERY_URL . 'assets/test_thumb_1.jpg';
}
?>
<div class="foogallery-image-viewer-preview <?php
echo foogallery_build_class_attribute($gallery, $hover_effect, $hover_effect_type);
?>
">
<div class="fiv-inner">
<div class="fiv-inner-container">
<?php
echo $featured->html($args, true, false);
echo $featured->html_caption('both');
echo '</a>';
?>
</div>
<div class="fiv-ctrls">
<div class="fiv-prev"><span><?php
echo __('Prev');
?>
</span></div>
<label class="fiv-count"><span class="fiv-count-current">1</span><?php
echo __('of');
?>
<span>1</span></label>
<div class="fiv-next"><span><?php
echo __('Next');
?>
</span></div>
</div>
</div>
</div><?php
}
}
示例3: foogallery_build_class_attribute
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;
?>
" class="<?php
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-lightbox-' . $lightbox, 'foogallery-justified-loading');
?>
">
<?php
foreach ($current_foogallery->attachments() as $attachment) {
if ('title' == $caption_source) {
$attachment->alt = $attachment->title;
} else {
if ('caption' == $caption_source) {
$attachment->alt = $attachment->caption;
}
}
echo $attachment->html($args);
}
?>
</div>
示例4: foogallery_gallery_template_setting
$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
echo $featured_attachment->html($args, false, false);
?>
<?php
echo $featured_attachment->html_img($args);
?>
<span class="thumbnail-caption" style="background-color: <?php
echo $caption_bgcolor;
?>
; color:<?php
echo $caption_color;
?>
">
示例5: foogallery_gallery_template_setting
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) {
echo '<p>' . $attachment->description . '</p>';
}
echo '</div>';
}
?>
示例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>
示例7: foogallery_gallery_template_setting
* 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>
<script type="text/javascript">
jQuery(function(){
jQuery("#foogallery-gallery-<?php
示例8: foogallery_gallery_template_setting
$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) {
echo $attachment->html_caption($caption_content);
}
echo '</a>';
}
?>
</div>
示例9: foogallery_build_class_attribute
}
<?php
}
?>
</style>
<div data-masonry-options='{ "itemSelector" : ".item", "percentPosition" : "true", "columnWidth" : "#foogallery-gallery-<?php
echo $current_foogallery->ID;
?>
.masonry-item-width", "gutter" : "#foogallery-gallery-<?php
echo $current_foogallery->ID;
?>
.masonry-gutter-width", "isFitWidth" : <?php
echo $center_align ? 'true' : 'false';
?>
}' id="foogallery-gallery-<?php
echo $current_foogallery->ID;
?>
" class="<?php
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-lightbox-' . $lightbox, $hover_zoom_class, 'masonry-layout-' . $layout, $gutter_percent, 'foogallery-masonry-loading');
?>
">
<div class="masonry-item-width"></div>
<div class="masonry-gutter-width"></div>
<?php
foreach ($current_foogallery->attachments() as $attachment) {
echo ' <div class="item">' . $attachment->html($args) . '</div>
';
}
?>
</div>
示例10: foogallery_build_class_attribute
<style>
/*Used to keep captions inside the visible area*/
#foogallery-gallery-<?php
echo $gallid;
?>
.foo-item {max-height: <?php
echo $height;
?>
px;}
</style>
<div id="foogallery-gallery-<?php
echo $gallid;
?>
" class="<?php
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-lightbox-' . $lightbox, 'owl-carousel ' . $hover_effect, $border_style, $hasborder);
?>
">
<?php
foreach ($current_foogallery->attachments() as $attachment) {
$title = $attachment->title;
$strippedtitle = str_replace(' ', '_', $title);
if ($hash == 'true') {
$dohash = 'data-hash="' . $datahash . '"';
} else {
$dohash = '';
}
if (empty($title)) {
$datahash = 'no-title';
/* every image needs a data-hash
so we'll give it one in case it got deleted somehow */
示例11: foogallery_build_class_attribute
{
margin: 0 auto;
}
<?php
}
?>
</style>
<div data-masonry-options='{ "itemSelector" : ".item", "columnWidth" : <?php
echo $width;
?>
, "gutter" : <?php
echo $gutter_width;
?>
, "isFitWidth" : <?php
echo $center_align ? 'true' : 'false';
?>
}' id="foogallery-gallery-<?php
echo $current_foogallery->ID;
?>
" class="<?php
echo foogallery_build_class_attribute($current_foogallery, 'foogallery-lightbox-' . $lightbox, $hover_zoom_class, 'foogallery-masonry-loading');
?>
">
<?php
foreach ($current_foogallery->attachments() as $attachment) {
echo ' <div class="item">' . $attachment->html($args) . '</div>
';
}
?>
</div>
示例12: foogallery_gallery_template_setting
?>
.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">
<div class="fiv-inner-container">
<?php
foreach ($attachments as $attachment) {
echo $attachment->html($args, true, false);
if ($caption_content !== 'none') {
echo $attachment->html_caption($caption_content);
}
echo '</a>';
}
?>
</div>
<div class="fiv-ctrls">