function laborator_header_spacing_body_class($classes) { if (defined("HEADER_ABSOLUTE_SPACING")) { $classes[] = 'header-absolute'; $header_spacing = str_replace('px', '', HEADER_ABSOLUTE_SPACING); generate_custom_style(".wrapper", "padding-top: {$header_spacing}px", '', true); } return $classes; }
if ($button_txt_custom) { generate_custom_style(".{$btn_index}", "color: {$button_txt_custom} !important;"); } if ($button_txt_hover_custom) { generate_custom_style(".{$btn_index}:hover", "color: {$button_txt_hover_custom} !important;"); } break; default: if ($button_bg_custom) { generate_custom_style(".{$btn_index}", "background: {$button_bg_custom} !important;"); } if ($button_txt_custom) { generate_custom_style(".{$btn_index}", "color: {$button_txt_custom} !important;"); } if ($button_txt_hover_custom) { generate_custom_style(".{$btn_index}:hover", "color: {$button_txt_hover_custom} !important;"); } } } ?> <a href="<?php echo esc_url($link['url']); ?> " title="<?php echo esc_attr($link['title']); ?> " target="<?php echo esc_attr($link['target']); ?> " class="<?php echo esc_attr($css_class) . vc_shortcode_custom_css_class($css, ' ');
$header_sticky_bg_alpha = get_data('header_sticky_bg_alpha'); $sticky_immediate_activate = get_data('header_sticky_sticky_immediate'); $header_sticky_custom_logo = get_data('header_sticky_custom_logo'); $header_sticky_logo_image_id = get_data('header_sticky_logo_image_id'); $header_sticky_logo_width = get_data('header_sticky_logo_width'); $header_sticky_menu_skin = get_data('header_sticky_menu_skin'); if ($sticky_immediate_activate) { $header_classes[] = 'sticky-immediate-activate'; } if (is_numeric($header_sticky_vpadding) && $header_sticky_vpadding > 0) { generate_custom_style('.main-header.is-sticky.sticky-active', "padding-top: {$header_sticky_vpadding}px; padding-bottom: {$header_sticky_vpadding}px;", '', true); } if ($header_sticky_bg) { $hsbg_alpha = intval($header_sticky_bg_alpha); $hsbg = hex2rgba($header_sticky_bg, $hsbg_alpha / 100); generate_custom_style('.main-header.is-sticky.sticky-active', "background-color: {$hsbg};", '', true); } if ($header_sticky_custom_logo) { $header_options['stickyUseCustomLogo'] = true; $header_options['stickyCustomLogo'] = wp_get_attachment_image_src($header_sticky_logo_image_id, 'original'); $header_options['stickyCustomLogoWidth'] = $header_sticky_logo_width; } if ($header_sticky_menu_skin) { $header_options['stickyMenuBarSkin'] = $header_sticky_menu_skin; } } ?> <header class="<?php echo implode(' ', $header_classes); ?> ">
* * Laborator.co * www.laborator.co */ global $team_member_index, $columns_count, $reveal_effect, $hover_style, $img_size; # Atts $defaults = array('columns_count' => '', 'reveal_effect' => '', 'hover_style' => '', 'hover_bg' => '', 'img_size' => '', 'el_class' => ''); #$atts = vc_shortcode_attribute_parse( $defaults, $atts ); if (function_exists('vc_map_get_attributes')) { $atts = vc_map_get_attributes($this->getShortcode(), $atts); } extract($atts); $element_id = 'team-members-' . mt_rand(100000, 999999); if ($hover_bg) { generate_custom_style("#{$element_id} .member .hover-state", "background-color: {$hover_bg}"); generate_custom_style("#{$element_id} .thumb:hover .hover-state", "opacity: 1"); } # Element Class $class = $this->getExtraClass($el_class); $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts); # Thumb Size if (!preg_match("/^[0-9]+x[0-9]+\$/", $img_size)) { $img_size = "460x460"; } $thumb_size = explode("x", $img_size); # Show Team Members $team_member_index = 0; ?> <div id="<?php echo esc_attr($element_id); ?>
} # Custom Class $css_classes = array($this->getExtraClass($el_class), 'row', 'lab-blog-posts', 'posts-layout-' . $layout, vc_shortcode_custom_css_class($css)); if ($is_masonry) { $css_classes[] = 'display-loading'; } if (in_array('animated-eye-hover', $blog_posts_options)) { $css_classes[] = 'animated-eye-hover'; } $css_class = preg_replace('/\\s+/', ' ', apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode(' ', array_filter($css_classes)), $this->settings['base'], $atts)); $image_size = empty($image_size) ? '400x250' : $image_size; if ($layout == 'left') { add_filter('excerpt_length', 'laborator_supershort_excerpt_length', 150); $image_column_size = intval($image_column_size); if ($image_column_size) { generate_custom_style("#{$unique_id} .blog-post-image", "width: {$image_column_size}%"); } } ?> <div id="<?php echo $unique_id; ?> " class="<?php echo $css_class; ?> " <?php if ($is_masonry) { ?> data-masonry-mode="<?php echo $masonry; ?>
purchase_background_color purchase_text_color */ if ($header_background_color) { $header_text_color = empty($header_text_color) ? '#ffffff' : $header_text_color; generate_custom_style("#{$unique_id} .plan .plan-head", "background-color: {$header_background_color};"); generate_custom_style("#{$unique_id} .plan .plan-head *", "color: {$header_text_color};"); } if ($title_background_color) { $title_text_color = empty($title_text_color) ? '#ffffff' : $title_text_color; generate_custom_style("#{$unique_id} .plan .plan-name", "background-color: {$title_background_color};"); generate_custom_style("#{$unique_id} .plan .plan-name", "color: {$title_text_color};"); } if ($purchase_background_color) { $purchase_text_color = empty($purchase_text_color) ? '#ffffff' : $purchase_text_color; generate_custom_style("#{$unique_id} .plan .plan-action .btn", "background-color: {$purchase_background_color} !important; color: {$purchase_text_color} !important;"); } ?> <div id="<?php echo $unique_id; ?> " class="<?php echo $css_class; ?> "> <ul class="plan"> <li class="plan-head"> <p class="price"><?php echo $plan_price; ?>
if (!$img_size) { $img_size = "thumbnail"; } # Alternate Height if (is_numeric($height) && $height > 0) { $css_class .= ' alt-height'; generate_custom_style("#{$element_id} .c-logo", "height: {$height}px; line-height: {$height}px;"); } # Hover BG if ($hover_bg) { generate_custom_style("#{$element_id} .c-logo .hover-state", "background-color: {$hover_bg};"); } # Hover Text if ($hover_txt) { $hover_txt_selector = "#{$element_id} .c-logo .hover-state "; generate_custom_style("{$hover_txt_selector} p, {$hover_txt_selector} a, {$hover_txt_selector} h3", "color: {$hover_txt};"); } # Show Team Members $client_logo_index = 0; ?> <div id="<?php echo esc_attr($element_id); ?> " class="<?php echo esc_attr($css_class); ?> "> <div class="row"> <?php echo wpb_js_remove_wpautop($content); ?>
} # Item Classes $item_class[] = 'sm-half-padding-tb'; if ($portfolio_type_2_grid_spacing == 'normal') { $item_class[] = 'with-padding'; } # Hover effect style if (!in_array($hover_effect_style, array('inherit', ''))) { $portfolio_type_2_hover_effect = $hover_effect_style; } # No transparency (custom value) if (in_array($custom_hover_color_transparency, array('opacity', 'no-opacity'))) { $portfolio_type_2_hover_transparency = $custom_hover_color_transparency; } if ($custom_hover_background_color) { generate_custom_style(".post-{$portfolio_item_id} .product-box .thumb .hover-state", "background-color: {$custom_hover_background_color} !important;"); } # Set Column Width for Masonry Mode $box_size = ''; if (isset($masonry_items_list) && is_array($masonry_items_list) && count($masonry_items_list)) { foreach ($masonry_items_list as $item) { if (isset($item['item']) && $item['item'] instanceof WP_Post && $item['item']->ID == $portfolio_item_id) { $box_size = $item['box_size']; break; } } } else { if (isset($lab_vc_portfolio_items_details) && count($lab_vc_portfolio_items_details)) { foreach ($lab_vc_portfolio_items_details as $item) { if ($item['portfolio_id'] == $portfolio_item_id) { $box_size = !empty($item['box_size']) ? $item['box_size'] : '8x3';
<div class="divider-line divider-right"> <span></span> <span class="double-line"></span> </div> </div> <?php } else { $width = floatval($plain_width); $plain_style_attr = ''; if ($width && is_numeric($width) && $width > 0 && $width <= 100) { $plain_style_attr .= 'display: block; width: ' . $width . (strstr($plain_width, 'px') ? 'px' : '%') . ';'; } if ($plain_color) { $plain_style_attr .= ' border-bottom-color: ' . $plain_color; } generate_custom_style("#{$unique_id} .lab-divider-content", $plain_style_attr); ?> <div id="<?php echo $unique_id; ?> " class="lab-divider divider-plain type-<?php echo $plain_style; echo $css_class ? " {$css_class}" : ''; ?> "> <div class="lab-divider-content"></div> </div> <?php } return; ?>
} $portfolio_query = new WP_Query($portfolio_query_args); // Revert back post ordering filter if (function_exists('CPTOrderPosts') && isset($cpto_posts_orderby_removed) && $cpto_posts_orderby_removed) { add_filter('posts_orderby', 'CPTOrderPosts', 99, 2); $cpto_posts_orderby_removed = false; } $current_portfolio_category = isset($portfolio_query->query_vars['portfolio_category']) ? $portfolio_query->query_vars['portfolio_category'] : ''; // Pagination $pagination_type = get_data('portfolio_pagination_type'); $pagination_position = get_data('portfolio_pagination_position'); $max_num_pages = $portfolio_query->max_num_pages; $paged = $portfolio_query->query_vars['paged']; if ($page > $paged) { $paged = $page; } // Pagination if ($max_num_pages > 1) { $_from = 1; $_to = $max_num_pages; $current_page = $paged ? $paged : 1; $numbers_to_show = 5; list($from, $to) = generate_from_to($_from, $_to, $current_page, $max_num_pages, $numbers_to_show); } // Custom CSS if ($portfolio_type_1_hover_color) { generate_custom_style(".portfolio-holder .product-box .photo .on-hover", "background-color: {$portfolio_type_1_hover_color} !important;"); } if ($portfolio_type_2_hover_color) { generate_custom_style(".product-box .thumb .hover-state", "background-color: {$portfolio_type_2_hover_color} !important;"); }
* * Laborator.co * www.laborator.co */ # Get Portfolio Item Details include locate_template('tpls/portfolio-item-details.php'); # Hover effect style if ($hover_effect_style != 'inherit') { $portfolio_type_1_hover_effect = $hover_effect_style; } # No transparency (custom value) if (in_array($custom_hover_color_transparency, array('opacity', 'no-opacity'))) { $portfolio_type_1_hover_transparency = $custom_hover_color_transparency; } if ($custom_hover_background_color) { generate_custom_style(".portfolio-holder .post-{$portfolio_item_id} .product-box .on-hover", "background-color: {$custom_hover_background_color} !important;"); } $item_class[] = 'with-padding'; $item_class[] = 'sm-half-padding-lr'; switch ($columns_count) { case "six": $item_class[] = 'grid-two'; break; case "four": $item_class[] = 'grid-three'; break; case "three": $item_class[] = 'grid-four'; break; } # Hover State Class
<?php # Post Format - Video if ($post_format == 'video' && $post_video['content']) { ?> <?php if (isset($post_video['data']['type']) && in_array($post_video['data']['type'], array('native', 'youtube', 'vimeo'))) { $blog_post_format_parsed = true; $video_resolution = get_field('video_resolution'); if (!preg_match("/([0-9]+x[0-9]+)|([0-9]+:[0-9]+)/", $video_resolution)) { $video_resolution = '16:9'; } $video_resolution = explode('x', str_replace(':', 'x', $video_resolution)); $video_resolution_padding = $video_resolution[1] / $video_resolution[0] * 100; generate_custom_style(".post-{$post_id} .thumb .music-video-holder", "padding-top: {$video_resolution_padding}%"); wp_enqueue_script('video-js'); wp_enqueue_style('video-js'); if ($post_video['data']['type'] == 'youtube') { wp_enqueue_script('video-js-youtube'); } if ($post_video['data']['type'] == 'vimeo') { wp_enqueue_script('video-js-vimeo'); } ?> <div class="music-video-holder<?php echo " video-type-" . $post_video['data']['type']; ?> "> <?php echo $post_video['content'];
function laborator_generate_as_element($size) { global $as_element_id; if (isset($size['width'])) { $size[0] = $size['width']; } if (isset($size['height'])) { $size[1] = $size['height']; } if ($size[0] == 0) { return null; } $element_id = "arel-" . $as_element_id; $padding_top = 'padding-top: ' . number_format($size[1] / $size[0] * 100, 6) . '% !important;'; $as_element_id++; if (defined("DOING_AJAX")) { $element_id .= '-' . time() . mt_rand(10000, 999999); } generate_custom_style(".{$element_id}", $padding_top); return $element_id; }
.page-border > .left-border', "\n\tpadding: {$border_width}px; \n\tbackground: {$borders_color} !important;\n\t"); $border_width *= 2; $margin_elements = array(); $margin_elements[] = '#main-wrapper.wrapper'; $margin_elements[] = '.top-menu-container'; $margin_elements[] = '.portfolio-description-container'; $margin_elements[] = '.single-portfolio-holder .portfolio-navigation'; $margin_elements[] = '.portfolio-slider-nav'; $margin_elements[] = '.main-footer'; if (count($margin_elements)) { generate_custom_style(implode(', ', $margin_elements), "margin: {$border_width}px;"); generate_custom_style('.main-footer.fixed-footer', "left: {$border_width}px; right: {$border_width}px;"); } # Body Calculate height and min-height $border_width *= 2; generate_custom_style('body', "height: calc(100% - {$border_width}px); min-height: calc(100% - {$border_width}px);"); ?> <div class="page-border<?php echo when_match($animations == 'fade', 'wow fadeIn'); ?> " data-wow-duration="<?php echo esc_attr($animation_duration) . 's'; ?> " data-wow-delay="<?php echo esc_attr($animation_delay) . 's'; ?> "> <div class="top-border<?php echo when_match($animations == 'slide', 'wow fadeInDown'); ?> "></div>