Exemplo n.º 1
0
 plus-icon animTop" title="<?php 
    echo $t = TMM::get_option('hide_image_titles') == '0' ? $t : '';
    ?>
" 
                           href="<?php 
    echo get_grid_image_url($images[$i], true);
    ?>
" data-fancybox-group="grid">
                            <img <?php 
    if ($slideup == '1') {
        ?>
 class="slideup" <?php 
    }
    ?>
 src="<?php 
    echo TMM_Helper::resize_image($th_url, '995*995');
    ?>
" alt="">
                        </a>

                        <a href="<?php 
    echo $title_href = !empty($images[$i]['title_href']) ? $images[$i]['title_href'] : get_permalink($images[$i]['id']);
    ?>
" class="gr-caption">							
    <?php 
    if (!empty($title)) {
        ?>
                                <?php 
        foreach ($title as $kk => $value) {
            ?>
									
Exemplo n.º 2
0
" alt="<?php 
                    echo $post->post_title;
                    ?>
" />
									
									<div class="image-extra">
										
										<div class="extra-content">
											
											<div class="inner-extra">
												<a class="single-image link-icon" href="<?php 
                    echo $post_link;
                    ?>
"></a>
												<a class="single-image plus-icon" data-fancybox-group="blog" href="<?php 
                    echo TMM_Helper::resize_image($source_url, '');
                    ?>
"></a>	
											</div><!--/ .inner-extra-->	
										
										</div><!--/ .extra-content-->
										
									</div><!--/ .image-extra-->	
									
								</div><!--/ .work-item-->
								
							</li>
						<?php 
                }
                ?>
					</ul>
Exemplo n.º 3
0
 public static function get_resized_image_url()
 {
     echo TMM_Helper::resize_image($_REQUEST['imgurl'], $_REQUEST['alias']);
     exit;
 }
Exemplo n.º 4
0
function ajax_load_gall_bycat()
{
    $cat_id = $_POST['cat_id'];
    $current_page = $_POST['page'];
    $post_per_page = $_POST['post_per_page'];
    $layout = $_POST['layout'];
    if ($cat_id == 'all') {
        $query = new WP_Query('post_type=gall&posts_per_page=-1');
    } else {
        $query = new WP_Query('post_type=gall&gallery_categories=' . $cat_id);
    }
    $images = array();
    ob_start();
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            global $post;
            $tmp = get_post_meta($post->ID, 'thememakers_gallery', true);
            if (!empty($tmp)) {
                foreach ($tmp as $key => $value) {
                    $tmp[$key]['post_id'] = $post->ID;
                }
                $images = $images + $tmp;
            } else {
                $tmp = array();
            }
        }
    }
    $images = $images + $tmp;
    $title_array = array();
    if (!empty($images)) {
        foreach ($images as $key => $value) {
            if (!isset($title_array[$value['post_id']])) {
                $title_array[$value['post_id']] = array();
                $title_array[$value['post_id']]['title'] = get_the_title($value['post_id']);
                $title_array[$value['post_id']]['permalink'] = get_permalink($value['post_id']);
            }
        }
    }
    $i = 1;
    foreach ($images as $key => $value) {
        $images[$key]['key'] = $i;
        $i++;
    }
    $img_terms = array();
    $img_t = get_terms('gallery_categories', array('hide_empty' => false));
    if (!empty($img_t)) {
        foreach ($img_t as $value) {
            $img_terms[$value->term_id]['slug'] = $value->slug;
            $img_terms[$value->term_id]['name'] = $value->name;
        }
    }
    $uniq_id = 0;
    ?>
    <section id="gallery-items" data-listing-page-id="<?php 
    echo get_the_ID();
    ?>
"  class="gallery-items clearfix" data-pagination="2" >
       
    <?php 
    foreach ($images as $img) {
        ?>
        
        
            <?php 
        if ($img['key'] > $post_per_page * $current_page - $post_per_page && $img['key'] <= $post_per_page * $current_page) {
            ?>

                <?php 
            if ($layout == 3) {
                ?>
                    <article class="one-third column" data-categories="<?php 
                echo $cat_id;
                ?>
">

                        <div class="project-thumb">

                            <a href="<?php 
                echo $img['imgurl'];
                ?>
" class="single-image plus-icon animTop" title="<?php 
                echo $img['title'];
                ?>
" data-fancybox-group="gallery">
                                <img alt="" src="<?php 
                echo TMM_Helper::resize_image($img['imgurl'], '420*300');
                ?>
">
                            </a>

                            <a href="<?php 
                echo $title_array[$img['post_id']]['permalink'];
                ?>
" class="project-meta">
                                <h6 class="title"><?php 
                echo $img['title'];
                ?>
</h6>
                                <span class="categories"><?php 
                echo $img_terms[$img['category']]['name'];
                ?>
</span>
                            </a>

                        </div><!--/ .project-thumb-->

                    </article>  <!--/ .column-->
                <?php 
            } else {
                if ($layout == 4) {
                    ?>
                    <article class="four columns" data-categories="<?php 
                    echo $cat_id;
                    ?>
">

                        <div class="project-thumb">

                            <a href="<?php 
                    echo $img['imgurl'];
                    ?>
" class="single-image plus-icon animTop" title="<?php 
                    echo $img['title'];
                    ?>
" data-fancybox-group="gallery">
                                <img alt="" src="<?php 
                    echo TMM_Helper::resize_image($img['imgurl'], '420*300');
                    ?>
">
                            </a>

                            <a href="<?php 
                    echo $title_array[$img['post_id']]['permalink'];
                    ?>
" class="project-meta">
                                <h6 class="title"><?php 
                    echo $img['title'];
                    ?>
</h6>
                                <span class="categories"><?php 
                    echo $img_terms[$img['category']]['name'];
                    ?>
</span>
                            </a>

                        </div><!--/ .project-thumb-->

                    </article><!--/ .column-->
                <?php 
                }
            }
            ?>

                <?php 
            $uniq_id = $uniq_id + $img['key'] + $img['post_id'] + $img['category'] + '_' . $cat_id;
            ?>

            <?php 
        }
        ?>

        <?php 
    }
    ?>

        <?php 
    if ($post_per_page < count($images)) {
        $page_count = ceil(count($images) / $post_per_page);
        $t = 1;
        if ($current_page != 1 && $current_page != $page_count + 1) {
            $t = 1;
        }
        ?>
            <div class="wp-pagenavi gall">
            <?php 
        for ($i = 1; $i <= $page_count + $t; $i++) {
            if ($page_count == $current_page) {
                if ($i == 1) {
                    ?>
                            <li><a class="prev page-numbers" data-categories="<?php 
                    echo $cat_id;
                    ?>
" data-post-per-page="<?php 
                    echo $post_per_page;
                    ?>
" data-page-namber="<?php 
                    echo $current_page - 1;
                    ?>
"  href="#"></a></li>
                            <?php 
                } else {
                    if ($i == $page_count + $t) {
                        ?>
                            <span class="page-numbers current"><?php 
                        echo $current_page;
                        ?>
</span>
                            <?php 
                    } else {
                        ?>
                            <li><a class="page-numbers" data-categories="<?php 
                        echo $cat_id;
                        ?>
" data-post-per-page="<?php 
                        echo $post_per_page;
                        ?>
" data-page-namber="<?php 
                        echo $i - 1;
                        ?>
" href="#"><?php 
                        echo $i - 1;
                        ?>
</a></li>

                            <?php 
                    }
                }
            } else {
                if ($i == 1) {
                    if ($current_page == $i) {
                        ?>
                                <span class="page-numbers current"><?php 
                        echo $current_page;
                        ?>
</span>
                                <?php 
                    } else {
                        ?>
                                <li><a class="prev page-numbers" data-categories="<?php 
                        echo $cat_id;
                        ?>
" data-post-per-page="<?php 
                        echo $post_per_page;
                        ?>
" data-page-namber="<?php 
                        echo $current_page - 1;
                        ?>
"  href="#"></a></li>
                                <?php 
                    }
                } else {
                    if ($i == $page_count + $t) {
                        if ($current_page == $i - $t) {
                            ?>
                                <span class="page-numbers current"><?php 
                            echo $current_page;
                            ?>
</span>
                                <?php 
                        } else {
                            ?>
                                <li><a class="next page-numbers" data-categories="<?php 
                            echo $cat_id;
                            ?>
" data-post-per-page="<?php 
                            echo $post_per_page;
                            ?>
" data-page-namber="<?php 
                            echo $current_page + 1;
                            ?>
" href="#"></a></li>
                                <?php 
                        }
                        ?>

                            <?php 
                    } else {
                        if ($current_page == $i) {
                            ?>
                                <span class="page-numbers current"><?php 
                            echo $current_page;
                            ?>
</span>
                                <?php 
                        } else {
                            ?>
                                <li><a class="page-numbers" data-categories="<?php 
                            echo $cat_id;
                            ?>
" data-post-per-page="<?php 
                            echo $post_per_page;
                            ?>
" data-page-namber="<?php 
                            echo $i;
                            ?>
" href="#"><?php 
                            echo $i;
                            ?>
</a></li>
                                <?php 
                        }
                        ?>

                            <?php 
                    }
                }
            }
        }
        ?>
            </div>
                <?php 
    }
    ?>
				
        <input type="hidden" id="uniq_id" data-uniq-id="<?php 
    echo $uniq_id;
    ?>
">				
    </section>
        <?php 
    $response = ob_get_contents();
    ob_end_clean();
    echo $response;
    die;
}
Exemplo n.º 5
0
                            <?php 
            foreach ($pictures as $pic) {
                ?>
                                <li>
                                    <a rel="folio" href="<?php 
                echo $pic['imgurl'];
                ?>
" class="single-image plus-icon animTop" title="<?php 
                echo $t = TMM::get_option('hide_image_titles') == '0' ? $pic['title'] : '';
                ?>
">
                                        <img alt="<?php 
                echo $pic['title'];
                ?>
" src="<?php 
                echo TMM_Helper::resize_image($pic['imgurl'], $image_alias);
                ?>
">
                                    </a>
                                </li>
                            <?php 
            }
            ?>
                        </ul>
                    </div>
                <?php 
        }
        ?>

            </div><!--/ .columns-->
Exemplo n.º 6
0
                    ?>

							<div class="image-post-slider">
								<ul>
									<?php 
                    if (!empty($gall)) {
                        ?>
										<?php 
                        foreach ($gall as $key => $source_url) {
                            ?>
											<li>
												<a rel="lightbox" href="<?php 
                            echo $source_url;
                            ?>
" class="single-image plus-icon"><img src="<?php 
                            echo TMM_Helper::resize_image($source_url, $thumb_size);
                            ?>
" alt="<?php 
                            echo $post->post_title;
                            ?>
" /></a>
											</li>
										<?php 
                        }
                        ?>
									<?php 
                    }
                    ?>
								</ul>
							</div><!--/ .image-post-slider-->
Exemplo n.º 7
0
}
// Styles
if (!empty($styles)) {
    $styles = 'style="' . $styles . '"';
}
$html .= $action == "link" ? '<div class="work-item">' : '<div>';
if (!empty($align)) {
    $css_class .= $align . ' ';
}
if (!empty($animation)) {
    $css_class .= $animation;
}
if (!empty($css_class)) {
    $css_class = 'class="' . $css_class . '"';
}
$src = TMM_Helper::resize_image($image_url, $image_size_alias);
$html .= '<img ' . $css_class . ' alt="' . $image_alt . '" ' . $styles . ' src="' . $src . '" />';
if ($action == "link") {
    $html .= '<div class="image-extra">

                    <div class="extra-content">

                        <div class="inner-extra">
                            <a class="single-image link-icon" href="' . $image_action_link . '" target="' . $target . '"></a>
                        </div><!--/ .inner-extra-->	

                    </div><!--/ .extra-content-->

                </div><!--/ .image-extra-->';
}
$html .= '</div><!--/ .work-item-->';
Exemplo n.º 8
0
						<?php 
            foreach ($tmm_gallery as $pic) {
                ?>
							<li>
								<a title="<?php 
                echo $pic['title'];
                ?>
" rel="gall" href="<?php 
                echo $pic['imgurl'];
                ?>
" class="single-image plus-icon animTop" title="">
									<img alt="<?php 
                echo $pic['title'];
                ?>
" src="<?php 
                echo TMM_Helper::resize_image($pic['imgurl'], '940*480');
                ?>
">
								</a>
							</li>
						<?php 
            }
            ?>
					</ul>			
				</div><!--/ .cycle-slider-->	
			<?php 
        }
        ?>

			<?php 
        the_content();
<li class="gallery_item">
	<img class="gallery_thumb" src="<?php 
echo TMM_Helper::resize_image($imgurl, "100*100");
?>
" alt="" />
	<input type="hidden" value="<?php 
echo $imgurl;
?>
" class="post_pod_gallery_item" name="post_type_values[gallery][]">
	<a href="#" class="delete_gallery_item" title="<?php 
_e("Delete Item", 'almera');
?>
"><?php 
_e("Delete Item", 'almera');
?>
</a>
</li>
 public static function resize_image($src, $size)
 {
     if (class_exists('TMM_Helper')) {
         return TMM_Helper::resize_image($src, $size);
     }
     return $src;
 }
Exemplo n.º 11
0
$images = explode('^', $titles);
$links = explode('^', $content);
?>

<?php 
if (!empty($images)) {
    ?>
	<ul class="clients-items clearfix">
		<?php 
    foreach ($images as $key => $img_src) {
        ?>
			<li class="<?php 
        if ($animation) {
            echo $animation;
        }
        ?>
">
				<a href="<?php 
        echo !empty($links[$key]) ? $links[$key] : '#';
        ?>
"><img alt="" src="<?php 
        echo TMM_Helper::resize_image($img_src, '');
        ?>
"></a>
			</li>
		<?php 
    }
    ?>
	</ul>
<?php 
}
			<div class="entry-body row_container">

				<div class="event-desc nine columns">

					<?php 
        if ($event['featured_image_src']) {
            ?>

					<div class="work-item">
						<a href="<?php 
            echo $event['url'];
            ?>
">
							<figure>
								<img src="<?php 
            echo TMM_Helper::resize_image($event['featured_image_src'], '500*260');
            ?>
" alt="<?php 
            echo $event['title'];
            ?>
">
							</figure>
						</a>
					</div>

					<?php 
        }
        ?>
					
					<p><?php 
        echo $event['post_excerpt'];
Exemplo n.º 13
0
$unique_id = uniqid();
$google_fonts = TMM_HelperFonts::get_google_fonts();
$content_fonts = TMM_HelperFonts::get_content_fonts();
$fonts = array_merge($content_fonts, $google_fonts);
$fonts = array_merge(array("" => ""), $fonts);
?>
<div class="slide-item" id="slide_item_<?php 
echo $unique_id;
?>
">

	<div class="slide-dragger"></div>

    <div class="slide-thumb">
		<img src="<?php 
echo TMM_Helper::resize_image($group['imgurl'], '155*55');
?>
" alt="slide" />
		<input type="hidden" name="slides_group[<?php 
echo $unique_id;
?>
][imgurl]" value="<?php 
echo $group['imgurl'];
?>
" />
		<a href="#" class="button js_edit_slide" data-slide-id="<?php 
echo $unique_id;
?>
"><?php 
_e('Edit Image', 'almera');
?>
Exemplo n.º 14
0
        echo $foliopost_key;
        ?>
" style="opacity: 0">
			<div class="project-thumb">
				<a href="<?php 
        echo $image['imgurl'];
        ?>
" class="single-image <?php 
        echo $video_icon;
        ?>
 plus-icon animTop" rel="masonry" title="<?php 
        echo $t = TMM::get_option('hide_image_titles') == '0' ? $image['title'] : '';
        ?>
">
					<img src="<?php 
        echo TMM_Helper::resize_image($th_url, $columns_img_sizes[$col]);
        ?>
" alt="" />
					<span class="curtain"></span>
				</a>
				<a href="<?php 
        echo get_permalink($image['id']);
        ?>
" class="project-meta">
					<h6 class="title"><?php 
        echo str_replace('^', '<br />', $image['title']);
        ?>
</h6>
					<span class="categories"><?php 
        echo strip_tags(get_the_term_list($image['id'], 'foliocat', '', ' / ', ''));
        ?>