function ts_portfolio_item_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'id' => 0), $atts));
    global $post;
    $html = '';
    $new_post = null;
    if (!empty($id)) {
        $new_post = get_post($id);
    }
    if ($new_post) {
        $post = $new_post;
        setup_postdata($post);
        $image = '';
        $slider = '';
        $portfolio_slider = ts_get_post_opt('portfolio_slider');
        if (is_array($portfolio_slider) && count($portfolio_slider) > 0) {
            foreach ($portfolio_slider as $slide) {
                if (!empty($slide['image'])) {
                    $image = theme_thumb($slide['image'], 370, 270, 'c');
                }
                $slider .= ' 
					<div class="col-sm-12 col-md-12">
					  <img src="' . esc_url($image) . '" alt="" title="">
					</div>';
            }
        }
        if (!empty($slider)) {
            $gallery = '
				<div class="carousel-box load" data-carousel-pagination="true" data-carousel-nav="false" data-carousel-one="true">
					<div class="row">
						<div class="carousel">' . $slider . '</div>
					</div>
					<div class="clearfix"></div>
					<div class="pagination switches"></div>
				</div>';
        } else {
            $gallery = '<img src="' . esc_url(get_xv_thumbnail(370, 270)) . '" class="single-image" />';
        }
        $html = '
			<div class="work-single row ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '>
				<div class="images-box col-sm-5 col-md-4">
					' . $gallery . '
				</div>

				<div class="work-description col-sm-7 col-md-8">
				  <h3 class="title">' . get_the_title() . '</h3>
				  <div class="type">' . xv_get_field('client') . '</div>

				  <div>
					' . apply_filters('the_content', get_the_content()) . '
					<div class="tags"><b>' . __('Categories', 'progressive') . ': </b>' . strip_tags(get_the_term_list($post->ID, 'portfolio_category', '', ', ')) . '</div>
				  </div>
				</div>
				<div class="clearfix"></div>
			  </div>';
        wp_reset_postdata();
    }
    return $html;
}
Example #2
0
function show_all_thumbs()
{
    global $post;
    $post = get_post($post);
    $images =& get_children('post_type=attachment&post_mime_type=image&output=ARRAY_N&orderby=menu_order&order=ASC&post_parent=' . $post->post_parent);
    if ($images) {
        $thumblist = "";
        foreach ($images as $imageID => $imagePost) {
            if ($imageID == $post->ID) {
            } else {
                $thumblist .= '<li class="item">';
                unset($the_b_img);
                $the_b_img = wp_get_attachment_image_src($imageID, 'full', false);
                // mr-image-resize script
                $_new_image_url = theme_thumb($the_b_img[0], 148, 98);
                $thumblist .= '<a href="' . get_attachment_link($imageID) . '"><img src="' . $_new_image_url . '" /></a>';
                $thumblist .= '</li>';
            }
        }
    }
    return $thumblist;
}
?>
"><?php 
the_title();
?>
</a>
		</h2>
		<div class="entry-content">
			<?php 
$post_gallery = ts_get_post_opt('post_gallery');
if (is_array($post_gallery) && count($post_gallery) > 0) {
    ?>
				<div class="carousel-box load" data-carousel-pagination="true" data-carousel-nav="false" data-carousel-one="true">
					<div class="carousel"> 
						<?php 
    foreach ($post_gallery as $slide) {
        $image = theme_thumb($slide['image'], 870, 400);
        if (!empty($image)) {
            echo '<img src="' . esc_url($image) . '" alt="" title="">';
        }
    }
    ?>
					</div>
					<div class="nav-box">
						<a class="next" href="#">
							<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
								<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
							</svg>
						</a>
						<a class="prev" href="#">
							<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
								<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
Example #4
0
function ts_post_list_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'category' => '', 'limit' => 1, 'carousel_pagination' => 'yes', 'carousel_navigation' => 'yes', 'image_align' => 'left'), $atts));
    if (empty($limit)) {
        $limit = 1;
    }
    $html = '';
    $args = array('numberposts' => "", 'posts_per_page' => $limit, 'offset' => 0, 'cat' => $category, 'orderby' => 'date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'paged' => 1, 'post_status' => 'publish');
    ob_start();
    $the_query = new WP_Query($args);
    $html = '';
    if ($the_query->have_posts()) {
        while ($the_query->have_posts()) {
            $the_query->the_post();
            $slider = '';
            $post_gallery = ts_get_post_opt('post_gallery');
            if (is_array($post_gallery) && count($post_gallery) > 0) {
                foreach ($post_gallery as $slide) {
                    $image = theme_thumb($slide['image'], 370, 270, 'c');
                    if (!empty($image)) {
                        $slider .= '<img src="' . esc_url($image) . '" alt="" title="" />';
                    }
                }
            }
            ?>
			<div class="bottom-padding <?php 
            echo ts_get_animation_class($animation);
            ?>
" <?php 
            echo ts_get_animation_data_class($animation_delay, $animation_iteration);
            ?>
>
				<div class="post carousel row no-responsive">
					<div class="images-box col-xs-12 col-sm-4 col-md-4 <?php 
            echo $image_align == 'right' ? 'pull-right' : '';
            ?>
">
						<?php 
            if (!empty($slider)) {
                ?>

							<div class="carousel-box load" data-carousel-pagination="<?php 
                echo $carousel_pagination == 'yes' ? 'true' : 'false';
                ?>
" data-carousel-nav="<?php 
                echo $carousel_navigation == 'yes' ? 'true' : 'false';
                ?>
" data-carousel-one="true">
								<div class="carousel"> 
									<?php 
                echo $slider;
                ?>
								</div>
								<div class="nav-box">
									<a class="next" href="#">
										<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
											<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
										</svg>
									</a>
									<a class="prev" href="#">
										<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
											<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
										</svg>
									</a>
								</div>
								<div class="clearfix"></div>
								<div class="pagination switches"></div>
							</div>
						<?php 
            } else {
                ?>
							<img src="<?php 
                echo esc_url(get_xv_thumbnail(370, 270));
                ?>
" class="single-image" />
						<?php 
            }
            ?>
					</div>

					<div class="col-xs-12 col-sm-8 col-md-8">
						<h2 class="entry-title"><a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
" title="<?php 
            echo esc_attr(get_the_title());
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
						<div class="entry-content">
							<?php 
            ts_the_excerpt_theme(155);
            ?>
						</div>

						<div class="entry-meta">
							<span class="autor-name"><?php 
            the_author();
            ?>
</span>,
							<span class="time"><?php 
            the_time('j.m.Y');
            ?>
</span>
							<span class="separator">|</span>
							<span class="meta"><?php 
            _e('Posted in', 'progressive');
            ?>
 <?php 
            echo get_the_category_list(', ');
            ?>
</span>
							<span class="comments-link pull-right">
								<a href="<?php 
            comments_link();
            ?>
"><?php 
            comments_number('0', '1', '%');
            ?>
 <?php 
            _e('comment(s)', 'progressive');
            ?>
</a>
							</span>
						</div>
					</div>
					<div class="clearfix"></div>
				</div><!-- .post -->
			</div>
			<?php 
        }
        wp_reset_postdata();
    }
    $html = ob_get_contents();
    ob_end_clean();
    return $html;
}
Example #5
0
function max_get_custom_image_url($imgID = null, $postID = null, $width = false, $height = false, $cropping = false, $greyscale = false, $isSlider = false, $url = false, $retina = false)
{
    global $blog_id;
    // check to wether to choose timthumb or not
    $use_timthumb = get_option_max('image_use_timthumb');
    if ($isSlider) {
        $tmp_img = wp_get_attachment_image_src($imgID, 'full');
        $img_src = $tmp_img[0];
    } else {
        $img_src = max_get_image_path($postID, 'full');
    }
    // get the right path for multisite installation
    if (isset($blog_id) && $blog_id > 0) {
        $imageParts = explode('/files/', $img_src);
        if (isset($imageParts[1])) {
            $img_src = '/blogs.dir/' . $blog_id . '/files/' . $imageParts[1];
        }
    }
    if (!empty($use_timthumb) && $use_timthumb == 'true') {
        $imgUrl = get_template_directory_uri() . '/timthumb.php?src=' . $img_src . '&amp;h=' . $height . '&amp;w=' . $width . '&amp;a=' . $cropping . '&amp;q=100';
    } else {
        $imgUrl = theme_thumb($img_src, $width, $height, $cropping, $retina);
    }
    return $imgUrl;
}
Example #6
0
			$(modal).find('.modal-body').find('[data-action="activate"]').bind('click',function(){
				if($(papa).length > 0)
				{
					$(papa).find('[data-action="ADMITSETDEFAULT"]').trigger('click');
					$(modal).find('.modal-body').find('[data-action="activate"]').attr('disabled','disabled');
				}
				return false;
			});
		}
	});
});
</script>
<?php 
$footer_script = ob_get_clean();
$this->gui->col_config(1, array('inner-opening-wrapper' => '<div class="row themes_grid">', 'inner-closing-wrapper' => '</div>', 'footer-script' => $footer_script));
$this->gui->cols_width(1, 4);
foreach (force_array($themes_list) as $_theme) {
    $footer_buttons = array();
    $status = riake('active', $_theme) === true ? 'disabled="disabled"' : '';
    $footer_buttons[] = array('text' => __('Activate'), 'attrs' => 'data-action="ADMITSETDEFAULT" ' . $status);
    $footer_buttons[] = array('text' => __('Delete'), 'attrs' => 'data-action="ADMITDELETETHEME"');
    $footer_buttons[] = array('text' => __('Details'), 'attrs' => 'data-action="OPENDETAILS"');
    $this->gui->set_meta(array('type' => 'panel-footer', 'title' => riake('name', $_theme), 'namespace' => core_meta_namespace(array('admin', 'themes', riake('namespace', $_theme))), 'opening-wrapper' => '<div class="col-lg-3 theme_head"  
		data-theme_namespace="' . $_theme['namespace'] . '" 
		data-theme_name="' . $_theme['name'] . '"
		data-theme_thumb="' . theme_thumb($_theme['namespace']) . '"
		data-theme_author="' . $_theme['author'] . '"
		data-theme_version="' . $_theme['version'] . '"><input type="hidden" class="theme_details" value="' . htmlentities($_theme['description']) . '">', 'closing-wrapper' => '</div>', 'footer-buttons' => $footer_buttons))->push_to(1);
    $this->gui->set_item(array('type' => 'dom', 'value' => '<img src="' . theme_thumb($_theme['namespace']) . '" style="width:100%;min-height:250px;">'))->push_to(core_meta_namespace(array('admin', 'themes', riake('namespace', $_theme))));
}
$this->gui->get();
Example #7
0
" <?php 
        post_class('item');
        ?>
>
      <div class="shadow">
        <a href="<?php 
        $src = wp_get_attachment_image_src($attachment_id, 'full');
        echo $src[0];
        ?>
" data-rel="prettyPhoto[gal]" title="<?php 
        echo $attachment_title;
        ?>
" data-effect="mfp-zoom-in">
          <?php 
        // show the featured image
        $thumb = theme_thumb($imageUrl[0], $imgDimensions['width'], $imgDimensions['height']);
        ?>
          <img src="<?php 
        echo $thumb;
        ?>
" alt="<?php 
        if (!empty($attachment_caption)) {
            echo $attachment_caption;
        } else {
            echo $attachment_title;
        }
        ?>
" class="attachment-<?php 
        echo $image_size;
        ?>
" />
Example #8
0
function ts_tiles_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'image_1' => '', 'url_1' => '', 'target_1' => '', 'background_color_1' => '', 'image_2' => '', 'url_2' => '', 'target_2' => '', 'background_color_2' => '', 'image_3' => '', 'url_3' => '', 'target_3' => '', 'background_color_3' => '', 'hover_opacity' => ''), $atts));
    $oArgs = ThemeArguments::getInstance('ts_tiles_func');
    $oArgs->set('shortcode_tiles', array());
    do_shortcode($content);
    $shortcode_tiles = $oArgs->get('shortcode_tiles');
    ob_start();
    ?>
	<div class="slider progressive-slider progressive-slider-two tiles load <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class="row slider-wrapper">
			<div class="col-md-9 sliders-container">
				<div class="sliders-box">
					<?php 
    if (is_array($shortcode_tiles)) {
        foreach ($shortcode_tiles as $item) {
            ?>
							<?php 
            if (!empty($item['url'])) {
                ?>
								<a href="<?php 
                echo esc_url($item['url']);
                ?>
" target="<?php 
                echo esc_attr($item['target']);
                ?>
">
								<?php 
            }
            ?>
								<img class="" src="<?php 
            echo esc_url(theme_thumb($item['image'], 900, 450));
            ?>
" width="900" height="450" alt="" />
								<?php 
            if (!empty($item['url'])) {
                ?>
								</a>
							<?php 
            }
            ?>
						<?php 
        }
    }
    ?>
					  
				</div><!-- .sliders-box -->

				<div class="pagination switches"></div>	
			</div>

			<div class="col-md-3 slider-banners">
				<?php 
    if (!empty($image_1)) {
        ?>
					<a class="banner" href="<?php 
        echo esc_url($url_1);
        ?>
" target="<?php 
        echo esc_attr($target_1);
        ?>
">
						<img alt="" src="<?php 
        echo esc_url(ts_get_image_by_id($image_1));
        ?>
" />
					</a>
				<?php 
    }
    ?>
				<?php 
    if (!empty($image_2)) {
        ?>
					<a class="banner" href="<?php 
        echo esc_url($url_2);
        ?>
" target="<?php 
        echo esc_attr($target_2);
        ?>
">
						<img alt="" src="<?php 
        echo esc_url(ts_get_image_by_id($image_2));
        ?>
" />
					</a>
				<?php 
    }
    ?>
				<?php 
    if (!empty($image_3)) {
        ?>
					<a class="banner" href="<?php 
        echo esc_url($url_3);
        ?>
" target="<?php 
        echo esc_attr($target_3);
        ?>
">
						<img alt="" src="<?php 
        echo esc_url(ts_get_image_by_id($image_3));
        ?>
" />
					</a>
				<?php 
    }
    ?>
			</div><!-- .slider-banners -->
		</div>
	</div><!-- .progressive-slider -->

	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Example #9
0
function max_caption_image($atts, $content = null)
{
    extract(shortcode_atts(array('url' => '', 'width' => '', 'height' => '', 'caption' => '', 'crop' => 'c', 'title' => '', 'gallery' => '', 'lightbox' => 'false'), $atts));
    $_gal = '';
    $_esc_gallery = esc_attr($gallery);
    if ('true' == $_esc_gallery) {
        $_gal = '[galPretty]';
    }
    if (!empty($crop)) {
        if (isset($blog_id) && $blog_id > 0) {
            $imageParts = explode('/files/', $url);
            if (isset($imageParts[1])) {
                $src = '/blogs.dir/' . $blog_id . '/files/' . $imageParts[1];
            }
        }
        // get the new image width calculation if no height or width is set
        if ($width == 0) {
            $width = "";
        }
        if ($height == 0) {
            $height = "";
        }
        if ($use_timthumb == 'true') {
            $src = get_template_directory_uri() . '/timthumb.php?src=' . $url . '&amp;h=' . $height . '&amp;w=' . $width . '&amp;a=' . $crop . '&amp;q=100';
        } else {
            $src = theme_thumb(esc_attr($url), esc_attr($width), esc_attr($height), $crop);
        }
    } else {
        if ($use_timthumb == 'true') {
            $src = get_template_directory_uri() . '/timthumb.php?src=' . $url . '&amp;h=' . $height . '&amp;w=' . $width . '&amp;q=100';
        } else {
            $src = theme_thumb(esc_attr($url), esc_attr($width), esc_attr($height), false);
        }
    }
    $html = '<div class="img-caption">';
    if ($lightbox == 'true') {
        $html .= '<a class="pretty_image" data-link="' . esc_attr($url) . '" href="' . esc_attr($url) . '" data-rel="prettyPhoto' . $_gal . '" title="' . $content . '">';
    }
    $html .= '<img src="' . $src . '" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" alt="' . esc_attr($title) . '" class="fade-image" />';
    if ($lightbox == 'true') {
        $html .= '</a>';
    }
    $html .= '<span class="caption">' . do_shortcode($content) . '</span></div><div class="clearfix"></div>';
    return $html;
}
Example #10
0
function get_xv_thumbnail($width, $height)
{
    global $post;
    $thumb = "http://placehold.it/{$width}x{$height}";
    if (has_post_thumbnail()) {
        $image_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full");
        $image_url = $image_src[0];
        $thumb = theme_thumb($image_url, $width, $height, 'c');
    }
    return $thumb;
}
Example #11
0
function ts_person_func($atts)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'id' => ''), $atts));
    global $post;
    ob_start();
    $new_post = get_post($id);
    if ($new_post && !is_wp_error($new_post)) {
        setup_postdata($new_post);
        ?>
		<div class="bottom-padding">
			<div class="employee employee-single <?php 
        echo ts_get_animation_class($animation);
        ?>
" <?php 
        echo ts_get_animation_data_class($animation_delay, $animation_iteration);
        ?>
>
				<div class="row">
					<div class="images-box col-xs-9 col-sm-6 col-md-4">
						<?php 
        $post_gallery = ts_get_post_opt('post_gallery', $id);
        if (is_array($post_gallery) && count($post_gallery) > 0) {
            ?>
							<div class="carousel-box load" data-carousel-pagination="true" data-carousel-nav="false" data-carousel-one="true">
								<div class="carousel">
									<?php 
            foreach ($post_gallery as $slide) {
                if (!empty($slide['image'])) {
                    $image = theme_thumb($slide['image'], 370, 370);
                }
                if (esc_url($image)) {
                    ?>
											<div class="image">
												<img src="<?php 
                    echo esc_url($image);
                    ?>
" alt="" title="" width="370" height="370">
											</div>
											<?php 
                }
            }
            ?>
								</div>
								<div class="clearfix"></div>
								<div class="pagination switches"></div>
							</div>
						<?php 
        }
        ?>
					</div>
					<div class="employee-description col-sm-8 col-md-8">
						<h3 class="name"><?php 
        echo get_the_title($id);
        ?>
</h3>
						<div class="role"><?php 
        echo xv_get_field('xv_member_designation', $id);
        ?>
</div>
						<div>
							<p><?php 
        echo xv_get_field('xv_member_about', $id);
        ?>
</p>
							<?php 
        $email = xv_get_field('xv_member_email', $id);
        $phone = xv_get_field('xv_member_phone', $id);
        ?>
							<div class="contact"><b><?php 
        _e('Email:', 'progressive');
        ?>
 </b><?php 
        echo wp_kses_data($email);
        ?>
</div>
							<div class="contact"><b><?php 
        _e('Phone:', 'progressive');
        ?>
 </b><?php 
        echo wp_kses_data($phone);
        ?>
</div>
						</div>
						<div class="social">
							<?php 
        $facebook = xv_get_field('xv_member_facebook', $id);
        $twitter = xv_get_field('xv_member_twiiter', $id);
        $gplus = xv_get_field('xv_member_gplus', $id);
        $linkedin = xv_get_field('xv_member_linkedin', $id);
        if (!empty($facebook)) {
            ?>
								<div class="item"><a class="sbtnf sbtnf-rounded color color-hover icon-facebook" href="<?php 
            echo esc_url($facebook);
            ?>
"></a></div>
							<?php 
        }
        if (!empty($twitter)) {
            ?>
								<div class="item"><a class="sbtnf sbtnf-rounded color color-hover icon-twitter" href="<?php 
            echo esc_url($twitter);
            ?>
"></a></div>
							<?php 
        }
        if (!empty($gplus)) {
            ?>
								<div class="item"><a class="sbtnf sbtnf-rounded color color-hover icon-gplus" href="<?php 
            echo esc_url($gplus);
            ?>
"></a></div>
							<?php 
        }
        if (!empty($linkedin)) {
            ?>
								<div class="item"><a class="sbtnf sbtnf-rounded color color-hover icon-linkedin" href="<?php 
            echo esc_url($linkedin);
            ?>
"></a></div>
							<?php 
        }
        ?>
						</div>
					</div>
					<div class="clearfix"></div>
				</div>
			</div><!-- .employee -->
		</div>
		<?php 
        wp_reset_postdata();
    }
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}