<?php

$thb_portfolio = thb_get_module_url('core/portfolio');
thb_works_query();
$terms = get_terms("portfolio_categories");
if (have_posts() && count($terms) > 0) {
    ?>
	<div id="thb-portfolio-filter">
		<ul id="filterlist">
			<li class="current">
				<a href="<?php 
    the_permalink();
    ?>
" data-term-slug="all"><?php 
    echo __("All", 'thb_text_domain');
    ?>
</a>
			</li>
			<?php 
    foreach ($terms as $term) {
        $link = add_query_arg('filter', 'portfolio_categories:' . $term->term_id);
        // $link = get_term_link($term, 'portfolio_categories');
        ?>
			<li>
				<a href="<?php 
        echo $link;
        ?>
" data-term-slug="<?php 
        echo $term->slug;
        ?>
">
Esempio n. 2
0
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
$thb_theme = thb_theme();
/**
 * Module configuration
 * -----------------------------------------------------------------------------
 */
$thb_config = array('options' => true, 'skin' => false);
$thb_theme->setConfig('core/lightbox/submodules/magnific-popup', thb_array_asum($thb_config, $config));
$lightbox_enable = thb_config('core/lightbox/submodules/magnific-popup', 'options') == false || thb_get_option('enable_lightbox_images') == 1 || thb_get_option('enable_lightbox_videos') == 1;
/**
 * Module scripts
 * -----------------------------------------------------------------------------
 */
if ($lightbox_enable) {
    $thb_lightbox = thb_get_module_url('core/lightbox/submodules/magnific-popup');
    if (thb_config('core/lightbox/submodules/magnific-popup', 'skin') == false) {
        $thb_theme->getFrontend()->addStyle($thb_lightbox . '/css/magnific-popup.css');
    }
    $thb_theme->getFrontend()->addScript($thb_lightbox . '/js/jquery.magnific-popup.min.js');
    if (thb_get_option('enable_lightbox_images') == 1) {
        $thb_theme->getFrontend()->addScript($thb_lightbox . '/js/thb.lightbox.config_images.js');
    }
    if (thb_get_option('enable_lightbox_videos') == 1) {
        $thb_theme->getFrontend()->addScript($thb_lightbox . '/js/thb.lightbox.config_videos.js');
    }
    $thb_theme->getFrontend()->addScript($thb_lightbox . '/js/thb.lightbox.js');
}
/**
 * Theme options tab
 * -----------------------------------------------------------------------------
Esempio n. 3
0
            // Create the Slideshow custom post type
            thb_create_slideshows_posttype();
            // Create the Slideshow shortcode
            thb_create_slideshows_shortcode();
            if (!empty($config['templates'])) {
                thb_add_entry_slideshow_metabox($config['templates']);
            }
        }
    }
    add_action('after_setup_theme', 'thb_slideshows_boot');
}
/**
 * Scripts and styles
 * -----------------------------------------------------------------------------
 */
$thb_slideshows = thb_get_module_url('core/slideshows');
$thb_theme->getAdmin()->addStyle($thb_slideshows . '/css/admin.css');
$thb_theme->getAdmin()->addScript($thb_slideshows . '/js/admin-views.js', array('jquery', 'backbone'));
/**
 * Slideshow body class
 * -----------------------------------------------------------------------------
 */
if (!function_exists('thb_slideshow_body_class')) {
    function thb_slideshow_body_class($classes)
    {
        $config = thb_config('core/slideshows');
        $page_id = thb_get_page_ID();
        if (thb_is_page_template($config['templates'])) {
            $slideshow = thb_get_post_meta($page_id, 'slideshow');
            if (!empty($slideshow) && trim($slideshow) != '') {
                $classes[] = 'w-slideshow';
Esempio n. 4
0
 function thb_portfolio_script_and_styles()
 {
     $thb_theme = thb_theme();
     $thb_works = $thb_theme->getPostType('works');
     $conds = array('templates' => $thb_works->getPageTemplates());
     $thb_frontend = $thb_theme->getFrontend();
     $thb_frontend->addScript(THB_FRONTEND_JS_URL . '/jquery.isotope.min.js', $conds);
     $thb_frontend->addScript(thb_get_module_url('core/portfolio') . '/js/thb.portfolio.js', $conds);
     $thb_frontend->addScript(thb_get_module_url('core/portfolio') . '/js/config.js', $conds);
     $thb_frontend->addStyle(THB_FRONTEND_CSS_URL . '/isotope.css', $conds);
 }
Esempio n. 5
0
 */
$thb_config = array('templates' => array('default'));
$thb_theme->setConfig('footerstripe', thb_array_asum($thb_config, $config));
/**
 * Including the file with the means to the creation of a Footer Stripe custom post
 * type.
 */
include dirname(__FILE__) . '/posttype.php';
thb_create_footerstripes_posttype();
/**
 * Metabox
 */
if (!function_exists('thb_add_footerstripe_metabox')) {
    function thb_add_footerstripe_metabox()
    {
        if (thb_is_admin_template(thb_config('footerstripe', 'templates'))) {
            $thb_metabox = thb_theme()->getPostType('page')->getMetabox('layout');
            $thb_container = $thb_metabox->createContainer(__('Footer stripe', 'thb_text_domain'), 'footerstripe_container');
            $thb_field = new THB_SelectField('footerstripe');
            $thb_field->setLabel(__('Select', 'thb_text_domain'));
            $thb_field->setDynamicOptions('thb_get_footerstripes_for_select');
            $thb_container->addField($thb_field);
        }
    }
    add_action('init', 'thb_add_footerstripe_metabox');
}
/**
 * Scripts and styles
 */
$thb_theme->getAdmin()->addScript(thb_get_module_url('footerstripe') . '/js/admin.js');
Esempio n. 6
0
<?php

$icons_path = thb_get_module_url('core/social') . '/icons';
$thb_services = array('twitter', 'facebook', 'googleplus', 'flickr', 'youtube', 'vimeo', 'pinterest', 'dribbble', 'forrst', 'linkedin');
$thb_services_names = array('twitter' => 'Twitter', 'facebook' => 'Facebook', 'googleplus' => 'Google+', 'flickr' => 'Flickr', 'youtube' => 'YouTube', 'vimeo' => 'Vimeo', 'pinterest' => 'Pinterest', 'dribbble' => 'Dribbble', 'forrst' => 'Forrst', 'linkedin' => 'LinkedIn');
$services = $thb_services;
if (!empty($show)) {
    $show = explode(',', $show);
    $services = array();
    foreach ($show as $service_id) {
        $service_id = trim($service_id);
        if (in_array($service_id, $thb_services)) {
            $services[] = $service_id;
        }
    }
}
?>

<div class="thb-shortcode thb-social-container">
	<?php 
if ($title != '') {
    ?>
		<h1 class="thb-shortcode-title"><?php 
    echo thb_text_format($title);
    ?>
</h1>
	<?php 
}
?>

	<?php 
Esempio n. 7
0
 function thb_flexslider_scripts_and_styles()
 {
     $config = thb_config('core/slideshows');
     $thb_flex = thb_get_module_url('core/slideshows/submodules/flexslider');
     thb_theme()->getFrontend()->addScript($thb_flex . '/js/config.js', array('templates' => $config['templates']));
     thb_theme()->getFrontend()->addScript($thb_flex . '/js/thb.slideshows_flexslider.js', array('templates' => $config['templates']));
 }