* @version 1.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly global $post; ?> <div class="single-featured"> <?php if (has_post_thumbnail()) { $image = get_the_post_thumbnail($post->ID, 'project-single'); $image_title = esc_attr(get_the_title(get_post_thumbnail_id())); $image_link = wp_get_attachment_url(get_post_thumbnail_id()); $attachment_count = count(projects_get_gallery_attachment_ids()); if ($attachment_count > 0) { $gallery = '[project-gallery]'; } else { $gallery = ''; } if (apply_filters('projects_gallery_link_images', true)) { echo '<a href="' . $image_link . '" title="' . $image_title . '">' . $image . '</a>'; } else { echo $image; } } ?> </div>
/** * Add body classes for Projects pages * * @param array $classes * @return array */ function woo_projects_body_class($classes) { $classes = (array) $classes; if (is_projects()) { $classes[] = 'projects'; $classes[] = 'projects-page'; } if (is_project()) { $attachments = count(projects_get_gallery_attachment_ids()); if ($attachments > 0) { $classes[] = 'has-gallery'; } else { $classes[] = 'no-gallery'; } if (!has_post_thumbnail()) { $classes[] = 'no-cover-image'; } } return array_unique($classes); }
* Single Project Image * * @author WooThemes * @package Projects/Templates * @version 1.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly global $post, $projects, $project; ?> <div class="gallery"> <?php $attachment_ids = projects_get_gallery_attachment_ids(); if ($attachment_ids) { ?> <?php $loop = 0; $columns = apply_filters('projects_project_gallery_columns', 3); foreach ($attachment_ids as $attachment_id) { $classes = array('zoom'); if ($loop == 0 || $loop % $columns == 0) { $classes[] = 'first'; } if (($loop + 1) % $columns == 0) { $classes[] = 'last'; } $image_link = wp_get_attachment_url($attachment_id);
/** * Featured Area: Standard (Images) * * @since Marketify 1.2 * * @return void */ function marketify_project_standard_player() { global $post; if ('grid' == marketify_theme_mod('product-display', 'product-display-single-style')) { return; } $images = projects_get_gallery_attachment_ids(); $before = '<div class="download-image">'; $after = '</div>'; $before = '<div class="download-image flexslider">'; echo $before; ?> <ul class="slides"> <?php foreach ($images as $image) { ?> <li><?php echo wp_get_attachment_image($image, 'fullsize'); ?> </li> <?php } ?> </ul> <?php echo $after; }