function be_themes_background_colors($color, $opacity)
{
    $rgb = be_themes_hexa_to_rgb($color);
    $color = $rgb[0] . ',' . $rgb[1] . ',' . $rgb[2];
    echo 'background-color: rgb(' . $color . ');';
    echo 'background-color: rgba(' . $color . ',' . $opacity . ');';
}
Exemple #2
0
function be_portfolio($atts)
{
    extract(shortcode_atts(array('col' => 'three', 'show_filters' => 'yes', 'filter' => 'categories', 'category' => '', 'style' => 'show_title', 'overlay_color' => '#000000', 'pagination' => 'yes', 'items_per_page' => '12'), $atts));
    $output = '';
    $output .= '<div class="portfolio ' . $col . '-col">';
    $filter_to_use = 'portfolio_' . $filter;
    $category = explode(',', $category);
    if ($filter_to_use == 'tag' || empty($category)) {
        $terms = get_terms($filter_to_use);
    } else {
        $args_cat = array('taxonomy' => array($filter_to_use));
        $stack = array();
        foreach (get_categories($args_cat) as $single_category) {
            if (in_array($single_category->slug, $category)) {
                array_push($stack, $single_category->cat_ID);
            }
        }
        $terms = get_terms($filter_to_use, array('include' => $stack));
    }
    if (!empty($terms) && $show_filters == 'yes') {
        $output .= '<div class="filters clearfix">';
        $output .= '<span class="sort current_choice" data-id="element">All</span>';
        foreach ($terms as $term) {
            $output .= '<span class="sort" data-id="' . $term->slug . '">' . $term->name . '</span>';
        }
        $output .= '</div>';
        //end filters
    }
    $output .= '<div class="portfolio-container clickable clearfix">';
    global $paged;
    if ($paged == 0) {
        $offset = 0;
    } else {
        $offset = $items_per_page * $paged - $items_per_page;
    }
    if (empty($items_per_page)) {
        $items_per_page = -1;
    }
    if (empty($category[0])) {
        $args = array('post_type' => 'portfolio', 'posts_per_page' => $items_per_page, 'offset' => $offset, 'orderby' => 'menu_order', 'order' => 'ASC');
    } else {
        $args = array('post_type' => 'portfolio', 'posts_per_page' => $items_per_page, 'tax_query' => array(array('taxonomy' => 'portfolio_categories', 'field' => 'slug', 'terms' => $category, 'operator' => 'IN')), 'offset' => $offset, 'orderby' => 'menu_order', 'order' => 'ASC');
    }
    $the_query = new WP_Query($args);
    while ($the_query->have_posts()) {
        $the_query->the_post();
        $filter_classes = '';
        $post_terms = get_the_terms(get_the_ID(), $filter_to_use);
        if ($show_filters == 'yes' && is_array($post_terms)) {
            foreach ($post_terms as $term) {
                $filter_classes .= $term->slug . " ";
            }
        } else {
            $filter_classes = '';
        }
        $attachment_id = get_post_thumbnail_id(get_the_ID());
        if ($col == 'fullscreen') {
            $attachment_thumb = wp_get_attachment_image_src($attachment_id, 'portfolio-two');
        } else {
            $attachment_thumb = wp_get_attachment_image_src($attachment_id, 'portfolio-' . $col);
        }
        $attachment_full = wp_get_attachment_image_src($attachment_id, 'full');
        $attachment_thumb_url = $attachment_thumb[0];
        $attachment_full_url = $attachment_full[0];
        $video_url = get_post_meta($attachment_id, 'be_themes_featured_video_url', true);
        $visit_site_url = get_post_meta(get_the_ID(), 'be_themes_portfolio_visitsite_url', true);
        $link_to = get_post_meta(get_the_ID(), 'be_themes_portfolio_link_to', true);
        $thumb_options = get_post_meta(get_the_ID(), 'be_themes_thumbnail_lightbox', true);
        $permalink = '';
        if (isset($link_to) && $link_to != 'no_link') {
            if ($link_to == 'external_url') {
                $permalink = $visit_site_url;
            } else {
                $permalink = get_permalink();
            }
        }
        $mfp_class = 'mfp-image';
        if (!empty($video_url)) {
            $attachment_full_url = $video_url;
            $mfp_class = 'mfp-iframe';
        }
        if (isset($thumb_options) && $thumb_options == 'gallery') {
            $thumb_class = 'be-lightbox';
        } else {
            $thumb_class = 'image-popup-vertical-fit';
        }
        if ($col == 'one') {
            $output .= '<div class="element clearfix ' . $filter_classes . '">';
            $output .= '<div class="be-row clearfix">';
            $output .= '<div class="one-half column-block be-hoverlay"><div class="element-inner"><div class="thumb-wrap"><img src="' . $attachment_thumb_url . '" alt />';
            $output .= '<div class="thumb-overlay"><div class="thumb-bg">';
            $output .= '<div class="thumb-icons">';
            if (!empty($permalink)) {
                $output .= '<a href="' . $permalink . '"><i class="font-icon icon-link"></i></a>';
            }
            $output .= '<a href="' . $attachment_full_url . '" class="' . $thumb_class . ' ' . $mfp_class . '"><i class="font-icon icon-search"></i></a>';
            if (isset($thumb_options) && $thumb_options == 'gallery') {
                $output .= '<div class="popup-gallery">';
                $attachment_args = array('post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => 'any', 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => 'ASC');
                $attachments = get_posts($attachment_args);
                foreach ($attachments as $att) {
                    $video_url = get_post_meta($att->ID, 'be_themes_featured_video_url', true);
                    $mfp_class = 'mfp-image';
                    if (!empty($video_url)) {
                        $url = $video_url;
                        $mfp_class = 'mfp-iframe';
                    } else {
                        $url = wp_get_attachment_image_src($att->ID, 'full');
                        $url = $url[0];
                    }
                    $output .= '<a href="' . $url . '" class="' . $mfp_class . '"></a>';
                }
                $output .= '</div>';
            }
            $output .= '</div>';
            // end thumb icons
            $output .= '</div></div>';
            //end thumb overlay & bg
            $output .= '</div>';
            //end thumb wrap
            $output .= '</div>';
            // end element-inner
            $output .= '</div>';
            // one-half
            $output .= '<div class="one-half column-block">';
            $output .= '<div class="portfolio-content-wrap">';
            $output .= '<h3 class="portfolio-title"><a href="' . $permalink . '">' . get_the_title() . '</a></h3>';
            $output .= '<ul class="secondary_text portfolio-categories clearfix">';
            if (is_array($post_terms)) {
                foreach ($post_terms as $term) {
                    $output .= '<li>' . $term->name . '</li>';
                }
            }
            $output .= '</ul>';
            $output .= '<div class="portfolio-content">' . get_the_excerpt() . '</div>';
            $output .= do_shortcode('[button button_text= "Learn More" type= "small" gradient= "1" rounded= "1" icon= "" color= "#00bfd7" hover= "#00bfd7" url="' . get_permalink(get_the_ID()) . '" ]');
            if (!empty($visit_site_url)) {
                $output .= do_shortcode('[button button_text= "Visit Site" type= "small" gradient= "1" rounded= "1" icon= "" color= "#00bfd7" hover= "#00bfd7" url="' . get_permalink(get_the_ID()) . '" ]');
            }
            $output .= '</div>';
            $output .= '</div>';
            // end one half
            $output .= '</div>';
            //end row
            $output .= do_shortcode('[separator style= "style-1" ]');
            $output .= '</div>';
            //end element
        } else {
            $output .= '<div class="element be-hoverlay ' . $filter_classes . '">';
            $output .= '<div class="element-inner">';
            switch ($style) {
                case 'no_title':
                    $output .= '<div class="thumb-wrap"><img src="' . $attachment_thumb_url . '" alt />';
                    $output .= '<div class="thumb-overlay"><div class="thumb-bg">';
                    $output .= '<div class="thumb-icons">';
                    if (!empty($permalink)) {
                        $output .= '<a href="' . $permalink . '"><i class="font-icon icon-link"></i></a>';
                    }
                    $output .= '<a href="' . $attachment_full_url . '" class="' . $thumb_class . ' ' . $mfp_class . '"><i class="font-icon icon-search"></i></a>';
                    if (isset($thumb_options) && $thumb_options == 'gallery') {
                        $output .= '<div class="popup-gallery">';
                        $attachment_args = array('post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => 'any', 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => 'ASC');
                        $attachments = get_posts($attachment_args);
                        foreach ($attachments as $att) {
                            $video_url = get_post_meta($att->ID, 'be_themes_featured_video_url', true);
                            $mfp_class = 'mfp-image';
                            if (!empty($video_url)) {
                                $url = $video_url;
                                $mfp_class = 'mfp-iframe';
                            } else {
                                $url = wp_get_attachment_image_src($att->ID, 'full');
                                $url = $url[0];
                            }
                            $output .= '<a href="' . $url . '" class="' . $mfp_class . '"></a>';
                        }
                        $output .= '</div>';
                    }
                    $output .= '</div>';
                    // end thumb icons
                    $output .= '</div></div>';
                    //end thumb overlay & bg
                    $output .= '</div>';
                    //end thumb wrap
                    break;
                case 'show_title':
                    $output .= '<div class="thumb-wrap"><img src="' . $attachment_thumb_url . '" alt />';
                    $output .= '<div class="thumb-overlay"><div class="thumb-bg">';
                    $output .= '<div class="thumb-icons">';
                    if (!empty($permalink)) {
                        $output .= '<a href="' . $permalink . '"><i class="font-icon icon-link"></i></a>';
                    }
                    $output .= '<a href="' . $attachment_full_url . '" class="' . $thumb_class . ' ' . $mfp_class . '"><i class="font-icon icon-search"></i></a>';
                    if (isset($thumb_options) && $thumb_options == 'gallery') {
                        $output .= '<div class="popup-gallery">';
                        $attachment_args = array('post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => 'any', 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => 'ASC');
                        $attachments = get_posts($attachment_args);
                        foreach ($attachments as $att) {
                            $video_url = get_post_meta($att->ID, 'be_themes_featured_video_url', true);
                            $mfp_class = 'mfp-image';
                            if (!empty($video_url)) {
                                $url = $video_url;
                                $mfp_class = 'mfp-iframe';
                            } else {
                                $url = wp_get_attachment_image_src($att->ID, 'full');
                                $url = $url[0];
                            }
                            $output .= '<a href="' . $url . '" class="' . $mfp_class . '"></a>';
                        }
                        $output .= '</div>';
                    }
                    $output .= '</div>';
                    // end thumb icons
                    $output .= '</div></div>';
                    //end thumb overlay & bg
                    $output .= '</div>';
                    //end thumb wrap
                    $output .= '<div class="sec-bg portfolio-title"><h5 class="sec-title-color">';
                    if (empty($permalink)) {
                        $permalink = '#';
                    }
                    $output .= '<a href="' . $permalink . '">' . get_the_title() . '</a>';
                    $output .= '</h5></div>';
                    break;
                case 'overlay_title':
                    $rgb_color = be_themes_hexa_to_rgb($overlay_color);
                    $output .= '<div class="thumb-wrap"><img src="' . $attachment_thumb_url . '" alt />';
                    $output .= '<div class="thumb-overlay" style="background:' . $overlay_color . ';background-color:rgba(' . $rgb_color[0] . ',' . $rgb_color[1] . ',' . $rgb_color[2] . ',0.8);"><div class="thumb-bg act-table">';
                    $output .= '<div class="overlay-thumb-title-wrap"><div class="overlay-thumb-title"><h5>';
                    if (empty($permalink)) {
                        $permalink = '#';
                    }
                    $output .= '<a href="' . $permalink . '">' . get_the_title() . '</a>';
                    $output .= '</h5><hr />';
                    $output .= '<span class="overlay-cats">';
                    $cat = array();
                    if (is_array($post_terms)) {
                        foreach ($post_terms as $term) {
                            array_push($cat, $term->name);
                        }
                    }
                    $output .= implode(', ', $cat) . '</span></div></div>';
                    $output .= '<div class="overlay-thumb-icons">';
                    if (!empty($permalink) && $link_to != 'no_link') {
                        $output .= '<a href="' . $permalink . '"><i class="font-icon icon-link"></i></a>';
                    }
                    $output .= '<a href="' . $attachment_full_url . '" class="' . $thumb_class . ' ' . $mfp_class . '"><i class="font-icon icon-search"></i></a>';
                    if (isset($thumb_options) && $thumb_options == 'gallery') {
                        $output .= '<div class="popup-gallery">';
                        $attachment_args = array('post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => 'any', 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => 'ASC');
                        $attachments = get_posts($attachment_args);
                        foreach ($attachments as $att) {
                            $video_url = get_post_meta($att->ID, 'be_themes_featured_video_url', true);
                            $mfp_class = 'mfp-image';
                            if (!empty($video_url)) {
                                $url = $video_url;
                                $mfp_class = 'mfp-iframe';
                            } else {
                                $url = wp_get_attachment_image_src($att->ID, 'full');
                                $url = $url[0];
                            }
                            $output .= '<a href="' . $url . '" class="' . $mfp_class . '"></a>';
                        }
                        $output .= '</div>';
                    }
                    $output .= '</div>';
                    // end thumb icons
                    $output .= '</div></div>';
                    //end thumb overlay & bg
                    $output .= '</div>';
                    //end thumb wrap
                //end thumb wrap
                default:
                    # code...
                    break;
            }
            $output .= '</div>';
            //end element inner
            $output .= '</div>';
            //end element
        }
    }
    wp_reset_postdata();
    $output .= '</div>';
    //end portfolio-container
    if ($pagination == 'yes') {
        $output .= '<div class="pagination_parent">' . get_be_themes_pagination($the_query->max_num_pages) . '</div>';
        //End  Pagination
    }
    $output .= '</div>';
    //end portfolio
    return $output;
}
Exemple #3
0
 function be_animate_icon_style1($atts, $content)
 {
     extract(shortcode_atts(array('icon' => 'none', 'size' => 30, 'icon_color' => '', 'link_to_url' => '', 'height' => '', 'bg_image' => '', 'bg_color' => '', 'hover_bg_color' => '', 'bg_overlay' => 0, 'overlay_color' => '', 'overlay_opacity' => '', 'hover_overlay_color' => '', 'hover_overlay_opacity' => '', 'animate_direction' => 'top'), $atts));
     $link_to_url = isset($link_to_url) && !empty($link_to_url) ? $link_to_url : '#';
     $bg_color = isset($bg_color) && !empty($bg_color) ? $bg_color : 'transparent';
     $hover_bg_color = isset($hover_bg_color) && !empty($hover_bg_color) ? $hover_bg_color : $bg_color;
     $animate_direction = isset($animate_direction) && !empty($animate_direction) ? $animate_direction : 'top';
     $bg_overlay_class = isset($bg_overlay) && 1 == $bg_overlay ? 'be-bg-overlay' : '';
     if (isset($bg_image) && !empty($bg_image)) {
         $attachment_info = wp_get_attachment_image_src($bg_image, 'full');
         $attachment_url = $attachment_info[0];
         $bg_image = 'background: url(' . $attachment_url . ') no-repeat center center;';
     } else {
         $bg_image = '';
     }
     $output = '';
     $output .= '<a href="' . $link_to_url . '" class="animate-icon-module-style1 be-bg-cover animate-icon-module ' . $bg_overlay_class . ' ' . $animate_direction . '-animate" data-bg-color="' . $bg_color . '" data-hover-bg-color="' . $hover_bg_color . '" style="background-color: ' . $bg_color . '; ' . $bg_image . '">';
     $output .= '<div class="animate-icon-module-normal-content"><div class="display-table"><div class="display-table-cell vertical-align-middle"><i class="font-icon ' . $icon . '" style="font-size: ' . $size . 'px;color: ' . $icon_color . ';"></i></div></div></div>';
     $output .= '<div class="animate-icon-module-hover-content"><div class="display-table"><div class="display-table-cell vertical-align-middle">' . $content . '</div></div></div>';
     if (isset($bg_overlay) && 1 == $bg_overlay && isset($bg_image) && !empty($bg_image)) {
         $opacity = '';
         if (isset($overlay_color) && !empty($overlay_color)) {
             $global_overlay_color = $overlay_color = be_themes_hexa_to_rgb($overlay_color);
         } else {
             $global_overlay_color = $overlay_color = be_themes_hexa_to_rgb('#000000');
             $overlay_opacity = 0;
         }
         $overlay_opacity = isset($overlay_opacity) ? $overlay_opacity : '80';
         $overlay_color = 'rgba(' . $overlay_color[0] . ',' . $overlay_color[1] . ',' . $overlay_color[2] . ', ' . floatval($overlay_opacity / 100) . ')';
         $hover_overlay_color = isset($hover_overlay_color) && !empty($hover_overlay_color) ? be_themes_hexa_to_rgb($hover_overlay_color) : $global_overlay_color;
         $hover_overlay_opacity = isset($hover_overlay_opacity) ? $hover_overlay_opacity : $overlay_opacity;
         $hover_overlay_color = 'rgba(' . $hover_overlay_color[0] . ',' . $hover_overlay_color[1] . ',' . $hover_overlay_color[2] . ', ' . floatval($hover_overlay_opacity / 100) . ')';
         $output .= '<div class="section-overlay" style="background: ' . $overlay_color . ';" data-default-bg-color="' . $overlay_color . '" data-hover-bg-color="' . $hover_overlay_color . '"></div>';
     }
     $output .= '</a>';
     return $output;
 }
Exemple #4
0
     $data_source = 'video';
 } else {
     $data_source = $attach_img[0];
 }
 echo '<div class="placeholder style4_placehloder load center show-title" data-source="' . $data_source . '" style="height: ' . $slide_height . '">';
 if ($video_url) {
     echo be_gal_video($video_url);
 }
 if (isset($overlay) && $overlay == 1) {
     $overlay_color = get_post_meta(get_the_ID(), 'be_themes_single_horizontal_slider_overlay_color', true);
     $overlay_opacity = get_post_meta(get_the_ID(), 'be_themes_single_horizontal_slider_overlay_color_opacity', true);
     if (!isset($overlay_opacity) || empty($overlay_opacity)) {
         $overlay_opacity = 85;
     }
     if (isset($overlay_color) && !empty($overlay_color)) {
         $overlay_color = be_themes_hexa_to_rgb($overlay_color);
         $thumb_overlay_color = 'rgba(' . $overlay_color[0] . ',' . $overlay_color[1] . ',' . $overlay_color[2] . ',' . intval($overlay_opacity) / 100 . ')';
     } else {
         $thumb_overlay_color = '';
     }
     echo '<div class="overlay_placeholder" style="background: ' . $thumb_overlay_color . ';"></div>';
 }
 $attachment_details = be_wp_get_attachment($attachment_id);
 if (isset($attachment_details['description']) && !empty($attachment_details['description'])) {
     $external_link = get_post_meta($attachment_id, 'be_themes_external_link', true);
     if (!isset($external_link) || empty($external_link)) {
         $external_link = '#';
     }
     echo '<div class="attachment-details attachment-details-custom-slider special-subtitle animated"><a href="' . $external_link . '" target="_blank">' . $attachment_details['description'] . '</a></div>';
 }
 echo '</div>';
 function be_themes_get_ajax_full_screen_gutter_portfolio()
 {
     extract($_POST);
     $output = '';
     $global_thumb_overlay_color = $thumb_overlay_color;
     $global_gradient_style_color = $gradient_style_color;
     if (isset($title_color) && !empty($title_color)) {
         $global_title_color = $title_color = $title_color;
     } else {
         $global_title_color = $title_color = '';
     }
     if (isset($cat_color) && !empty($cat_color)) {
         $global_cat_color = $cat_color = $cat_color;
     } else {
         $global_cat_color = $cat_color = '';
     }
     $filter_to_use = 'portfolio_' . $filter;
     $offset = $showposts * $paged - $showposts;
     if ($paged == 0) {
         $offset = 0;
     } else {
         $offset = $showposts * $paged - $showposts;
     }
     $selected_categorey = explode(',', $category);
     if ($category) {
         $args = array('post_type' => 'portfolio', 'posts_per_page' => intval($showposts), 'offset' => intval($offset), 'tax_query' => array(array('taxonomy' => 'portfolio_categories', 'field' => 'slug', 'terms' => $selected_categorey, 'operator' => 'IN')), 'orderby' => apply_filters('be_portfolio_order_by', 'date'), 'order' => apply_filters('be_portfolio_order', 'DESC'), 'post_status' => 'publish');
     } else {
         $args = array('post_type' => 'portfolio', 'posts_per_page' => intval($showposts), 'offset' => intval($offset), 'orderby' => apply_filters('be_portfolio_order_by', 'date'), 'order' => apply_filters('be_portfolio_order', 'DESC'), 'post_status' => 'publish');
     }
     $the_query = new WP_Query($args);
     if ($the_query->have_posts()) {
         while ($the_query->have_posts()) {
             $the_query->the_post();
             $filter_classes = $permalink = '';
             $mfp_class = 'mfp-image';
             $post_terms = get_the_terms(get_the_ID(), $filter_to_use);
             if ($show_filters == 'yes' && is_array($post_terms)) {
                 foreach ($post_terms as $term) {
                     $filter_classes .= $term->slug . " ";
                 }
             } else {
                 $filter_classes = '';
             }
             $attachment_id = get_post_thumbnail_id(get_the_ID());
             $image_atts = get_portfolio_image(get_the_ID(), $col, $masonry);
             $attachment_thumb = wp_get_attachment_image_src($attachment_id, $image_atts['size']);
             $attachment_full = wp_get_attachment_image_src($attachment_id, 'full');
             $attachment_thumb_url = $attachment_thumb[0];
             $attachment_full_url = $attachment_full[0];
             $video_url = get_post_meta($attachment_id, 'be_themes_featured_video_url', true);
             $visit_site_url = get_post_meta(get_the_ID(), 'be_themes_portfolio_external_url', true);
             $link_to = get_post_meta(get_the_ID(), 'be_themes_portfolio_link_to', true);
             $open_with = get_post_meta(get_the_ID(), 'be_themes_portfolio_single_page_style', true);
             $single_overlay_color = get_post_meta(get_the_ID(), 'be_themes_single_overlay_color', true);
             $single_overlay_opacity = get_post_meta(get_the_ID(), 'be_themes_single_overlay_color_opacity', true);
             $single_title_color = get_post_meta(get_the_ID(), 'be_themes_single_overlay_title_color', true);
             $single_cat_color = get_post_meta(get_the_ID(), 'be_themes_single_overlay_cat_color', true);
             $attachment_info = be_wp_get_attachment($attachment_id);
             if (!isset($visit_site_url) || empty($visit_site_url)) {
                 $visit_site_url = '#';
             }
             $permalink = $link_to == 'external_url' ? $visit_site_url : get_permalink();
             $target = "1" == get_post_meta(get_the_ID(), 'be_themes_portfolio_open_new_tab', true) ? 'target="_blank"' : '';
             if (isset($single_overlay_opacity) && !empty($single_overlay_opacity)) {
                 $overlay_opacity = $single_overlay_opacity;
             } else {
                 $overlay_opacity = 85;
             }
             if (isset($single_overlay_color) && !empty($single_overlay_color)) {
                 $single_overlay_color = be_themes_hexa_to_rgb($single_overlay_color);
                 $thumb_overlay_color = 'rgba(' . $single_overlay_color[0] . ',' . $single_overlay_color[1] . ',' . $single_overlay_color[2] . ',' . intval($overlay_opacity) / 100 . ')';
                 $gradient_style_color = '';
             } else {
                 $thumb_overlay_color = $global_thumb_overlay_color;
                 $gradient_style_color = $global_gradient_style_color;
             }
             if (isset($single_title_color) && !empty($single_title_color)) {
                 $title_color = $single_title_color;
             } else {
                 $title_color = $global_title_color;
             }
             if (isset($single_cat_color) && !empty($single_cat_color)) {
                 $cat_color = $single_cat_color;
             } else {
                 $cat_color = $global_cat_color;
             }
             if (!empty($video_url)) {
                 $attachment_full_url = $video_url;
                 $mfp_class = 'mfp-iframe';
             }
             if ($link_to != 'external_url' && isset($open_with) && $open_with == 'lightbox-gallery') {
                 $thumb_class = 'be-lightbox-gallery';
             } else {
                 if ($link_to != 'external_url' && isset($open_with) && $open_with == 'lightbox') {
                     $thumb_class = 'image-popup-vertical-fit';
                 } else {
                     if ($link_to != 'external_url' && isset($open_with) && $open_with == 'none') {
                         $thumb_class = 'no-link';
                         $attachment_full_url = '#';
                     } else {
                         $thumb_class = $link_to == 'external_url' || !empty($target) ? '' : 'dJAX_internal';
                         $mfp_class = '';
                         $attachment_full_url = $permalink;
                     }
                 }
             }
             if ($hover_style == 'style9-hover') {
                 $trigger_animation = '';
             } else {
                 $trigger_animation = 'animation-trigger';
             }
             $link_to_thumbnail = $attachment_full_url;
             $terms = be_themes_get_taxonomies_by_id(get_the_ID(), 'portfolio_categories');
             $element_classes = '';
             foreach ($terms as $term) {
                 $element_classes .= $term->slug . ' ';
             }
             $output .= '<div class="element be-hoverlay ' . $filter_classes . ' ' . $element_classes . $image_atts['class'] . ' ' . $image_atts['alt_class'] . ' ' . $hover_style . ' ' . $img_grayscale . ' ' . $title_style . '-title" id="' . be_get_the_slug(get_the_ID()) . '" style="margin-bottom: ' . $gutter_width . 'px !important;">';
             $output .= '<div class="element-inner" style="margin-left: ' . $gutter_width . 'px;">';
             $output .= '<a href="' . $link_to_thumbnail . '" data-href="' . $attachment_full_url . '" class="thumb-wrap ' . $thumb_class . ' ' . $mfp_class . '" title="' . $attachment_info['title'] . '" ' . $target . '>';
             $output .= '<div class="flip-wrap"><div class="flip-img-wrap ' . $image_effect . '-effect"><img src="' . $attachment_thumb_url . '" alt /></div></div>';
             $output .= '<div class="thumb-overlay"><div class="thumb-bg" style="background-color:' . $thumb_overlay_color . '; ' . $gradient_style_color . '">';
             $output .= '<div class="thumb-title-wrap ">';
             $output .= '<div class="thumb-title be-animate animated ' . $trigger_animation . '" data-animation-type="' . $title_animation_type . '" style="color: ' . $title_color . ';">' . get_the_title() . '</div>';
             if (!empty($terms) && (isset($cat_hide) && !$cat_hide)) {
                 $output .= '<div class="portfolio-item-cats be-animate animated ' . $trigger_animation . '" data-animation-type="' . $cat_animation_type . '" style="color: ' . $cat_color . ';">';
                 $length = 1;
                 foreach ($terms as $term) {
                     $output .= '<span>' . $term->name . '</span>';
                     if (count($terms) != $length) {
                         $output .= '<span>, </span>';
                     }
                     $length++;
                 }
                 $output .= '</div>';
             }
             $output .= '</div>';
             $output .= '</div></div>';
             //End Thumb Bg & Thumb Overlay
             $output .= '</a>';
             //End Thumb Wrap
             if (isset($open_with) && $open_with == 'lightbox-gallery') {
                 $output .= '<div class="popup-gallery">';
                 $attachments = get_post_meta(get_the_ID(), 'be_themes_single_portfolio_slider_images');
                 if (!empty($attachments)) {
                     foreach ($attachments as $attachment_id) {
                         $attach_img = wp_get_attachment_image_src($attachment_id, 'full');
                         $video_url = get_post_meta($attachment_id, 'be_themes_featured_video_url', true);
                         $attachment_info = be_wp_get_attachment($attachment_id);
                         if ($video_url) {
                             $url = $video_url;
                             $mfp_class = 'mfp-iframe';
                         } else {
                             $url = $attach_img[0];
                             $mfp_class = 'mfp-image';
                         }
                         $output .= '<a href="' . $url . '" class="' . $mfp_class . '" title="' . $attachment_info['title'] . '"></a>';
                     }
                 }
                 $output .= '</div>';
                 //End Gallery
             }
             $output .= be_get_like_button(get_the_ID());
             $output .= '</div>';
             //End Element Inner
             $output .= '</div>';
             //End Element
         }
         wp_reset_postdata();
         echo $output;
     } else {
         return 0;
     }
     die;
 }
      line-height: 30px;
    }    
}
.loader-style1-double-bounce1, .loader-style1-double-bounce2,
.loader-style2-wrap,
.loader-style3-wrap > div,
.loader-style5-wrap .dot1, .loader-style5-wrap .dot2,
#nprogress .bar {
  background: <?php 
echo $be_themes_data['color_scheme'];
?>
 !important; 
}
.loader-style4-wrap {
  <?php 
$loader_color = be_themes_hexa_to_rgb($be_themes_data['color_scheme']);
?>
  border-top: 7px solid rgba(<?php 
echo $loader_color[0] . ', ' . $loader_color[1] . ', ' . $loader_color[2];
?>
 , 0.3);
  border-right: 7px solid rgba(<?php 
echo $loader_color[0] . ', ' . $loader_color[1] . ', ' . $loader_color[2];
?>
 , 0.3);
  border-bottom: 7px solid rgba(<?php 
echo $loader_color[0] . ', ' . $loader_color[1] . ', ' . $loader_color[2];
?>
 , 0.3);
  border-left-color: <?php 
echo $be_themes_data['color_scheme'];
function be_themes_get_background_colors($color, $opacity)
{
    $rgb = be_themes_hexa_to_rgb($color);
    $color = $rgb[0] . ',' . $rgb[1] . ',' . $rgb[2];
    $output = '';
    $output .= 'background-color: rgb(' . $color . ');';
    $output .= 'background-color: rgba(' . $color . ',' . $opacity . ');';
    return $output;
}