Exemplo n.º 1
0
/**
 * Body classes
 * -----------------------------------------------------------------------------
 */
function thb_portfolio_body_classes($classes)
{
    if (!thb_portfolio_framework_check()) {
        return;
    }
    $thb_portfolio_grid_templates = thb_portfolio_config('grid_templates');
    $grid_body_class = thb_config('backpack/layout', 'grid_body_class');
    if ($grid_body_class && thb_is_page_template($thb_portfolio_grid_templates)) {
        $classes[] = thb_get_grid_class_name(thb_get_grid_columns());
    }
    return $classes;
}
Exemplo n.º 2
0
 function thb_single_work_overlay()
 {
     if (thb_is_page_template('template-portfolio.php')) {
         thb_get_template_part('part-single-work-overlay');
     }
 }
Exemplo n.º 3
0
 function thb_slideshow()
 {
     // $config = thb_config('core/slideshows');
     $page_id = thb_get_page_ID();
     $slideshow_shortcode = thb_get_post_meta($page_id, 'slideshow');
     if (empty($slideshow_shortcode)) {
         return;
     }
     if (thb_text_contains($slideshow_shortcode, 'thb_')) {
         $slideshow_id = thb_get_shortcode_attribute($slideshow_shortcode, 'id');
         $thb_slideshow = new THB_Slideshow($slideshow_id);
         $slideshow_type = $thb_slideshow->getType();
         if (thb_is_page_template(thb_config('core/slideshows/submodules/' . $slideshow_type, 'templates'))) {
             if (!empty($slideshow_shortcode) && trim($slideshow_shortcode) != '') {
                 echo thb_do_shortcode($slideshow_shortcode);
             }
         }
     } else {
         echo thb_do_shortcode($slideshow_shortcode);
     }
 }