Exemplo n.º 1
0
function get_page_options_less_vars()
{
    global $post;
    if (isset($post->ID)) {
        $less_vars = tt_getmeta("less_page_variables", $post->ID);
        if (!empty($less_vars)) {
            $array_var = unserialize(base64_decode($less_vars));
            if (is_array($array_var)) {
                return $array_var;
            }
        }
    }
    return array();
}
Exemplo n.º 2
0
if (tt_getmeta('title_show') != '0') {
    $title_style = '';
    $title_classes = '';
    /* prepare variables
    	==============================*/
    $teaser = tt_getmeta('teaser');
    $title_bg_color = tt_getmeta('title_bg_color');
    $title_bg = get_bg_values(tt_getmeta('title_bg'));
    $title_align = tt_getmeta('title_align');
    $title_dark = tt_getmeta('title_color');
    $title_padding = (int) tt_getmeta('title_padding');
    $title_padding_bottom = (int) tt_getmeta('title_padding_bottom');
    $title_attr = '';
    $title_overlay = '';
    $title_overlay_color = tt_getmeta('title_overlay_color');
    $title_overlay_opacity = tt_getmeta('title_overlay_opacity');
    /* set title background color
    	==============================*/
    if ($title_bg_color != '') {
        $title_style .= 'background-color: ' . $title_bg_color . ';';
    }
    /* set background image
    	==============================*/
    if ($title_bg['url'] != '') {
        $title_style .= 'background-image: url(' . $title_bg['url'] . ');';
        $title_style .= 'background-position: ' . $title_bg['position'] . ';';
        if ($title_bg['repeat'] == 'cover') {
            $title_style .= "background-repeat: no-repeat; background-size:cover;";
        } else {
            $title_style .= 'background-repeat: ' . $title_bg['repeat'] . ';';
        }
Exemplo n.º 3
0
function blox_blog_row_parse_hook($atts)
{
    extract(shortcode_atts(array('categories' => '', 'column' => '4', 'count' => '8', 'bgcolor' => '#34495e', 'ratio' => '4x3', 'filter' => '1', 'order' => '', 'exclude' => '', 'extra_class' => '', 'visibility' => ''), $atts));
    $visibility = str_replace(',', ' ', $visibility);
    global $query, $post, $paged;
    $temp_qry = $query;
    $temp_post = $post;
    wp_reset_query();
    wp_reset_postdata();
    /* Build queries
       ================================================*/
    $args = array('post__not_in' => explode(',', $exclude), 'posts_per_page' => (int) $count);
    if ($categories != '') {
        $args['cat'] = explode(',', $categories);
    }
    if ($order == 'dateasc') {
        $args['orderby'] = 'date';
        $args['order'] = 'ASC';
    } elseif ($order == 'titleasc') {
        $args['orderby'] = 'title';
        $args['order'] = 'ASC';
    } elseif ($order == 'titledes') {
        $args['orderby'] = 'title';
        $args['order'] = 'DESC';
    } elseif ($order == 'comment') {
        $args['orderby'] = 'comment_count';
    } elseif ($order == 'postid') {
        $args['orderby'] = 'ID';
    } elseif ($order == 'random') {
        $args['orderby'] = 'rand';
        add_action('posts_orderby', 'edit_posts_orderby');
    }
    $result = '';
    $query = new WP_Query($args);
    if ($query->have_posts()) {
        $cats_filter = array();
        $item_number = 0;
        while ($query->have_posts()) {
            $query->the_post();
            $item_number++;
            $image_width = 539;
            $current_filter_classes = '';
            $terms = wp_get_post_categories(get_the_ID());
            foreach ($terms as $term) {
                $term = get_category($term);
                $current_filter_classes .= 'filter-' . $term->slug . ' ';
                $temp_cat = array('id' => $term->term_id, 'title' => $term->name, 'slug' => $term->slug);
                if (!in_array($temp_cat, $cats_filter)) {
                    $cats_filter[] = $temp_cat;
                }
            }
            $thumb = '';
            if (has_post_thumbnail(get_the_ID())) {
                $fimage = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full');
                $thumb = $fimage[0];
            } else {
                $gallery_field = tt_getmeta('blog_gallery');
                $gimages = explode(',', $gallery_field);
                if (isset($gimages[0]) && $gimages[0] != '') {
                    $thumb = wp_get_attachment_url($gimages[0]);
                    $thumb = $thumb !== false ? $thumb : THEME_NOIMAGE;
                }
            }
            $iwidth = 600;
            $iheight = 450;
            if ($ratio == '1x1') {
                $iwidth = 600;
                $iheight = 600;
            } else {
                if ($ratio == '16x9') {
                    $iwidth = 600;
                    $iheight = 337;
                }
            }
            $thumb = $thumb != '' ? blox_aq_resize($thumb, $iwidth, $iheight, true) : '';
            $folio_arg = array('item_style' => 'alternative', 'thumb' => $thumb, 'class' => ' ' . $current_filter_classes);
            $result .= blox_loop_portfolio($folio_arg);
        }
        $filter_html = '';
        if ($filter == '1') {
            $cat_filter_html = '';
            foreach ($cats_filter as $cat) {
                $cat_filter_html .= '<li><a href="javascript:;" title="' . $cat['title'] . '" data-filter="filter-' . $cat['slug'] . '">' . $cat['title'] . '</a></li>';
            }
            if ($cat_filter_html != '') {
                $filter_html = '<div class="row">
                                    <div class="col-md-12">
                                        <div class="portfolio-filter">
                                            <div class="pull-left">
                                                <h3>' . __('All', 'themeton') . '</h3>
                                            </div>
                                            <div class="pull-right">
                                                <ul class="nav nav-pills">
                                                    <li class="dropdown active">
                                                        <a class="dropdown-toggle navInst" data-toggle="dropdown" href="#">
                                                            ' . __('Sort Blog', 'themeton') . ' <span class="caret"></span>
                                                        </a>
                                                        <ul class="dropdown-menu" role="menu">
                                                            <li><a href="javascript:;" title="All" data-filter="all" class="active">' . __('All', 'themeton') . '</a></li>
                                                            <li class="divider"></li>
                                                            ' . $cat_filter_html . '
                                                        </ul>
                                                    </li>
                                                </ul>
                                            </div>
                                            <div class="clearfix"></div>
                                        </div>
                                    </div>
                                </div>';
            }
        }
        // Grid container
        $masonry_class = '';
        $result = '<div class="blox-element grid-loop blog fullwidth-portfolio ' . $extra_class . ' ' . $visibility . '" style="opacity:0;" data-column="' . $column . '">
                        ' . $filter_html . '
                        <div class="row masonry-container" style="background-color:' . $bgcolor . ';">' . $result . '</div>
                        <div class="clearfix"></div>
                    </div>';
    }
    wp_reset_query();
    wp_reset_postdata();
    $query = $temp_qry;
    $post = $temp_post;
    return $result;
}
Exemplo n.º 4
0
function blox_portfolio_gallery($options)
{
    $options = array_merge(array('width' => '', 'height' => ''), $options);
    global $post;
    $gallery_field = tt_getmeta('portfolio_gallery');
    $images = explode(',', $gallery_field);
    $html = '';
    foreach ($images as $id) {
        $alt = 'Portfolio gallery image';
        if ((int) $id > 0) {
            $attach_url = wp_get_attachment_url($id);
            $attach_url = $attach_url !== false ? $attach_url : THEME_NOIMAGE;
            $alt = get_post_meta($id, '_wp_attachment_image_alt', true);
            $img = blox_aq_resize($attach_url, 600, 350, true);
            $img = $options['height'] != '' && $options['height'] != '0' ? blox_aq_resize($attach_url, $options['width'], $options['height'], true) : $img;
            $html .= '<div class="swiper-slide">
                        <img itemprop="image" src="' . $img . '" alt="' . $alt . '" class="portfolio-image" />
                      </div>';
        }
    }
    return '<div class="entry-media">
                <div class="swiper-container swipy-slider">
                    <div class="swiper-wrapper">' . $html . '</div>
                    <div class="swiper-control-prev"><i class="fa fa-angle-left"></i></div>
                    <div class="swiper-control-next"><i class="fa fa-angle-right"></i></div>
                    <div class="swiper-pagination"></div>
                </div>
            </div>';
}
Exemplo n.º 5
0
function get_post_type_options_page()
{
    global $smof_data, $tt_sidebars, $tt_sliders, $post;
    // init One Page menus
    $onepages_for_navs = array();
    $onepage_with_templates = get_pages(array('meta_key' => '_wp_page_template', 'meta_value' => 'page-one-page.php'));
    foreach ($onepage_with_templates as $page) {
        $onepage_menu = array();
        $onepage_menu['onepage_nav' . $page->ID] = $page->post_title;
        $onepages_for_navs = array_merge($onepages_for_navs, $onepage_menu);
    }
    // add_action('after_setup_theme', 'onepage_menu_setup');
    // function onepage_menu_setup() {
    //     global $onepages_for_navs;
    //     register_nav_menus($onepages_for_navs);
    // }
    // Google Font Options
    include_once file_require(ADMIN_PATH . 'functions/google-fonts.php');
    $google_fonts = get_google_webfonts();
    $google_webfonts = array();
    $google_webfonts["default"] = "Default (Helvetica, Arial, sans-serif)";
    foreach ($google_fonts as $font) {
        $google_webfonts[$font['family']] = $font['family'];
    }
    // Less Options
    $smof_vars = get_theme_options_less_vars();
    $less_options_orig = get_less_variables();
    $less_options = array();
    foreach ($less_options_orig as $opt) {
        if ($opt['variable'] != 'less-heading') {
            $page_vars = get_page_options_less_vars();
            $opt_value = tt_getmeta('less_' . $opt['variable']);
            if (isset($page_vars[$opt['variable']]) && !empty($page_vars[$opt['variable']])) {
                $opt_value = $page_vars[$opt['variable']];
            } elseif (!empty($opt_value)) {
                $opt_value = $opt_value;
            } elseif (isset($smof_vars[$opt['variable']]) && !empty($smof_vars[$opt['variable']])) {
                $opt_value = $smof_vars[$opt['variable']];
            } else {
                $opt_value = $opt['value'];
            }
            //$less_options[] = array( $opt['variable']=>$opt_value );
            $less_options = array_merge($less_options, array($opt['variable'] => $opt_value));
        }
    }
    global $post;
    $less_content = "";
    if (isset($post->ID)) {
        $less_vars = tt_getmeta("less_page_variables", $post->ID);
        $brand_primary = tt_getmeta("less_brand-primary", $post->ID);
        if ($less_vars == "" && $brand_primary != "") {
            $less_arr = array();
            foreach ($less_options as $key => $val) {
                if ($key != 'less-heading') {
                    $current_val = tt_getmeta('less_' . $key, $post->ID);
                    $current_val = $current_val != "" ? $current_val : $val;
                    $less_arr = array_merge($less_arr, array($key => $current_val));
                }
            }
            $encoded_arr = base64_encode(serialize($less_arr));
            if (count(get_post_meta($post->ID, "_less_page_variables")) == 0) {
                add_post_meta($post->ID, "_less_page_variables", $encoded_arr, true);
            } else {
                update_post_meta($post->ID, "_less_page_variables", $encoded_arr);
            }
        }
        $encoded_str = tt_getmeta("less_page_variables", $post->ID);
        $less_content = get_less_editor_content($encoded_str);
        update_post_meta($post->ID, "_up_less_editor", $less_content);
    }
    $url = ADMIN_IMAGES;
    $tmp_arr = array('onepage' => array('label' => 'One Page Options', 'post_type' => 'page', 'items' => array(array('name' => 'onepages', 'type' => 'onepage', 'label' => 'Pages for One Page Template', 'desc' => 'Build page with Multi pages', 'default' => ''), array('name' => 'onepages_names', 'type' => 'text', 'label' => 'Pages Names', 'default' => ''), array('name' => 'onepages_links', 'type' => 'text', 'label' => 'Pages Links', 'default' => ''), array('name' => 'onepage_menu', 'type' => 'checkbox', 'label' => 'Use One Page Menu', 'desc' => 'If you check this option, current pages menu would be selected pages titles.'))), 'page' => array('label' => 'Page Options', 'post_type' => 'page', 'items' => array(array('name' => 'slider', 'type' => 'select', 'label' => 'Top slider', 'option' => $tt_sliders, 'desc' => 'Select a slider that you\'ve created on LayerSlider and Revolution Slider. This slider shows up between header and page title.'), array('type' => 'checkbox', 'name' => 'slider_top', 'label' => 'Slider at the top of Page', 'default' => '0', 'desc' => 'If you wanna show fullscreen slider, hope you like this option.'), array('type' => 'checkbox', 'name' => 'hide_topbar', 'label' => 'Hide top bar', 'default' => '0', 'desc' => 'If you wanna hide top bar when Topbar enabled in theme option.'), array('name' => 'page_layout', 'type' => 'thumbs', 'label' => 'Page Layout', 'default' => 'full', 'option' => array('full' => ADMIN_DIR . 'assets/images/1col.png', 'right' => ADMIN_DIR . 'assets/images/2cr.png', 'left' => ADMIN_DIR . 'assets/images/2cl.png'), 'desc' => 'Select Page Layout (Fullwidth | Right Sidebar | Left Sidebar)'), array('name' => 'sidebar', 'type' => 'select', 'label' => 'Page Sidebar', 'default' => 'page-sidebar', 'option' => $tt_sidebars, 'desc' => 'You should select a sidebar If you\'ve chosen page layout with sidebar. And if you need an unique sidebar for this page, you have to create new one on Theme Options => <b>Custom Sidebar</b> and then add your Appearence => <b>Widgets</b>. Later on select it here.'), array('type' => 'checkbox', 'name' => 'title_show', 'label' => 'Title (show/hide)', 'default' => '1'), array('type' => 'start_group', 'name' => 'title_options', 'visible' => true), array('type' => 'select', 'name' => 'title_align', 'label' => 'Title align', 'default' => 'left', 'option' => array('left' => 'Left', 'center' => 'Center', 'right' => 'Right'), 'desc' => 'Title alignment'), array('name' => 'title_padding', 'type' => 'text', 'label' => 'Title Spacing from Top', 'default' => '', 'desc' => 'Page Title Sections padding-top size (px)'), array('name' => 'title_padding_bottom', 'type' => 'text', 'label' => 'Title Spacing from Bottom', 'default' => '', 'desc' => 'Page Title Sections padding-bottom size (px)'), array('name' => 'teaser', 'type' => 'textarea', 'label' => 'Teaser text', 'default' => '', 'desc' => 'Add description text which shows up at bottom of Page Title.'), array('type' => 'checkbox', 'name' => 'title_color', 'label' => 'Title text invert color ?', 'default' => '0', 'desc' => 'If this option not active, text color is default color'), array('type' => 'colorpicker', 'name' => 'title_bg_color', 'label' => 'Title background color', 'default' => get_theme_mod('title_bg_color'), 'desc' => 'Page Title Section Background Color'), array('type' => 'background', 'name' => 'title_bg', 'label' => 'Title Background Image', 'default' => '', 'desc' => 'If you want to show your title area beautiful, this option exactly you need.'), array('type' => 'colorpicker', 'name' => 'title_overlay_color', 'label' => 'Overlay Color', 'default' => '', 'desc' => 'It needs when use background image'), array('name' => 'title_overlay_opacity', 'type' => 'text', 'label' => 'Overlay Opacity', 'default' => '', 'desc' => 'Overlay opacity value: [0, 0.1, ..1]'), array('name' => 'title_options', 'type' => 'end_group'))), 'ultimate_page' => array('label' => 'Ultimate Page Options', 'post_type' => 'page', 'items' => array(array('type' => 'select', 'name' => 'up_layout', 'label' => 'Container Layout', 'default' => 'full', 'option' => array('full' => 'Full (Wide) Layout', 'boxed' => 'Boxed Layout')), array('name' => 'up_margin_top', 'type' => 'number', 'label' => 'Site Top Spacing', 'default' => '0', 'desc' => 'Please set site top margin space. Number value in pixels. Note: This style appects only on large screens (>1200px).'), array('name' => 'up_margin_bottom', 'type' => 'number', 'label' => 'Site Bottom Spacing', 'default' => '0', 'desc' => 'Please set site bottom margin space. Number value in pixels. Note: This style appects only on large screens (>1200px).'), array('type' => 'background', 'name' => 'up_background_img', 'label' => 'Background Image', 'default' => '', 'desc' => 'Add here your body background image. Image and custom pattern are acceptable.'), array('name' => 'up_logo', 'type' => 'image', 'label' => 'Logo', 'default' => '', 'desc' => 'If you wanna use custom logo on this page, you should use it.'), array('type' => 'checkbox', 'name' => 'up_header', 'label' => 'Enable Header', 'default' => '1'), array('type' => 'start_group', 'name' => 'up_header_group', 'visible' => true), array('type' => 'checkbox', 'name' => 'up_topbar', 'label' => 'Enable Topbar', 'default' => '0'), array('type' => 'checkbox', 'name' => 'up_fixed_menu', 'label' => 'Navigation Fixed at Top', 'default' => '0', 'desc' => 'Navigation menu stays fixed at top of your site when you scroll down.'), array('type' => 'checkbox', 'name' => 'up_enable_logo', 'label' => 'Enable Logo', 'default' => '1', 'desc' => 'You can remove logo.'), array('type' => 'checkbox', 'name' => 'up_enable_search', 'label' => 'Enable Search Box', 'default' => '1', 'desc' => 'You can remove search box at next of your main menu.'), array('type' => 'select', 'name' => 'up_menu_align', 'label' => 'Menu Alignment', 'default' => 'center', 'option' => array('left' => 'Left', 'center' => 'Center', 'right' => 'Right'), 'desc' => 'Menu alignment (left, center, right).'), array('type' => 'checkbox', 'name' => 'up_header_transparent', 'label' => 'Enable Header Transparent', 'default' => '0', 'desc' => 'If you enable this option, header is transparent.'), array('name' => 'up_header_height', 'type' => 'number', 'label' => 'Header Height', 'default' => isset($smof_vars['header-height']) ? (int) $smof_vars['header-height'] : '80', 'desc' => 'Default : 80px'), array('name' => 'up_header_group', 'type' => 'end_group'), array('type' => 'checkbox', 'name' => 'up_footer', 'label' => 'Enable Footer', 'default' => '1'), array('type' => 'checkbox', 'name' => 'up_footer_bar', 'label' => 'Enable Footer Bar', 'default' => '1'), array('type' => 'select', 'name' => 'up_menu_font', 'label' => 'Menu Font', 'default' => isset($smof_vars['base-font-menu']) ? str_replace("'", '', str_replace('"', '', $smof_vars['base-font-menu'])) : 'default', 'option' => $google_webfonts, 'desc' => 'Menu link font including sub menu links and description texts.'), array('type' => 'select', 'name' => 'up_heading_font', 'label' => 'Heading Font', 'default' => isset($smof_vars['base-font-heading']) ? str_replace("'", '', str_replace('"', '', $smof_vars['base-font-heading'])) : 'default', 'option' => $google_webfonts, 'desc' => 'All heading tags (H1 through H6) font incluing Post title and Widget title etc.'), array('type' => 'select', 'name' => 'up_body_font', 'label' => 'Body Font', 'default' => isset($smof_vars['base-font-body']) ? str_replace("'", '', str_replace('"', '', $smof_vars['base-font-body'])) : 'default', 'option' => $google_webfonts, 'desc' => 'Main body text.'))), 'less_option' => array('label' => 'Less Options (Current Page)', 'post_type' => 'page', 'items' => array(array('name' => 'up_less_editor', 'type' => 'textarea', 'label' => 'LESS Editor', 'default' => $less_content))));
    return $tmp_arr;
}
Exemplo n.º 6
0
    if ($the_query->have_posts()) {
        $wp_query = $the_query;
        $wp_query->the_post();
        $woo_page_title = $page_title;
    }
}
/* include header
============================*/
if (!is_product()) {
    get_template_part('template', 'header');
}
$content_class = 'col-md-12 col-sm-12';
$layout = tt_getmeta('page_layout') != '' ? tt_getmeta('page_layout') : $smof_data['woo_layout'];
$current_sidebar = tt_getmeta('sidebar') != '' ? tt_getmeta('sidebar') : $smof_data['woo_sidebar'];
if (is_product()) {
    $sproduct = tt_getmeta('product_layout');
    $sproduct = $sproduct != '' && $sproduct != $smof_data['product_layout'] ? $sproduct : $smof_data['product_layout'];
    $layout = $sproduct;
    $current_sidebar = $smof_data['product_sidebar'];
}
if (in_array($layout, array('left', 'right'))) {
    $content_class = 'col-md-9';
    $content_class .= $layout == 'left' ? ' pull-right' : '';
}
//change to 3 columsn per row when using sidebar
if (!function_exists('loop_columns')) {
    function loop_columns()
    {
        return 3;
    }
}
Exemplo n.º 7
0
										<?php 
    comments_template('', true);
    ?>
									</div>
								</div>
							</div>
							<?php 
}
?>

						</div>
						
					</div>
					<?php 
if (in_array($layout, array('left', 'right'))) {
    global $current_sidebar;
    $current_sidebar = tt_getmeta('sidebar');
    if (isset($parent_onepage) && $parent_onepage == true) {
        include file_require(dirname(__FILE__) . '/sidebar.php');
    } else {
        get_sidebar();
    }
}
?>
				</div>
		</div>
		</div>
	</div>
</section>
<!-- End Content
================================================== -->
Exemplo n.º 8
0
        <?php 
while (have_posts()) {
    the_post();
    include file_require(get_template_directory() . '/template-page.php');
}
?>






<?php 
global $smof_data;
$up_footer = tt_getmeta('up_footer', $post->ID);
$up_footer_bar = tt_getmeta('up_footer_bar', $post->ID);
if ($up_footer == '1') {
    $layout = isset($smof_data['footer_layout']) ? $smof_data['footer_layout'] : 3;
    switch ($layout) {
        case 1:
            $col = 1;
            $percent = array('col-xs-12 col-sm-12 col-md-12 col-lg-12');
            break;
        case 2:
            $col = 2;
            $percent = array('col-xs-12 col-sm-6 col-md-6 col-lg-6', 'col-xs-12 col-sm-6 col-md-6 col-lg-6');
            break;
        case 3:
            $col = 3;
            $percent = array('col-xs-12 col-sm-12 col-md-6 col-lg-6', 'col-xs-12 col-sm-6 col-md-3 col-lg-3', 'col-xs-12 col-sm-6 col-md-3 col-lg-3');
            break;
Exemplo n.º 9
0
		<?php 
/* Page Top Slider */
getPageSlider(true);
?>

		<div id="header_spacing" class="hidden-xs hidden-sm" style="height: 80px;"></div>
		<!-- Start Header
		================================================== -->
		<header id="header" class="header active-section navbar-inverse <?php 
echo $nav_fixed . ' ' . $header_transparent;
?>
" role="banner">

			<?php 
if (isset($smof_data['top_bar']) && $smof_data['top_bar'] == 1 && tt_getmeta('hide_topbar') != '1' && $header_transparent == '') {
    ?>
			<div id="top_bar" class="top-bar">
				<div class="container">
					<div class="row">
						<div class="col-sm-6">
							<div class="top-bar-left">
								<?php 
    tt_bar_content($smof_data['top_bar_left']);
    ?>
							</div>
						</div>
						<div class="col-sm-6">
							<div class="top-bar-right text-right">
								<?php 
    tt_bar_content($smof_data['top_bar_right']);
Exemplo n.º 10
0
function render_mega_nav($menu_location = 'primary')
{
    $theme_locations = get_nav_menu_locations();
    global $smof_data;
    $layout = isset($smof_data['header_layout']) ? $smof_data['header_layout'] : '1';
    if (is_page() && tt_getmeta('customize_page') == '1') {
        $layout = tt_getmeta('header_layout');
    }
    $menu_location = isset($theme_locations[$menu_location]) ? $menu_location : 'primary';
    if (isset($theme_locations[$menu_location]) && (int) $theme_locations[$menu_location] > 0) {
        $menu_obj = get_term($theme_locations[$menu_location], 'nav_menu');
        $menies = wp_get_nav_menu_items($menu_obj);
        if (!is_array($menies)) {
            return;
        }
        echo "<ul class='nav navbar-nav'>";
        foreach ($menies as $meny) {
            if ($meny->menu_item_parent == 0) {
                $fullwidth = $meny->fullwidth == '1' ? 'fullwidth ' : '';
                $fullwidth .= $meny->activemega == '1' ? 'mega-menu ' : '';
                $li_style = "";
                $color = $meny->color;
                $color = $color == '#fff' ? '#ffffff' : $color;
                $color = $color == '#000' ? '#000' : $color;
                $text_class = '';
                $astyle = '';
                if ($layout == '2') {
                    $astyle = "background-color: {$color};";
                    $text_class = $color != '' ? get_text_class($color) : '';
                }
                $text_class .= ' ' . get_current_menu_class($menies, $meny);
                $menu_childs = $meny->activemega == '1' ? render_megamenu_items($menies, $meny->ID, $meny) : render_submenu_items($menies, $meny->ID);
                $text_class .= $menu_childs != '' ? ' menu-item-has-children has-children' : '';
                echo '<li id="' . get_menu_id($meny) . '" class="' . $fullwidth . $text_class . '" style="' . $li_style . '">
                        <a href="' . $meny->url . '" ' . get_custom_atts_menu($meny) . ' style="' . $astyle . '">
                        	' . get_icon_menu($meny) . '
                            ' . get_menu_text($meny) . '
                            ' . get_description_menu($meny) . '
                        </a>
                        ' . $menu_childs . '
                      </li>';
            }
        }
        // Nav menu items
        $args = array('theme_location' => $menu_location);
        $defaults = array('menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'depth' => 0, 'walker' => '', 'theme_location' => '');
        $args = wp_parse_args($args, $defaults);
        $args = apply_filters('wp_nav_menu_args', $args);
        $args = (object) $args;
        $nav_menu_items_hook = apply_filters('wp_nav_menu_items', '', $args);
        echo $nav_menu_items_hook;
        echo '</ul>';
    } else {
        wp_nav_menu(array('theme_location' => 'primary', 'container_class' => 'mainmenu', 'fallback_cb' => 'metro_menu_callback'));
    }
    // Prints menu if user set menu on Mobile location
    $mobile = 'mobile-menu';
    if (isset($theme_locations[$mobile]) && $theme_locations[$mobile] > 0) {
        wp_nav_menu(array('theme_location' => $mobile, 'container_id' => 'tt-mobile-menu', 'container_class' => 'hidden-xs hidden-sm hidden-md hidden-lg'));
    }
}
Exemplo n.º 11
0
function tt_up_site_logo()
{
    global $smof_data;
    $up_logo = tt_getmeta('up_logo');
    if (!empty($up_logo)) {
        echo '<div class="logo site-brand">';
        echo "<a href=" . home_url() . "><img src='{$up_logo}' alt='" . get_bloginfo('name') . "' /></a>";
        echo '</div>';
        return;
    }
    $hide = '';
    echo '<div class="logo site-brand">';
    if (isset($smof_data['logo']) && $smof_data['logo'] != '') {
        echo "<a href=" . home_url() . "><img src='" . $smof_data['logo'] . "' alt='" . get_bloginfo('name') . "' class='normal'/>";
        // Retina logo
        if (isset($smof_data['logo_retina']) && $smof_data['logo_retina'] != '') {
            if (isset($smof_data['logo_retina_width']) && isset($smof_data['logo_retina_height'])) {
                $pixels = "";
                if (is_numeric($smof_data['logo_retina_width']) && is_numeric($smof_data['logo_retina_height'])) {
                    $pixels = "px";
                }
                echo '<img src="' . $smof_data["logo_retina"] . '" alt="' . get_bloginfo('name') . '" style="width:' . $smof_data["logo_retina_width"] . $pixels . ';max-height:' . $smof_data["logo_retina_height"] . $pixels . '; height: auto !important" class="retina" />';
            }
        }
        echo "</a>";
        // Hide site title text if logo image is defined
        $hide = "style='display:none'";
    }
    echo "<h1 {$hide} class='navbar-brand'><a href=" . home_url() . ">" . get_bloginfo('name') . "</a></h1>";
    echo '</div>';
}
Exemplo n.º 12
0
    function get_portfolio_media($param)
    {
        global $post;
        $gallery_field = tt_getmeta('portfolio_gallery');
        $video_field = tt_getmeta('portfolio_video_mp4');
        if ($gallery_field != '') {
            ?>
<section class="portfolio-slider">
	<div class="swiper-container layout-<?php 
            echo $param['layout'];
            ?>
">
		<div class="swiper-wrapper">
			<?php 
            if ($video_field != '') {
                $fimage = '';
                if (has_post_thumbnail(get_the_ID())) {
                    $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'blog');
                    $fimage = $image[0];
                }
                $video_embed = get_video(array('video' => $video_field, 'poster' => $fimage));
                echo "<div class='swiper-slide video'><div class='entry-media video-wrapper' style='display:none;'>{$video_embed}</div></div>";
            }
            $gimages = explode(',', $gallery_field);
            foreach ($gimages as $img_id) {
                $img = wp_get_attachment_url($img_id);
                echo '<div class="swiper-slide" style="background-image:url(' . $img . ');"></div>';
            }
            ?>
		</div>

		<div class="swiper-control-prev"><i class="fa fa-angle-left"></i></div>
		<div class="swiper-control-next"><i class="fa fa-angle-right"></i></div>
		<div class="swiper-pagination"></div>

	</div>
</section>
<?php 
        }
    }
Exemplo n.º 13
0
 function getPageSlider($onTop)
 {
     global $post;
     if (tt_getmeta('slider_top') != '1' && $onTop) {
         return false;
     }
     if (tt_getmeta('slider_top') == '1' && !$onTop) {
         return false;
     }
     $slider_class = $onTop ? 'slider-fullscreen' : '';
     if (tt_getmeta('slider') != '' && tt_getmeta('slider') != 'none') {
         echo '<div id="tt-slider" class="tt-slider ' . $slider_class . '">';
         $slider_name = tt_getmeta("slider");
         $slider = explode("_", $slider_name);
         $slider_pieces = $slider;
         unset($slider_pieces[0]);
         $slider_alias = implode("_", $slider_pieces);
         $shortcode = '';
         if (strpos($slider_name, "layerslider") !== false) {
             $shortcode = "[" . $slider[0] . " id='" . $slider_alias . "']";
         } elseif (strpos($slider_name, "revslider") !== false) {
             $shortcode = "[rev_slider " . $slider_alias . "]";
         } elseif (strpos($slider_name, "masterslider") !== false) {
             $shortcode = "[master_slider id='" . $slider_alias . "']";
         }
         echo do_shortcode($shortcode);
         echo '</div>';
     }
 }
Exemplo n.º 14
0
function themeton_ao_get_field($params)
{
    global $post;
    $name = $params['name'];
    $type = $params['type'];
    $meta_val = tt_getmeta($params['name'], $post->ID);
    $default = isset($params['default']) ? $params['default'] : '';
    $value = $meta_val != '' ? $meta_val : $default;
    if (isset($params['option'])) {
        $option = $params['option'];
    }
    $gatts = 'id="' . $name . '" name="' . $name . '"';
    switch ($type) {
        case 'title':
            return '<span style="font-weight: bold;font-size:14px;background-color: #4cd864;display: inline-block;padding:7px;border-radius: 3px;color: #fff;">' . $params['title'] . '</span>';
            break;
        case 'colorpicker':
            return '<input type="text" ' . $gatts . ' value="' . $value . '" class="tt_wpcolorpicker" data-default-color="' . $default . '" />';
            break;
        case 'text':
            return '<input type="text" ' . $gatts . ' value="' . $value . '" />';
            break;
        case 'number':
            return '<input type="number" ' . $gatts . ' step="1" min="0" value="' . (int) $value . '" class="small-text" />';
            break;
        case 'textarea':
            return '<textarea ' . $gatts . '>' . $value . '</textarea>';
            break;
        case 'select':
            $html = '<select ' . $gatts . ' default-value="' . $value . '" class="tt_wpselectbox">';
            foreach ($option as $key => $val) {
                $html .= '<option value="' . $key . '">' . $val . '</option>';
            }
            $html .= '</select>';
            return $html;
            break;
        case 'radio':
            $html = '';
            foreach ($option as $key => $val) {
                $html .= '<input type="radio" group="tt_group_' . $name . '" ' . $gatts . ' class="tt_wpradiobox" ' . ($value == $key ? 'checked' : '') . '>';
                $html .= $val . '<br>';
            }
            return $html;
            break;
        case 'icon':
            $html = '';
            foreach ($option as $key => $val) {
                $html .= '<input type="radio" group="tt_group_' . $name . '" ' . $gatts . ' class="tt_wpradiobox" ' . ($val == $key ? 'checked' : '') . '>';
                $html .= $val;
                if ($key == 'custom') {
                    $html .= '<input type="text" value""/>';
                }
                $html .= '<br>';
            }
            return $html;
            break;
        case 'thumbs':
            $html = '';
            $ndx = 0;
            foreach ($option as $key => $val) {
                $ndx++;
                $html .= '<input type="radio" group="tt_group_' . $name . '" name="' . $name . '" id="' . $name . $ndx . '" value="' . $key . '" class="tt_wpradiobox" ' . ($key == $value ? 'checked' : '') . '>';
                $html .= '<label for="' . $name . $ndx . '"><img src="' . $val . '" class="' . ($key == $value ? 'active' : '') . '" /></label>';
            }
            return "<div class='page_option_field_thumbs'>{$html}</div>";
            break;
        case 'image':
            $html = '';
            $html .= '<div class="pmeta_item_browse">
                            <input type="text" ' . $gatts . ' value="' . $value . '" />
                            <a href="javascript:;" class="button pmeta_button_browse">Browse...</a>
                            <div class="browse_preview">' . ($value != '' ? '<img src="' . $value . '" /><a href="javascript:;">Remove</a>' : '') . '</div>
                    </div>';
            return $html;
            break;
        case 'metro':
            $html = '<div id="metro_style_container">
                            <a href="javascript:;" class="small1"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/small-icon-title.png" /></a>
                            <a href="javascript:;" class="small2"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/small-title.png" /></a>
                            <a href="javascript:;" class="small3"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/small-image.png" /></a>
                            <a href="javascript:;" class="small4"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/small-icon.png" /></a>
                            <a href="javascript:;" class="hor1"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/big-icon-title.png" /></a>
                            <a href="javascript:;" class="hor2"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/big-icon.png" /></a>
                            <a href="javascript:;" class="hor3"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/big-image.png" /></a>
                            <a href="javascript:;" class="hor4"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/big-title.png" /></a>
                            <a href="javascript:;" class="large1"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/large-icon-title.png" /></a>
                            <a href="javascript:;" class="large2"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/large-icon.png" /></a>
                            <a href="javascript:;" class="large3"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/large-image-stitle.png" /></a>
                            <a href="javascript:;" class="large4"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/large-image-title.png" /></a>
                            <a href="javascript:;" class="large5"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/large-image.png" /></a>
                            <a href="javascript:;" class="large6"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/large-title.png" /></a>
                            <a href="javascript:;" class="ver1"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/large-ver-title.png" /></a>
                            <a href="javascript:;" class="ver2"><img src="' . get_template_directory_uri() . '/framework/post-type/images/post-format/large-ver-icon.png" /></a>
                    </div>';
            $html .= '<input type="hidden" ' . $gatts . ' value="' . $value . '" />';
            return $html;
            break;
        case 'font_icon':
            $html = '';
            $html .= '<div class="pmeta_item_font">
                                <input type="text" ' . $gatts . ' value="' . $value . '" />
                                <a href="javascript:;" class="button pmeta_button_font">Font Icon...</a>
                        </div>';
            return $html;
            break;
        case 'onepage':
            $html = '';
            $html .= '<select id="onpage_allpages">';
            $html .= '<option value="0">' . __('Choose page...', 'themeton') . '</option>';
            $pages = get_pages();
            foreach ($pages as $page) {
                if (get_post_meta($page->ID, '_wp_page_template', true) != 'page-one-page.php') {
                    $html .= '<option value="' . $page->ID . '" data-link="' . get_permalink($page->ID) . '">' . $page->post_title . '</option>';
                }
            }
            $html .= '</select>';
            $html .= '&nbsp;&nbsp;<a href="javascript:;" class="button" id="button_onepage_add">Add Page</a>';
            $html .= '&nbsp;&nbsp;<a href="javascript:;" class="button" id="button_op_custom_link">Custom Link</a>';
            $html .= '<div id="onepage_container"></div>';
            $html .= '<input type="hidden" ' . $gatts . ' value="' . $value . '" />';
            return $html;
            break;
        case 'checkbox':
            return '<span class="blox_switcher ' . ($value == '1' ? 'on' : '') . '">
                        <span class="handle"></span>
                        <input type="hidden" ' . $gatts . ' value="' . ($value == '1' ? '1' : '0') . '" />
                    </span>';
            break;
        case 'customlink':
            return '<input type="text" ' . $gatts . ' value="' . $value . '" /><input type="checkbox" value="1"/> Open in a new tab?';
            break;
        case 'video':
            $html = '<div class="pmeta_video">
                        <input type="text" ' . $gatts . ' value="' . $value . '" />
                        <a href="javascript:;" class="button pmeta_button_browse">Browse...</a>
                    </div>';
            return $html;
            break;
        case 'gallery':
            $imgs = '';
            $arr = explode(',', trim($value));
            foreach ($arr as $uri) {
                if ($uri != '') {
                    $imgs .= '<span style="background-image: url(' . wp_get_attachment_url($uri) . ');"></span>';
                }
            }
            $html = '<div class="pmeta_gallery">
                        <a href="javascript:;" class="button pmeta_button_browse">Insert/Update Gallery...</a>
                        <a href="javascript:;" class="pmeta_remove" title="Remove Gallery">(<i class="fa-times"></i>)</a>
                        <input type="hidden" ' . $gatts . ' value="' . trim($value) . '" class="gallery_images" />
                        <div class="gallery_images_preview">' . $imgs . '</div>
                    </div>';
            return $html;
            break;
        case 'background':
            $values = get_bg_values($value);
            $html = '';
            $html .= '<div class="pmeta_item_background">
                            <input type="text" id="' . $name . '_image" name="' . $name . '_image" value="' . $values['url'] . '" class="bg_image_url" />
                            <input type="hidden" ' . $gatts . ' value="' . $value . '" class="bg_hidden_value" />
                            <a href="javascript:;" class="button pmeta_button_browse">Browse...</a>
                            <div class="browse_preview" style="' . ($values['url'] == '' ? 'display:none;' : '') . '">
                                <div class="preview_sample" style="background-image:url(' . $values['url'] . ');"></div>
                                <a href="javascript:;">Remove</a>
                            </div>
                            <div class="background-controlls" style="' . ($values['url'] == '' ? 'display:none;' : '') . '">
                                <select id="' . $name . '_repeat" name="' . $name . '_repeat" default-value="' . $values['repeat'] . '" class="tt_wpselectbox bg_image_repeat">
                                    <option value="repeat">Repeat</option>
                                    <option value="repeat-x">Repeat-X</option>
                                    <option value="repeat-y">Repeat-Y</option>
                                    <option value="no-repeat">No Repeat</option>
                                    <option value="cover">Cover</option>
                                </select>
                                <select id="' . $name . '_position" name="' . $name . '_position" default-value="' . $values['position'] . '" class="tt_wpselectbox bg_image_position">
                                    <option value="top left">Top &amp; Left</option>
                                    <option value="top center">Top &amp; Center</option>
                                    <option value="top right">Top &amp; Right</option>
                                    <option value="center left">Center &amp; Left</option>
                                    <option value="center center">Center &amp; Center</option>
                                    <option value="center right">Center &amp; Right</option>
                                    <option value="bottom left">Bottom &amp; Left</option>
                                    <option value="bottom center">Bottom &amp; Center</option>
                                    <option value="bottom right">Bottom &amp; Right</option>
                                </select>
                                <select id="' . $name . '_attach" name="' . $name . '_attach" default-value="' . $values['attach'] . '" class="tt_wpselectbox bg_image_attach">
                                    <option value="scroll">Scroll</option>
                                    <option value="fixed">Fixed</option>
                                    <option value="parallax">Parallax</option>
                                </select>
                            </div>
                      </div>';
            return $html;
            break;
        default:
            return "Option doesn't prepared!";
            break;
    }
}
Exemplo n.º 15
0
        }
        wp_reset_postdata();
        wp_reset_query();
    } elseif ($page_id == '0') {
        $names = tt_getmeta('onepages_names', $temp_post->ID);
        $links = tt_getmeta('onepages_links', $temp_post->ID);
        $arr_name = explode('^', $names);
        $arr_link = explode('^', $links);
        $page_links[] = array('custom' => '1', 'title' => isset($arr_name[$forloop_index]) ? $arr_name[$forloop_index] : '', 'link' => isset($arr_link[$forloop_index]) ? $arr_link[$forloop_index] : '');
    }
    $forloop_index++;
}
$post = $temp_post;
$wp_query = $temp_query;
/* Hiding main menu if turned on One page menu */
if (tt_getmeta('onepage_menu') == '1') {
    echo '<style> #header .navbar-nav{ display:none; } </style>';
    echo '<div id="one_page_menu" style="display:none;">';
    $first = true;
    foreach ($page_links as $tpage) {
        $link = $class = $id = '';
        $class = 'menu-item-';
        if (isset($tpage['custom'])) {
            $class .= 'custom custom';
            $link = $tpage['link'];
        } else {
            $link = '#post-' . $tpage['name'];
            $id = $tpage['id'];
            $class .= $id;
        }
        if ($first) {
Exemplo n.º 16
0
function blox_portfolio_parse_hook($atts)
{
    extract(shortcode_atts(array('title' => '', 'style' => 'default', 'categories' => '', 'count' => '5', 'pager' => '0', 'height' => '', 'readmore' => __('Read more', 'themeton'), 'ignoresticky' => 'yes', 'filter' => '1', 'content_type' => 'default', 'overlay' => 'none', 'exclude' => '', 'order' => '', 'extra_class' => '', 'element_style' => 'default', 'skin' => '', 'visibility' => ''), $atts));
    $visibility = str_replace(',', ' ', $visibility);
    global $query, $post, $paged;
    $temp_qry = $query;
    $temp_post = $post;
    wp_reset_query();
    wp_reset_postdata();
    if (is_front_page()) {
        $paged = get_query_var('page') ? get_query_var('page') : 1;
    }
    /* Build queries
       ================================================*/
    $args = array('post_type' => 'portfolio', 'post__not_in' => explode(',', $exclude), 'posts_per_page' => (int) $count, 'paged' => $paged, 'ignore_sticky_posts' => $ignoresticky == 'yes' ? 1 : 0);
    $cats_filter = array();
    if ($categories != '') {
        $format_array = explode(',', $categories);
        $args['tax_query'] = array(array('taxonomy' => 'portfolio_entries', 'field' => 'id', 'terms' => $format_array));
        foreach ($format_array as $term) {
            $the_term = get_term($term, 'portfolio_entries');
            $temp_cat = array('id' => $the_term->term_id, 'title' => $the_term->name, 'slug' => $the_term->slug);
            if (!in_array($temp_cat, $cats_filter)) {
                $cats_filter[] = $temp_cat;
            }
        }
    }
    if ($order == 'dateasc') {
        $args['orderby'] = 'date';
        $args['order'] = 'ASC';
    } elseif ($order == 'titleasc') {
        $args['orderby'] = 'title';
        $args['order'] = 'ASC';
    } elseif ($order == 'titledes') {
        $args['orderby'] = 'title';
        $args['order'] = 'DESC';
    } elseif ($order == 'comment') {
        $args['orderby'] = 'comment_count';
    } elseif ($order == 'postid') {
        $args['orderby'] = 'ID';
    } elseif ($order == 'random') {
        $args['orderby'] = 'rand';
        add_action('posts_orderby', 'edit_posts_orderby');
    }
    $result = '';
    $title = $title != '' ? '<h3 class="element-title">' . $title . '</h3>' : '';
    $query = new WP_Query($args);
    if ($query->have_posts()) {
        $item_number = 0;
        while ($query->have_posts()) {
            $query->the_post();
            // If it is grid style, there don't need image scaled cropping
            $image_height = 0;
            if (strpos($style, 'grid') !== false) {
                $image_height = $height != '' ? (int) $height : 0;
            }
            $item_number++;
            $class = 'col-md-3 col-sm-6 col-xs-12';
            $image_width = 539;
            if ($style == 'masonry3' || $style == 'grid3') {
                $class = 'col-md-4 col-sm-6 col-xs-12';
                $image_width = 344;
            } else {
                if ($style == 'masonry4' || $style == 'grid4') {
                    $class = 'col-md-3 col-sm-6 col-xs-12';
                    $image_width = 247;
                } else {
                    if ($style == 'masonry2' || $style == 'grid2') {
                        $class = 'col-md-6 col-sm-6 col-xs-12';
                        $image_width = 0;
                    }
                }
            }
            // If it is centered style, there don't need image overlay
            if ($style == 'centered') {
                $overlay = 'nothing';
            }
            $current_filter_classes = '';
            $terms = wp_get_post_terms(get_the_ID(), 'portfolio_entries');
            foreach ($terms as $term) {
                $current_filter_classes .= 'filter-' . $term->slug . ' ';
                if (empty($format_array)) {
                    $temp_cat = array('id' => $term->term_id, 'title' => $term->name, 'slug' => $term->slug);
                    if (!in_array($temp_cat, $cats_filter)) {
                        $cats_filter[] = $temp_cat;
                    }
                }
            }
            $thumb = '';
            if (has_post_thumbnail(get_the_ID())) {
                $fimage = wp_get_attachment_url(get_post_thumbnail_id(get_the_ID()));
                $thumb = $fimage !== false ? $fimage : THEME_NOIMAGE;
            } else {
                $gallery_field = tt_getmeta('portfolio_gallery');
                $gimages = explode(',', $gallery_field);
                if (isset($gimages[0]) && $gimages[0] != '') {
                    $thumb = wp_get_attachment_url($gimages[0]);
                    $thumb = $thumb !== false ? $thumb : THEME_NOIMAGE;
                }
            }
            $cols = (int) str_replace('grid', '', str_replace('masonry', '', $style));
            $img_w = 520;
            $img_w = $cols == 3 ? 337 : $img_w;
            $img_w = $cols == 4 ? 245 : $img_w;
            $height = $height != '' ? $height : '0';
            $thumb = $thumb != '' ? blox_aq_resize($thumb, $img_w, $height, true) : '';
            $folio_arg = array('item_style' => $content_type, 'overlay' => $overlay, 'thumb' => $thumb, 'class' => $class . ' ' . $current_filter_classes, 'width' => $img_w, 'height' => $height);
            $result .= blox_loop_portfolio($folio_arg);
        }
        $pager_html = '';
        if ($pager == '1') {
            ob_start();
            themeton_pager($query);
            $pager_html .= ob_get_contents();
            ob_end_clean();
        }
        $filter_html = '';
        if ($filter == '1') {
            $cat_filter_html = '';
            foreach ($cats_filter as $cat) {
                $cat_filter_html .= '<li><a href="javascript:;" title="' . $cat['title'] . '" data-filter="filter-' . $cat['slug'] . '">' . $cat['title'] . '</a></li>';
            }
            if ($cat_filter_html != '') {
                $filter_html = '<div class="row">
                                    <div class="col-md-12">
                                        <div class="portfolio-filter">
                                            <div class="pull-left">
                                                <h3>' . __('All', 'themeton') . '</h3>
                                            </div>
                                            <div class="pull-right">
                                                <ul class="nav nav-pills">
                                                    <li class="dropdown active">
                                                        <a class="dropdown-toggle navInst" data-toggle="dropdown" href="#">
                                                            ' . __('Sort Portfolio', 'themeton') . ' <span class="caret"></span>
                                                        </a>
                                                        <ul class="dropdown-menu" role="menu">
                                                            <li><a href="javascript:;" title="All" data-filter="all" class="active">' . __('All', 'themeton') . '</a></li>
                                                            <li class="divider"></li>
                                                            ' . $cat_filter_html . '
                                                        </ul>
                                                    </li>
                                                </ul>
                                            </div>
                                            <div class="clearfix"></div>
                                        </div>
                                    </div>
                                </div>';
            }
        }
        // Grid container
        $masonry_class = '';
        if (strpos($style, 'masonry') !== false) {
            $masonry_class = 'portfolio-masonry';
        }
        $result = '<div class="blox-element grid-loop portfolio ' . $element_style . ' ' . $masonry_class . ' ' . $extra_class . ' ' . $visibility . '">
                        ' . $filter_html . '
                        <div class="row masonry-container">' . $result . '</div>
                        ' . $pager_html . '
                    </div>';
    }
    wp_reset_query();
    wp_reset_postdata();
    $query = $temp_qry;
    $post = $temp_post;
    return $result;
}