Example #1
0
 public static function get_instance()
 {
     if (!self::$instance) {
         self::$instance = new DT_Shortcode_Portfolio();
     }
     return self::$instance;
 }
Example #2
0
            $config->set('image_layout', $atts['proportion'] ? 'resize' : 'original');
            $config->set('thumb_proportions', $atts['proportion']);
            $config->set('post.preview.width.min', $atts['column_width']);
            $config->set('post.preview.description.style', $atts['descriptions']);
            $config->set('post.preview.description.alignment', $atts['content_aligment']);
            $config->set('post.preview.hover.animation', $atts['hover_animation']);
            $config->set('post.preview.hover.color', $atts['hover_bg_color']);
            $config->set('post.preview.hover.content.visibility', $atts['hover_content_visibility']);
            $config->set('post.preview.load.effect', $atts['loading_effect'], 'fade_in');
            if ('under_image' == $atts['descriptions']) {
                $config->set('post.preview.background.enabled', !in_array($atts['bg_under_projects'], array('disabled', '')));
                $config->set('post.preview.background.style', $atts['bg_under_projects']);
            } else {
                $config->set('post.preview.background.enabled', false);
                $config->set('post.preview.background.style', false);
            }
            $config->set('post.meta.fields.date', $atts['show_date']);
            $config->set('post.meta.fields.categories', $atts['show_categories']);
            $config->set('post.meta.fields.comments', $atts['show_comments']);
            $config->set('post.meta.fields.author', $atts['show_author']);
            $config->set('template.columns.number', $atts['columns']);
            $config->set('template.posts_filter.terms.enabled', $atts['show_filter']);
            $config->set('template.posts_filter.orderby.enabled', $atts['show_orderby']);
            $config->set('template.posts_filter.order.enabled', $atts['show_order']);
            $config->set('order', $atts['order']);
            $config->set('orderby', $atts['orderby']);
        }
    }
    // create shortcode
    DT_Shortcode_Portfolio::get_instance();
}