Example #1
0
 function shortcode_image($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => '', 'url' => '', 'width' => 460, 'height' => 245, 'crop' => 'yes', 'link' => '', 'lightbox' => 'yes'), $atts));
     $_title = $title ? ' title="' . $title . '"' : '';
     $crop = $crop == 'yes' ? true : false;
     $html = '<div class="shortcode-image">';
     $html .= '<div class="img img-hover">';
     if ($link) {
         $html .= '<a href="' . $link . '"' . $_title . '>';
         $html .= twoot_get_frontend_func('resize_thumbnail_by_url', $url, $title, $width, $height, $crop);
         $html .= '<div class="overlay"></div>';
         $html .= '</a>';
     } elseif ($lightbox == 'yes') {
         $html .= '<a href="' . $url . '"' . $_title . ' class="fancybox-gallery">';
         $html .= twoot_get_frontend_func('resize_thumbnail_by_url', $url, $title, $width, $height, $crop);
         $html .= '<div class="overlay"></div>';
         $html .= '</a>';
     } else {
         $html .= twoot_get_frontend_func('resize_thumbnail_by_url', $url, $title, $width, $height, $crop);
         $html .= '<div class="overlay"></div>';
     }
     $html .= '</div>';
     if ($title) {
         $html .= '<div class="image-caption">' . $title . '</div>';
     }
     $html .= '</div>';
     return $html;
 }
Example #2
0
 function shortcode_product_carousel($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => 'Recent Products', 'type' => 'product_cat', 'counts' => '16', 'cats' => '', 'posts' => '', 'order' => 'DESC', 'orderby' => 'date', 'auto' => 'false', 'speed' => '800', 'pause' => '5000', 'move_slides' => '4'), $atts));
     global $woocommerce;
     $id = twoot_get_frontend_func('rand_num', 5);
     if (!in_array($type, array('product_cat', 'product_tag'), true)) {
         return $html = '<div class="the-not-posts">' . esc_attr__('Hi, please check the type option, the current type is not match!', 'Twoot_Toolkit') . '</div>';
     }
     // Get Query
     $query = new Twoot_Query(array('counts' => $counts, 'cats' => $cats, 'posts' => $posts, 'order' => $order, 'orderby' => $orderby, 'post_type' => 'product', 'taxonomy' => $type));
     $products = new WP_Query($query->do_template_query());
     if ($products->have_posts()) {
         $html = '<div class="the-carousel-list the-product-list">';
         $html .= '<h5 class="carousel-title">' . $title . '</h5>';
         $html .= '<ul id="post-carousel-' . $id . '" class="products clearfix">';
         while ($products->have_posts()) {
             $products->the_post();
             $html .= twoot_generator('load_template', 'loop-product-carousel');
         }
         wp_reset_query();
         $html .= '</ul>';
         $html .= '</div>';
         $html .= twoot_generator('carousel_script', $id, $auto, $speed, $pause, $move_slides, $tag = 'd');
     } else {
         $html = '<div class="the-not-posts">' . esc_attr__('Hi, please check the type option, the current type is not match!', 'Twoot_Toolkit') . '</div>';
     }
     return $html;
 }
Example #3
0
 function shortcode_post_slider($atts, $content = null)
 {
     extract(shortcode_atts(array('ids' => '', 'width' => '940', 'height' => '600', 'crop' => 'yes', 'lightbox' => 'yes', 'auto' => 'true', 'speed' => '800', 'pause' => '5000', 'mode' => 'fade'), $atts));
     $ids = explode(',', $ids);
     $crop = $crop == 'yes' ? true : false;
     if (is_array($ids) && !empty($ids)) {
         $count = 0;
         $html = '<div class="shortcode-post-slider bx-slider">';
         $html .= '<ul class="post-slider" data-auto="' . $auto . '" data-speed="' . $speed . '" data-pause="' . $pause . '" data-mode="' . $mode . '">';
         foreach ($ids as $id) {
             $count++;
             $desc = trim(strip_tags(get_post($id)->post_content));
             $caption = trim(strip_tags(get_post($id)->post_excerpt));
             $tilte = $caption != false ? ' title="' . $caption . '"' : '';
             $alt = trim(strip_tags(get_post_meta($id, '_wp_attachment_image_alt', true)));
             $class = 'class="fancybox-gallery"';
             $rel = count($ids) > 1 ? ' rel="gallery-' . get_the_ID() . '"' : '';
             $html .= '<li class="img-preload img-hover">';
             if ($lightbox == true) {
                 $html .= '<a href="' . twoot_get_frontend_func('thumbnail_url', $id) . '" ' . $class . $rel . $tilte . '>' . twoot_get_frontend_func('resize_thumbnail', $id, $caption, $width, $height, $crop) . '<div class="overlay"></div></a>';
             } else {
                 $html .= twoot_get_frontend_func('resize_thumbnail', $id, $caption, $width, $height, $crop) . '<div class="overlay"></div>';
             }
             if ($caption) {
                 $html .= '<div class="bx-caption"><span>' . $caption . '</span></div>';
             }
             $html .= '</li>';
         }
         $html .= '</ul>';
         $html .= '</div>';
         return $html;
     }
 }
Example #4
0
 function shortcode_blog_carousel($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => 'Recent News', 'type' => 'blog_cat', 'counts' => '16', 'cats' => '', 'posts' => '', 'order' => 'DESC', 'orderby' => 'date', 'auto' => 'false', 'speed' => '800', 'pause' => '5000', 'move_slides' => '2'), $atts));
     $id = twoot_get_frontend_func('rand_num', 5);
     if (!in_array($type, array('blog_cat', 'blog_tag'), true)) {
         return $html = '<div class="the-not-posts">' . esc_attr__('Hi, please check the type option, the current type is not match!', 'Twoot_Toolkit') . '</div>';
     }
     switch ($type) {
         case 'blog_cat':
             $taxonomy = 'category';
             break;
         case 'blog_tag':
             $taxonomy = 'post_tag';
             break;
     }
     $q = new Twoot_Template_Carousel(array('counts' => $counts, 'cats' => $cats, 'posts' => $posts, 'order' => $order, 'orderby' => $orderby, 'post_type' => 'post', 'taxonomy' => $taxonomy));
     $html = '<div class="the-carousel-list the-blog-list">';
     $html .= '<h5 class="carousel-title">' . $title . '</h5>';
     $html .= '<ul id="post-carousel-' . $id . '" class="clearfix">';
     $html .= $q->carousel();
     $html .= '</ul>';
     $html .= '</div>';
     $html .= twoot_generator('carousel_script', $id, $auto, $speed, $pause, $move_slides, $tag = 'b');
     return $html;
 }
 /**
  * Portfolio Custom Columns
  * @since     1.0
  * @updated   1.0
  *
  */
 public function portfolio_custom_columns($column)
 {
     global $post;
     $layouts = array('half' => esc_attr__('Half Width', 'Twoot'), 'full' => esc_attr__('Full Width', 'Twoot'));
     $type = ucwords(twoot_get_frontend_func('meta', 'type'));
     $layout = twoot_get_frontend_func('meta', 'layout');
     switch ($column) {
         case 'portfolio_categories':
             $terms = get_the_terms($post->ID, 'portfolio_cat');
             if (!empty($terms)) {
                 foreach ($terms as $t) {
                     $output[] = '<a href="edit.php?post_type=portfolio&portfolio_cat=' . $t->slug . '">' . esc_html(sanitize_term_field('name', $t->name, $t->term_id, 'portfolio_cat', 'display')) . '</a>';
                 }
                 $output = implode(', ', $output);
             } else {
                 $t = get_taxonomy('portfolio_cat');
                 $output = 'No ' . $t->label;
             }
             echo $output;
             break;
         case 'portfolio_thumbnail':
             if (has_post_thumbnail()) {
                 the_post_thumbnail('thumbnail');
             } else {
                 echo esc_attr__('No featured image', 'Twoot');
             }
             break;
         case 'portfolio_type':
             echo $type;
             break;
         case 'portfolio_layout':
             echo $layouts[$layout];
             break;
     }
 }
Example #6
0
 function shortcode_twitter_carousel($atts, $content = null)
 {
     extract(shortcode_atts(array('counts' => 5, 'cache' => 1, 'auto' => 'true', 'speed' => '800', 'pause' => '5000', 'mode' => 'fade'), $atts));
     $opts = get_option(TWOOT_TOOLKIT_OPTIONS);
     $username = trim($opts['twitter_username']);
     $key = 'cache_twitter_carousel';
     $consumer_key = trim($opts['twitter_ck']);
     $consumer_secret = trim($opts['twitter_cs']);
     $access_token = trim($opts['twitter_at']);
     $access_token_secret = trim($opts['twitter_ats']);
     $do_query = new Twoot_Twitter_Handler();
     $twitters = $do_query->get_recent_media($username, $key, $consumer_key, $consumer_secret, $access_token, $access_token_secret, $cache, $counts);
     $html = '<div class="shortcode-twitter-carousel">';
     if ($twitters) {
         $i = 0;
         $html .= '<div class="icon"><i class="twoot-icon-twitter-bird"></i></div>';
         $html .= '<ul class="twitter-carousel" data-auto="' . $auto . '" data-speed="' . $speed . '" data-pause="' . $pause . '" data-mode="' . $mode . '">';
         foreach ($twitters as $twitter) {
             if ($i == $counts) {
                 break;
             }
             $html .= '<li>';
             $html .= twoot_get_frontend_func('twitter_convert_links', $twitter->text);
             $html .= '<span class="date meta"><a class="twitter_time" target="_blank" href="http://twitter.com/' . $username . '/statuses/' . $twitter->id_str . '">' . twoot_get_frontend_func('twitter_relative_time', $twitter->created_at) . '</a></span>';
             $html .= '</li>';
             $i++;
         }
         $html .= '</ul>';
         $html .= '<div class="follow-us"><strong>' . __('Follow Us', 'Twoot_Toolkit') . '</strong> - <a href="http://twitter.com/' . $username . '" rel="external">@' . $username . '</a></div>';
     } else {
         $html .= '<div class="not-items">' . __('Oops, our Twitter feed is unavailable at the moment.', 'Twoot_Toolkit') . '</div>';
     }
     $html .= '</div>';
     return $html;
 }
 function shortcode_featured_product_carousel($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => 'Featrued Products', 'counts' => '16', 'order' => 'DESC', 'orderby' => 'date', 'auto' => 'false', 'speed' => '800', 'pause' => '5000', 'move_slides' => '4'), $atts));
     global $woocommerce;
     $id = twoot_get_frontend_func('rand_num', 5);
     $query_args = array('posts_per_page' => $counts, 'order' => $order, 'orderby' => $orderby, 'post_status' => 'publish', 'post_type' => 'product', 'no_found_rows' => 1);
     $query_args['meta_query'] = $woocommerce->query->get_meta_query();
     $query_args['meta_query'][] = array('key' => '_featured', 'value' => 'yes');
     $products = new WP_Query($query_args);
     if ($products->have_posts()) {
         $html = '<div class="the-carousel-list the-product-list">';
         $html .= '<h5 class="carousel-title">' . $title . '</h5>';
         $html .= '<ul id="post-carousel-' . $id . '" class="products clearfix">';
         while ($products->have_posts()) {
             $products->the_post();
             $html .= twoot_generator('load_template', 'loop-product-carousel');
         }
         wp_reset_query();
         $html .= '</ul>';
         $html .= '</div>';
         $html .= twoot_generator('carousel_script', $id, $auto, $speed, $pause, $move_slides, $tag = 'd');
     } else {
         $html = '<div class="the-not-posts">' . esc_attr__('Hi, please check the type option, the current type is not match!', 'Twoot_Toolkit') . '</div>';
     }
     return $html;
 }
Example #8
0
/**
* Fixed Posts per page & pagination
*
* @since   1.0.0
*/
function twoot_posts_per_page($value)
{
    if (is_tax('portfolio_cat') || is_tax('portfolio_tag')) {
        $posts_per_page = twoot_get_frontend_func('opt', 'opt', 'portfolio_counts');
    } else {
        $posts_per_page = twoot_get_frontend_func('opt', 'opt', 'blog_counts');
    }
    return $posts_per_page;
}
Example #9
0
 function shortcode_ads($atts, $content = null)
 {
     global $ad_args;
     $ad_args = array();
     $count = 0;
     do_shortcode($content);
     $html = '<div class="shortcode-ads outer clearfix">';
     foreach ($ad_args as $ad) {
         $count++;
         $counts = count($ad_args);
         $num_class = $counts % $count == 0 ? ' odd' : ' even';
         switch ($counts) {
             case 1:
                 $grid = 'twelve';
                 break;
             case 2:
                 $grid = 'six';
                 break;
             case 3:
                 $grid = 'four';
                 break;
             case 4:
                 $grid = 'three';
                 break;
         }
         $html .= '<div class="ad-item column ' . $grid . $num_class . '">';
         $html .= '<div class="inner">';
         $html .= '<div class="img img-preload img-hover">';
         if ($ad['img_url']) {
             $html .= twoot_get_frontend_func('resize_thumbnail_by_url', $ad['img_url'], $ad['title'], $ad['img_width'], $ad['img_height'], true);
             $html .= '<div class="overlay"></div>';
         }
         if ($ad['title']) {
             if ($ad['link']) {
                 $html .= '<h3 class="title"><span><a href="' . $ad['link'] . '">' . $ad['title'] . '</a></span></h3>';
             } else {
                 $html .= '<h3 class="title"><span>' . $ad['title'] . '</span></h3>';
             }
         }
         $html .= '</div>';
         if ($ad['content']) {
             $html .= '<div class="desc">' . $ad['content'] . '</div>';
         }
         $html .= '</div>';
         $html .= '</div>';
     }
     $html .= '</div>';
     return $html;
 }
Example #10
0
 function shortcode_post_masonry($atts, $content = null)
 {
     extract(shortcode_atts(array('ids' => '', 'width' => '460', 'height' => '9999', 'crop' => 'no', 'lightbox' => 'yes', 'columns' => 3), $atts));
     $ids = explode(',', $ids);
     $crop = $crop == 'yes' ? true : false;
     if (is_array($ids) && !empty($ids)) {
         $count = 0;
         // Set the columns
         switch ($columns) {
             case 2:
                 $grid = 'six';
                 break;
             case 3:
                 $grid = 'four';
                 break;
             case 4:
                 $grid = 'three';
                 break;
         }
         $html = '<div class="shortcode-post-masonry post-masonry-wrapper outer">';
         $html .= '<ul class="filter-items clearfix">';
         foreach ($ids as $id) {
             $count++;
             $desc = trim(strip_tags(get_post($id)->post_content));
             $caption = trim(strip_tags(get_post($id)->post_excerpt));
             $tilte = $caption != false ? ' title="' . $caption . '"' : '';
             $alt = trim(strip_tags(get_post_meta($id, '_wp_attachment_image_alt', true)));
             $class = 'class="fancybox-gallery"';
             $rel = count($ids) > 1 ? ' rel="gallery-' . get_the_ID() . '"' : '';
             $html .= '<li class="img-preload img-hover item column ' . $grid . '">';
             $html .= '<div class="inner">';
             if ($lightbox == true) {
                 $html .= '<a href="' . twoot_get_frontend_func('thumbnail_url', $id) . '" ' . $class . $rel . $tilte . '>' . twoot_get_frontend_func('resize_thumbnail', $id, $caption, $width, $height, $crop) . '<div class="overlay"></div></a>';
             } else {
                 $html .= twoot_get_frontend_func('resize_thumbnail', $id, $caption, $width, $height, $crop) . '<div class="overlay"></div>';
             }
             if ($caption) {
                 $html .= '<div class="caption"><span>' . $caption . '</span></div>';
             }
             $html .= '</div>';
             $html .= '</li>';
         }
         $html .= '</ul>';
         $html .= '</div>';
         return $html;
     }
 }
Example #11
0
 function shortcode_portfolio_carousel($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => 'Recent Works', 'tax' => 'cat', 'counts' => '16', 'cats' => '', 'posts' => '', 'order' => 'DESC', 'orderby' => 'date', 'auto' => 'false', 'speed' => '800', 'pause' => '5000', 'move_slides' => '4'), $atts));
     $id = twoot_get_frontend_func('rand_num', 5);
     if (!in_array($tax, array('cat', 'tag'), true)) {
         return $html = '<div class="the-not-posts">' . esc_attr__('Hi, please check the taxonomy option, the current tax is not match!', 'Twoot_Toolkit') . '</div>';
     }
     $q = new Twoot_Template_Carousel(array('counts' => $counts, 'cats' => $cats, 'posts' => $posts, 'order' => $order, 'orderby' => $orderby, 'post_type' => 'portfolio', 'taxonomy' => 'portfolio_' . $tax));
     $html = '<div class="the-carousel-list the-portfolio-carousel">';
     $html .= '<h5 class="carousel-title section-title">' . $title . '</h5>';
     $html .= '<ul id="post-carousel-' . $id . '" class="clearfix">';
     $html .= $q->carousel();
     $html .= '</ul>';
     $html .= '</div>';
     $html .= twoot_generator('carousel_script', $id, $auto, $speed, $pause, $move_slides, $tag = 'p');
     return $html;
 }
Example #12
0
 function shortcode_block_css($id)
 {
     $pt = twoot_get_frontend_func('meta', 'padding_top', $id);
     $pb = twoot_get_frontend_func('meta', 'padding_bottom', $id);
     $bg_color = twoot_get_frontend_func('meta', 'background_color', $id);
     $bg_image = twoot_get_frontend_func('meta', 'background_image', $id);
     $bg_repeat = twoot_get_frontend_func('meta', 'background_repeat', $id);
     $bg_horizontal = twoot_get_frontend_func('meta', 'background_horizontal', $id);
     $bg_vertical = twoot_get_frontend_func('meta', 'background_vertical', $id);
     $bg_attachment = twoot_get_frontend_func('meta', 'background_attachment', $id);
     $output = $pt ? 'padding-top:' . $pt . 'px;' : '';
     $output .= $pb ? 'padding-bottom:' . $pb . 'px;' : '';
     $output .= $bg_color ? 'background-color:' . $bg_color . ';' : '';
     if ($bg_image) {
         $output .= $bg_image ? 'background-image:url(' . $bg_image . ');' : '';
         $output .= $bg_repeat ? 'background-repeat:' . $bg_repeat . ';' : '';
         $output .= $bg_horizontal && $bg_vertical ? 'background-position:' . $bg_horizontal . ' ' . $bg_vertical . ';' : '';
         $output .= $bg_attachment ? 'background-attachment:' . $bg_attachment . ';' : '';
     }
     return $output;
 }
 function shortcode_testimonial_carousel($atts, $content = null)
 {
     extract(shortcode_atts(array('auto' => 'true', 'speed' => '800', 'pause' => '5000', 'mode' => 'fade'), $atts));
     global $testimonials;
     $testimonials = array();
     $pager_count = -1;
     do_shortcode($content);
     $html = '<div class="shortcode-testimonial-carousel">';
     $html .= '<ul class="testimonial-carousel" data-auto="' . $auto . '" data-speed="' . $speed . '" data-pause="' . $pause . '" data-mode="' . $mode . '">';
     foreach ($testimonials as $testimonial) {
         $html .= '<li>';
         if ($testimonial['content']) {
             $html .= '<div class="content clearfix">' . do_shortcode($testimonial['content']) . '</div>';
         }
         if ($testimonial['name'] && $testimonial['role']) {
             $html .= '<div class="item-header">';
             if ($testimonial['name']) {
                 $html .= '<h3 class="name">' . $testimonial['name'] . '</h3>';
             }
             if ($testimonial['role']) {
                 $html .= '<div class="role">' . $testimonial['role'] . '</div>';
             }
             $html .= '</div>';
         }
         $html .= '</li>';
     }
     $html .= '</ul>';
     $html .= '<ul id="bx-gallery-pager">';
     foreach ($testimonials as $testimonial) {
         $pager_count++;
         if ($testimonial['avatar']) {
             $html .= '<li><a data-slide-index="' . $pager_count . '" href="">' . twoot_get_frontend_func('resize_thumbnail_by_url', $testimonial['avatar'], '', 150, 150, true) . '</a></li>';
         }
     }
     $html .= '</ul>';
     $html .= '</div>';
     return $html;
 }
Example #14
0
 function shortcode_testimonial($atts, $content = null)
 {
     extract(shortcode_atts(array('avatar' => '', 'name' => '', 'role' => ''), $atts));
     $html = '<div class="shortcode-testimonial clearfix">';
     if ($avatar) {
         $html .= '<div class="avatar">' . twoot_get_frontend_func('resize_thumbnail_by_url', $avatar, '', 150, 150, true) . '</div>';
     }
     $html .= '<div class="content">';
     $html .= '<div class="text">' . do_shortcode($content) . '</div>';
     if ($name && $role) {
         $html .= '<div class="item-header">';
         if ($name) {
             $html .= '<h3 class="name">' . $name . '</h3>';
         }
         if ($role) {
             $html .= '<div class="role">' . $role . '</div>';
         }
         $html .= '</div>';
     }
     $html .= '</div>';
     $html .= '</div>';
     return $html;
 }
Example #15
0
 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $title = apply_filters('widget_title', $instance['title']);
     $icons = twoot_generator('icons');
     $current_icons = twoot_get_frontend_func('opt', 'opt', 'widget_social_icons');
     $all_icons = array('behance', 'dribbble', 'facebook', 'flickr', 'fivehundredpx', 'gplus', 'linkedin', 'instagram', 'pinterest', 'rss', 'soundcloud', 'tumblr', 'twitter', 'vimeo', 'youtube');
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     echo '<div class="social-icons-wrap clearfix">';
     if (is_array($current_icons) && !empty($current_icons)) {
         foreach ($current_icons as $current_icon) {
             if (in_array($current_icon, $all_icons, true)) {
                 if ($icons[$current_icon]) {
                     echo '<a href="' . $icons[$current_icon] . '" class="' . $current_icon . '" rel="external"><i class="icon icon-' . $current_icon . '"></i></a>';
                 }
             }
         }
     }
     echo '</div>';
     echo $after_widget;
 }
 * @author ThemeWoot Team
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
get_header();
?>

<div class="site-content container pt pb clearfix">

<article id="primary-wrapper" class="twelve">
	<div class="inner">
	<?php 
echo twoot_generator('page_title', 'archive');
?>

	<?php 
$q = new Twoot_Template_Grid(array('columns' => twoot_get_frontend_func('opt', 'opt', 'portfolio_column'), 'counts' => twoot_get_frontend_func('opt', 'opt', 'portfolio_counts'), 'order' => 'DESC', 'orderby' => 'date', 'filter' => 'no', 'paging' => 'yes', 'post_type' => 'portfolio'));
echo $q->grid();
?>
	</div>
</article>
<!--end #primary-->

</div>
<!--end #content-->

<?php 
get_footer();
Example #17
0
 /**
  * Updated
  *
  * @since   1.0.0
  */
 public function updated()
 {
     if (twoot_get_checked_func('theme_version')) {
         update_option(TWOOT_OPT_KEY . '_version', TWOOT_VERSION);
         update_option(TWOOT_OPT_KEY . '_plugin_version', TWOOT_PLUGIN_VERSION);
         // Cache the custom css
         twoot_get_frontend_func('cache_css');
     }
 }
Example #18
0
$top_widget_title_color = twoot_get_frontend_func('opt', 'skin', 'top_widget_title_color');
$top_widget_bg_color = twoot_get_frontend_func('opt', 'skin', 'top_widget_bg_color');
$bottom_widget_text_color = twoot_get_frontend_func('opt', 'skin', 'bottom_widget_text_color');
$bottom_widget_link_color = twoot_get_frontend_func('opt', 'skin', 'bottom_widget_link_color');
$bottom_widget_hover_color = twoot_get_frontend_func('opt', 'skin', 'bottom_widget_hover_color');
$bottom_widget_title_color = twoot_get_frontend_func('opt', 'skin', 'bottom_widget_title_color');
$bottom_widget_bg_color = twoot_get_frontend_func('opt', 'skin', 'bottom_widget_bg_color');
$bottom_menu_link_color = twoot_get_frontend_func('opt', 'skin', 'bottom_menu_link_color');
$bottom_menu_hover_color = twoot_get_frontend_func('opt', 'skin', 'bottom_menu_hover_color');
$bottom_menu_border_color = twoot_get_frontend_func('opt', 'skin', 'bottom_menu_border_color');
$bottom_menu_bg_color = twoot_get_frontend_func('opt', 'skin', 'bottom_menu_bg_color');
$copyright_text_color = twoot_get_frontend_func('opt', 'skin', 'copyright_text_color');
$copyright_link_color = twoot_get_frontend_func('opt', 'skin', 'copyright_link_color');
$copyright_hover_color = twoot_get_frontend_func('opt', 'skin', 'copyright_hover_color');
$copyright_border_color = twoot_get_frontend_func('opt', 'skin', 'copyright_border_color');
$copyright_bg_color = twoot_get_frontend_func('opt', 'skin', 'copyright_bg_color');
$custom_colors = '';
if ($enable_custom_colors == true) {
    $custom_colors = '
body .rows {
	background: ' . $content_bg_color . ';
}
body { 
	color: ' . $text_color . ';
}
a { 
	color: ' . $link_color . '; 
}
a:hover { 
	color: ' . $hover_color . '; 
}
Example #19
0
        function widget($args, $instance)
        {
            extract($args, EXTR_SKIP);
            $title = apply_filters('widget_title', $instance['title']);
            $showposts = $instance['showposts'];
            $avatar = $instance['avatar'];
            $my_email = get_option('admin_email');
            $args = array('status' => 'approve', 'type' => 'comment', 'post_type' => array('post', 'page', 'portfolio', 'product'), 'number' => $showposts);
            $comments = get_comments($args);
            ?>
		<?php 
            echo $before_widget;
            ?>
		<?php 
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            ?>
			<ul>
				<?php 
            foreach ($comments as $comment) {
                ?>
					<?php 
                if ($comment->comment_author_email != $my_email) {
                    ?>
					<li class="clearfix<?php 
                    if ($avatar != 'yes') {
                        echo ' has-not-thumbnail';
                    }
                    ?>
">
					<?php 
                    if ($avatar == 'yes') {
                        ?>
					<figure class="featured-image img-preload img-hover post-image">
						<a href="<?php 
                        echo get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID;
                        ?>
">
						<?php 
                        echo get_avatar($comment->comment_author_email, 60);
                        ?>
						<span class="overlay"></span>
						</a>
					</figure>
					<?php 
                    }
                    ?>
					<section class="post-entry">
						<div class="title"><?php 
                    echo $comment->comment_author;
                    ?>
:
							<a href="<?php 
                    echo get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID;
                    ?>
">
								<?php 
                    echo twoot_get_frontend_func('text_truncate', strip_tags($comment->comment_content), 60, true, '...');
                    ?>
							</a>
						</div>
					</section>
					</li>
					<?php 
                }
                ?>
				<?php 
            }
            ?>
			</ul>
		<?php 
            echo $after_widget;
            ?>
		<?php 
        }
Example #20
0
 */
?>

<?php 
if (has_post_thumbnail()) {
    ?>
<figure class="featured-image img-preload img-hover">
	<a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title_attribute();
    ?>
">
	<?php 
    echo twoot_get_frontend_func('resize_thumbnail', get_post_thumbnail_id(), get_the_title(), 460, 335, true);
    ?>
	<div class="overlay"></div>
	</a>
</figure>
<?php 
}
?>
<header class="item-head item-head-blog">
	<div class="date"><?php 
echo get_the_time(get_option('date_format'));
?>
</div>
	<h3 class="title"><a href="<?php 
the_permalink();
?>
Example #21
0
/**
* Add content layout class
*
* @since   1.0.0
*/
function twoot_layout_class()
{
    if (is_page()) {
        $layout = twoot_get_frontend_func('meta', 'layout') == false ? 'right' : twoot_get_frontend_func('meta', 'layout');
    }
    if ($layout == 'full') {
        $class = 'class="twelve"';
    } else {
        $class = 'class="column eight"';
    }
    echo $class;
}
?>
		</div>
		</section>
	</footer>
	<!--end #copyright-->

</div>
</div><!--end #warpper-->

<?php 
wp_footer();
echo twoot_generator('retina_logo');
?>

<?php 
if ($date = trim(twoot_get_frontend_func('opt', 'opt', 'coming_soon_date'))) {
    ?>
<script type="text/javascript">
	jQuery(document).ready( function() {
		jQuery('.countdown').countdown({ 
			'date' : '<?php 
    echo $date;
    ?>
', 
			'format': 'on'
		});
	});
</script>
<?php 
}
?>
Example #23
0
<?php 
    foreach ($attachment_ids as $id) {
        $count++;
        $class = 'class="fancybox-gallery"';
        $rel = count($attachment_ids) > 1 ? ' rel="gallery-' . get_the_ID() . '"' : '';
        $caption = trim(strip_tags(get_post($id)->post_excerpt));
        $tilte = $caption != false ? 'title="' . $caption . '"' : '';
        $alt = trim(strip_tags(get_post_meta($id, '_wp_attachment_image_alt', true)));
        echo '<li class="img-preload img-hover">';
        echo '<a href="' . twoot_get_frontend_func('thumbnail_url', $id) . '" ' . $class . $rel . $tilte . '>' . twoot_get_frontend_func('full_thumbnail', $id, $alt, $size = 'shop_single') . '<div class="overlay"></div></a>';
        echo '</li>';
    }
    ?>
</ul>
</div>

<div class="post-gallery-pager">
<ul id="bx-gallery-pager">
<?php 
    foreach ($attachment_ids as $id) {
        $pager_count++;
        $alt = trim(strip_tags(get_post_meta($id, '_wp_attachment_image_alt', true)));
        echo '<li class="img-hover"><a data-slide-index="' . $pager_count . '" href="">' . twoot_get_frontend_func('full_thumbnail', $id, $alt, $size = 'shop_thumbnail') . '</a></li>';
    }
    ?>
</ul>
</div>

</div>
<?php 
}
Example #24
0
    ?>
		<?php 
    if (get_the_content()) {
        ?>
		<div class="post-content">
			<?php 
        the_content();
        ?>
		</div>
		<?php 
    }
    ?>
	<?php 
}
?>

	<?php 
$q = new Twoot_Template_Blog(array('counts' => twoot_get_frontend_func('opt', 'opt', 'blog_counts'), 'cats' => '', 'posts' => '', 'order' => 'DESC', 'orderby' => 'date', 'post_type' => 'post', 'taxonomy' => 'category'));
echo $q->full_blog();
?>

	</div>
</article>
<!--end #primary-->

</div>
</div>
<!--end #content-->

<?php 
get_footer();
Example #25
0
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
get_header();
?>

<div class="site-content container pt pb clearfix">

<article id="primary-wrapper" class="column eight">
	<div class="inner">

	<?php 
echo twoot_generator('page_title', 'archive');
?>

	<?php 
switch (twoot_get_frontend_func('opt', 'opt', 'search_type')) {
    case '1':
        $types = array('post', 'page', 'portfolio', 'product');
        break;
    case '2':
        $types = array('post', 'page');
        break;
    case '3':
        $types = array('post');
        break;
    case '4':
        $types = array('page');
        break;
    case '5':
        $types = array('portfolio');
        break;
 function save($post_id)
 {
     if (!isset($_POST[$this->config['id'] . '_noncename'])) {
         return $post_id;
     }
     if (!wp_verify_nonce($_POST[$this->config['id'] . '_noncename'], plugin_basename(__FILE__))) {
         return $post_id;
     }
     if ('page' == $_POST['post_type']) {
         if (!current_user_can('edit_page', $post_id)) {
             return $post_id;
         }
     } else {
         if (!current_user_can('edit_post', $post_id)) {
             return $post_id;
         }
     }
     if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
         return $post_id;
     }
     foreach ($this->options as $option) {
         if (isset($option['id']) && !empty($option['id'])) {
             if (isset($_POST[$option['id']])) {
                 switch ($option['type']) {
                     case 'multiselect':
                         if (isset($option['chosen_order']) && $option['chosen_order']) {
                             if (empty($_POST['_' . $option['id']])) {
                                 $value = array();
                             } else {
                                 $value = explode(",", $_POST['_' . $option['id']]);
                             }
                         } else {
                             if (empty($_POST[$option['id']])) {
                                 $value = array();
                             } else {
                                 $value = $_POST[$option['id']];
                             }
                         }
                         break;
                     default:
                         $value = $_POST[$option['id']];
                 }
             } else {
                 $value = false;
             }
             if (get_post_meta($post_id, $option['id']) == "") {
                 add_post_meta($post_id, $option['id'], $value, true);
             } elseif ($value != get_post_meta($post_id, $option['id'], true)) {
                 update_post_meta($post_id, $option['id'], $value);
             } elseif ($value == "") {
                 delete_post_meta($post_id, $option['id'], get_post_meta($post_id, $option['id'], true));
             }
             // Cache the custom css
             twoot_get_frontend_func('cache_css');
         }
     }
 }
Example #27
0
<?php

/**
 * @package WordPress
 * @subpackage ThemeWoot
 * @author ThemeWoot Team 
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
$type = twoot_get_frontend_func('meta', 'video_player');
$url = twoot_get_frontend_func('meta', 'video_url');
$embed = twoot_get_frontend_func('meta', 'video_code');
echo twoot_generator('post_video', $type, $url, $embed, null, null);
Example #28
0
</header>
<!--end #logo-->

<header class="site-menu">
	<section class="container">
	<div class="inner non-responsive clearfix">
	<?php 
echo twoot_generator('menu');
?>
	<?php 
if (twoot_get_checked_func('woo_activated')) {
    echo twoot_woo_generator('mini_cart');
}
?>
	</div>
	<?php 
echo twoot_generator('responsive_menu');
?>
	</section>
</header>
<!--end #menu-->

</div>
<!--end #header-->
<div class="clear"></div>

<?php 
$slider_id = twoot_get_frontend_func('meta', 'slideshow');
if ($slider_id && is_page()) {
    echo do_shortcode('[layerslider id="' . $slider_id . '"]');
}
<?php

/**
 * Template Name: Season Archive
 * @package WordPress
 * @subpackage ThemeWoot
 * @author ThemeWoot Team 
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
$layout = twoot_get_frontend_func('meta', 'layout') == false ? 'right' : twoot_get_frontend_func('meta', 'layout');
$widget = twoot_get_frontend_func('meta', 'sidebar') == false ? 'page' : twoot_get_frontend_func('meta', 'sidebar');
get_header();
?>

<div class="site-content container pt pb clearfix">

<?php 
if ($layout == 'left') {
    echo twoot_generator('sidebar', $widget, $layout);
}
?>

<article id="primary-wrapper" <?php 
twoot_layout_class();
?>
>
	<div class="inner">
Example #30
0
<?php

/**
 * @package WordPress
 * @subpackage ThemeWoot
 * @author ThemeWoot Team 
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
$gallery_id = twoot_get_frontend_func('meta', 'gallery_id');
echo twoot_generator('post_image', $gallery_id, 940, 450, true, true);