Exemplo n.º 1
0
                Idp_Main::categoriesSetAllImages($building_id) ? print "style=\"display:none;\"" : (print "");
                ?>
 >
							<div class="alert alert-warning" role="alert">
									<?php 
                echo __('You may not submit this building until a category has been assigned to every image ', 'idp-theme');
                ?>
							</div>
						</div>
						<div class="row">
							<?php 
                foreach ($building_images as $key => $image) {
                    $image_tags = Idp_Main::getImageTags($image);
                    $thumb = wp_get_attachment_image_src($image, array('800', '800'));
                    $full = wp_get_attachment_image_src($image, 'full');
                    $image_category = Idp_Main::getImageCategory($image);
                    ?>
										<div class="col-xs-12 col-md-4">
											<div class="image-container">
												<div class="thumbnail">	
													<button type="button" class="btn btn-primary btn-xs overlay-btn" data-toggle="modal" data-target="#thumbnailCrop" data-imageurl="<?php 
                    echo $full[0];
                    ?>
" data-imageid="<?php 
                    echo $image;
                    ?>
"><?php 
                    _e('Choose thumbnail view', 'idp-theme');
                    ?>
</button>
															
Exemplo n.º 2
0
function printCategoryAndTags($attachment_id)
{
    $category = Idp_Main::getImageCategory($attachment_id);
    $tags = Idp_Main::getImageTags($attachment_id);
    if (!empty($category) && $category[0]->id > 0) {
        $result = "<span class=\"label label-warning\">" . $category[0]->name . "</span> ";
    } else {
        $result = "";
    }
    foreach ($tags as $tag) {
        $result = $result . "<span class=\"label label-info\">" . $tag->name . "</span> ";
    }
    if ($result != "") {
        $result = "<small>" . $result . "</small>";
    }
    return $result;
}