'' ) , $atts) ); /* no id has been set , nothing more to do here */ if( empty($id) ) return; /* set token */ self::$token = $id; /* set cache */ self::$cache = ( get_option('portfolio_cache_mode') == 'on' ) ? '&c=1' : ''; /* get portfolio type */ $ut_portfolio_type = get_post_meta( self::$token , 'ut_portfolio_type' , true ); /* |-------------------------------------------------------------------------- | Showcase Gallery |-------------------------------------------------------------------------- */ if( $ut_portfolio_type == 'ut_showcase' ) { self::$add_showcase_script = true; add_action( 'wp_footer' , array(__CLASS__, 'enqueue_showcase_scripts') ); /* create showcase gallery */ return self::create_showcase_gallery(); } /* |-------------------------------------------------------------------------- | Portfolio Carousel |-------------------------------------------------------------------------- */ if( $ut_portfolio_type == 'ut_carousel' ) { self::$add_showcase_script = true; add_action( 'wp_footer' , array(__CLASS__, 'enqueue_showcase_scripts') ); /* create showcase gallery */ return self::create_portfolio_carousel(); } /* |-------------------------------------------------------------------------- | Grid / Masonry Gallery |-------------------------------------------------------------------------- */ if( $ut_portfolio_type == 'ut_masonry' ) { self::$add_masonry_script = true; add_action( 'wp_footer' , array(__CLASS__, 'enqueue_masonry_scripts') ); /* create masonry gallery */ return self::create_masonry_gallery(); } /* |-------------------------------------------------------------------------- | Portfolio Filterable Gallery |-------------------------------------------------------------------------- */ if( $ut_portfolio_type == 'ut_gallery' ) { self::$add_gallery_script = true; add_action( 'wp_footer' , array(__CLASS__, 'enqueue_gallery_scripts') ); /* create masonry gallery */ return self::create_portfolio_gallery(); } } /* |-------------------------------------------------------------------------- | Create hidden slide / popup gallery for all gallery types |-------------------------------------------------------------------------- */ static function create_hidden_popup_portfolio( $portfolio_args = array() , $image_style = "" ) { /* no query args - we leave here */ if(empty($portfolio_args)) { return; } /* create hidden portfolio */ $hidden_portfolio = '