echo '<section id="content" class="fr" role="main">' . "\n\t";
} else {
    echo '<section id="middle_content" role="main">' . "\n\t";
}
echo '<div class="entry">' . "\n\t";
if (have_posts()) {
    the_post();
    if (has_post_thumbnail()) {
        if (has_post_thumbnail()) {
            if ($cmsms_layout == 'r_sidebar' || $cmsms_layout == 'l_sidebar') {
                echo '<div class="cmsms_media">' . "\n\t";
                cmsms_thumb(get_the_ID(), 'post-thumbnail', false, 'img_' . get_the_ID(), true, false, true, true, false);
                echo "\r" . '</div>';
            } else {
                echo '<div class="cmsms_media">' . "\n\t";
                cmsms_thumb(get_the_ID(), 'full-thumb', false, 'img_' . get_the_ID(), true, false, true, true, false);
                echo "\r" . '</div>';
            }
        }
    }
    the_content();
    wp_link_pages(array('before' => '<div class="subpage_nav" role="navigation">' . '<strong>' . __('Pages', 'cmsmasters') . ':</strong>', 'after' => '</div>' . "\n", 'link_before' => ' [ ', 'link_after' => ' ] '));
    cmsms_content_composer(get_the_ID());
}
echo '</div>' . "\n";
if (get_query_var('paged')) {
    $paged = get_query_var('paged');
} elseif (get_query_var('page')) {
    $paged = get_query_var('page');
} else {
    $paged = 1;
 * @subpackage Newgate
 * @since Newgate 1.0
 * 
 * Images Page Template
 * Created by CMSMasters
 * 
 */
get_header();
echo '<!--_________________________ Start Content _________________________ -->' . "\n" . '<section id="middle_content" role="main">' . "\n";
if (have_posts()) {
    the_post();
    echo '<div class="entry image-attachment">' . "\n";
    $metadata = wp_get_attachment_metadata();
    echo '<footer class="entry-meta">';
    edit_post_link(__('Edit Media', 'cmsmasters'), '<span class="edit-link fr">', '</span>');
    echo '<p>' . __('Published', 'cmsmasters') . ' <abbr class="published" title="' . get_the_date() . '">' . get_the_date() . '</abbr> ' . __('at', 'cmsmasters') . ' ' . $metadata['width'] . '&times;' . $metadata['height'] . ' ' . __('in', 'cmsmasters') . ' ' . '<a href="' . esc_url(get_permalink($post->post_parent)) . '" title="' . cmsms_title($post->post_parent, false) . '">' . cmsms_title($post->post_parent, false) . '</a>.</p>' . '</footer>' . '<br />' . '<div class="tac">' . cmsms_thumb(get_the_ID(), 'slider-thumb', false, 'img_' . get_the_ID(), true, true, true, false, get_the_ID()) . '</div>' . '<div class="cl"></div>' . '<br />';
    ?>
		<div class="navigation" role="navigation">
			<div class="fl"><?php 
    previous_image_link(false, __('&larr; Previous', 'cmsmasters'));
    ?>
</div>
			<div class="fr"><?php 
    next_image_link(false, __('Next &rarr;', 'cmsmasters'));
    ?>
</div>
			<div class="cl"></div>
			<br />
		</div>
<?php 
    echo '</div>' . "\n" . '<div class="divider"></div>';
		<div class="cmsms_like"><?php 
cmsmsLike();
?>
</div>
		<?php 
cmsms_post_date('post', 'post');
if (!post_password_required()) {
    cmsms_comments('post');
}
cmsms_meta('post', 'post');
?>
	</header>
	<?php 
if (!post_password_required()) {
    if (has_post_thumbnail() && $cmsms_post_featured_image_show == 'true' && $cmsms_heading != 'parallax') {
        cmsms_thumb(get_the_ID(), 'post-thumbnail', false, 'img_' . get_the_ID(), true, false, true, true, false);
    }
}
?>
	<footer class="entry-meta">
		<?php 
echo '<div class="entry-content">' . "\n";
the_content();
wp_link_pages(array('before' => '<div class="subpage_nav" role="navigation">' . '<strong>' . __('Pages', 'cmsmasters') . ':</strong>', 'after' => '</div>' . "\n", 'link_before' => ' [ ', 'link_after' => ' ] '));
cmsms_content_composer(get_the_ID());
echo "\t\t" . '</div>' . "\n";
cmsms_tags(get_the_ID(), 'post', 'post');
?>
	</footer>
</article>
<!--_________________________ Finish Standard Article _________________________ -->
                        }
                    }
                }
            }
        }
        echo '<figure>' . '<a href="' . $link_href[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="preloader highImg jackbox">' . wp_get_attachment_image($cmsms_project_image, $project_thumb, false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</a>' . '</figure>';
        $colnumb++;
    }
    echo '</div>';
} elseif (sizeof($cmsms_project_images) == 1 && $cmsms_project_images[0] != '') {
    echo '<div class="resize">';
    cmsms_thumb(get_the_ID(), $project_thumb, false, 'img_' . get_the_ID(), true, true, true, true, $cmsms_project_images[0]);
    echo '</div>';
} elseif (sizeof($cmsms_project_images) < 1 && has_post_thumbnail() && $cmsms_project_featured_image_show == 'true') {
    echo '<div class="resize">';
    cmsms_thumb(get_the_ID(), $project_thumb, false, 'img_' . get_the_ID(), true, true, true, true, false);
    echo '</div>';
}
cmsmsLike();
?>
	</div>
	<footer class="entry-meta">
		<?php 
echo '<h5>' . __('Project details', 'cmsmasters') . '</h5>' . "\n\t\t";
echo '<ul class="cmsms_details">' . "\n\t\t\t";
cmsms_pj_date('post');
cmsms_pj_cat(get_the_ID(), 'pj-sort-categs', 'post');
cmsms_pj_author('post');
cmsms_pj_comments('post');
cmsms_pj_tag(get_the_ID(), 'pj-tags', 'post');
cmsms_link(get_the_ID(), 'project');
Exemple #5
0
		<div class="resize">
			<?php 
if ($cmsms_project_video_type == 'selfhosted' && !empty($cmsms_project_video_links) && sizeof($cmsms_project_video_links) > 0) {
    foreach ($cmsms_project_video_links as $cmsms_project_video_link_url) {
        $video_link[$cmsms_project_video_link_url[0]] = $cmsms_project_video_link_url[1];
    }
    if (has_post_thumbnail()) {
        $poster = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'project-thumb-full');
        $video_link['poster'] = $poster[0];
    }
    echo '<div class="cmsms_blog_media">' . cmsmastersSingleVideoPlayer($video_link) . '</div>';
} elseif ($cmsms_project_video_type == 'embedded' && $cmsms_project_video_link != '') {
    echo '<div class="cmsms_blog_media">' . '<div class="resizable_block">' . get_video_iframe($cmsms_project_video_link) . '</div>' . '</div>';
} else {
    if (has_post_thumbnail() && $cmsms_project_featured_image_show == 'true' && $cmsms_heading != 'parallax') {
        cmsms_thumb(get_the_ID(), 'project-thumb-full', true, false, true, false, true, true, false);
    }
}
echo '<div class="entry-content">' . "\n";
the_content();
wp_link_pages(array('before' => '<div class="subpage_nav" role="navigation">' . '<strong>' . __('Pages', 'cmsmasters') . ':</strong>', 'after' => '</div>' . "\n", 'link_before' => ' [ ', 'link_after' => ' ] '));
cmsms_content_composer(get_the_ID());
echo "\t\t" . '</div>' . "\n";
?>
		</div>
	</div>
	<footer class="entry-meta">
		<div class="cmsms_meta_inner">
			<?php 
echo '<h5>' . __('Project details', 'cmsmasters') . '</h5>' . "\n\t\t";
echo '<ul class="cmsms_details">' . "\n\t\t\t";
							<?php 
        foreach ($cmsms_post_images as $cmsms_post_image) {
            echo "\t\t\t\t\t\t" . '<li>' . "\n\t\t\t\t\t\t\t" . '<figure>' . "\n\t\t\t\t\t\t\t\t" . wp_get_attachment_image($cmsms_post_image, 'slider-thumb', false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . "\r\t\t\t\t\t\t\t" . '</figure>' . "\r\t\t\t\t\t\t" . '</li>' . "\r";
        }
        ?>
						</ul>
					</div>
				</div>
			</div>
			<?php 
    } else {
        if (sizeof($cmsms_post_images) == 1) {
            cmsms_thumb(get_the_ID(), 'slider-thumb', false, 'img_' . get_the_ID(), true, true, true, true, $cmsms_post_images[0]);
        } else {
            if (sizeof($cmsms_post_images) < 1 && has_post_thumbnail() && $cmsms_post_featured_image_show == 'true') {
                cmsms_thumb(get_the_ID(), 'slider-thumb', false, 'img_' . get_the_ID(), true, true, true, true, false);
            }
        }
    }
}
?>
		</header>
		<?php 
cmsms_heading(get_the_ID());
?>
		<footer class="entry-meta">
			<?php 
cmsms_meta();
cmsms_exc_cont();
cmsms_more(get_the_ID());
cmsms_tags(get_the_ID(), 'post', 'page');
Exemple #7
0
						<?php 
    foreach ($cmsms_project_images as $cmsms_project_image) {
        echo '<li>' . '<figure>' . wp_get_attachment_image($cmsms_project_image, 'project-slider-thumb-full', false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</figure>' . '</li>';
    }
    ?>
						</ul>
					</div>
				</div>
			</div>
			<?php 
} else {
    if (sizeof($cmsms_project_images) == 1 && $cmsms_project_images[0] != '') {
        cmsms_thumb(get_the_ID(), 'project-slider-thumb-full', false, 'img_' . get_the_ID(), true, true, true, true, $cmsms_project_images[0]);
    } else {
        if (sizeof($cmsms_project_images) < 1 && has_post_thumbnail() && $cmsms_project_featured_image_show == 'true' && $cmsms_heading != 'parallax') {
            cmsms_thumb(get_the_ID(), 'project-slider-thumb-full', false, 'img_' . get_the_ID(), true, true, true, true, false);
        }
    }
}
?>
		</div>
		<?php 
echo '<div class="entry-content">' . "\n";
the_content();
wp_link_pages(array('before' => '<div class="subpage_nav" role="navigation">' . '<strong>' . __('Pages', 'cmsmasters') . ':</strong>', 'after' => '</div>' . "\n", 'link_before' => ' [ ', 'link_after' => ' ] '));
cmsms_content_composer(get_the_ID());
echo "\t\t" . '</div>' . "\n";
?>
	</div>
	<footer class="entry-meta">
		<div class="cmsms_meta_inner">
/**
 * Post Types Shortcode
 */
function posttype_shortcode($atts, $content = null)
{
    extract(shortcode_atts(array('post_title' => '', 'post_type' => 'post', 'post_sort' => 'latest', 'post_category' => '', 'post_number' => '3', 'post_slide' => 'false', 'show_images' => 'true', 'show_content' => 'false', 'show_info' => 'false'), $atts));
    global $cmsms_layout;
    $unid = uniqid();
    $queryArgs = array('posts_per_page' => $post_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'post_type' => $post_type);
    switch ($post_sort) {
        case 'category':
            if ($post_type == 'post') {
                $queryArgs['category_name'] = $post_category;
            } else {
                if ($post_type == 'project') {
                    $queryArgs['tax_query'] = array(array('taxonomy' => 'pj-categs', 'field' => 'slug', 'terms' => array($post_category)));
                } else {
                    if ($post_type == 'testimonial') {
                        $queryArgs['tax_query'] = array(array('taxonomy' => 'tl-categs', 'field' => 'slug', 'terms' => array($post_category)));
                    }
                }
            }
            break;
        case 'popular':
            $queryArgs['order'] = 'DESC';
            $queryArgs['orderby'] = 'meta_value';
            $queryArgs['meta_key'] = 'cmsms_likes';
            break;
    }
    $col_width = 'one_third';
    $col_counter = 0;
    $posttype_query = new WP_Query($queryArgs);
    if ($post_slide == 'true') {
        $out = '<section id="portfolio_shortcode_' . $unid . '" class="post_type_shortcode';
        if ($post_type == 'testimonial') {
            $out .= ' type_testimonial';
        }
        if ($post_title == '') {
            $post_title = '&nbsp;';
        }
        $out .= '"><div class="post_type_shortcode_inner"><h2>' . $post_title . '</h2>' . '<script type="text/javascript"> ' . 'jQuery(document).ready(function () { ' . "jQuery('#portfolio_shortcode_{$unid} .post_type_list').cmsmsResponsiveContentSlider( { " . "sliderWidth : '100%', " . "sliderHeight : 'auto', " . 'animationSpeed : 500, ' . "animationEffect : 'slide', " . "animationEasing : 'easeInOutExpo', " . 'pauseTime : 0, ' . 'activeSlide : 1, ' . 'touchControls : false, ' . 'pauseOnHover : false, ' . 'arrowNavigation : true, ' . 'slidesNavigation : false ' . '} ); ' . '} ); ' . '</script>' . '<ul class="post_type_list portfolio_container responsiveContentSlider">' . '<li>';
    } else {
        $out = '<section class="post_type_shortcode">';
        if ($post_title != '') {
            $out .= '<h2>' . $post_title . '</h2>';
        }
    }
    if ($posttype_query->have_posts()) {
        while ($posttype_query->have_posts()) {
            $posttype_query->the_post();
            if ($post_type == 'project') {
                $type = get_post_meta(get_the_ID(), 'cmsms_project_format', true);
            } else {
                $type = get_post_format();
            }
            $classes = '';
            if ($post_type == 'project') {
                $new_classes = $col_width . ' format-' . $type;
            } elseif ($post_type == 'testimonial') {
                $new_classes = 'one_first';
            } else {
                $new_classes = $col_width;
            }
            foreach (get_post_class(array($new_classes)) as $class) {
                $classes .= ' ' . $class;
            }
            if ($post_type != 'testimonial') {
                if ($post_slide == 'true') {
                    if ($col_counter == 3) {
                        $out .= '</li>' . '<li>';
                        $col_counter = 0;
                    }
                }
            } elseif ($post_slide == 'true') {
                if ($col_counter == 1) {
                    $out .= '</li>' . '<li>';
                    $col_counter = 0;
                }
            }
            $out .= '<article class="' . ltrim($classes) . '">';
            if ($post_type == 'testimonial') {
                $cmsms_testimonial_author = get_post_meta(get_the_ID(), 'cmsms_testimonial_author', true);
                $cmsms_testimonial_author_link = get_post_meta(get_the_ID(), 'cmsms_testimonial_author_link', true);
                $cmsms_testimonial_company = get_post_meta(get_the_ID(), 'cmsms_testimonial_company', true);
            } elseif ($post_type == 'project') {
                $img_number_list = explode(',', str_replace(' ', '', str_replace('img_', '', get_post_meta(get_the_ID(), 'cmsms_project_images', true))));
                $cmsms_project_video_link = get_post_meta(get_the_ID(), 'cmsms_project_video_link', true);
                $cmsms_project_video_links = get_post_meta(get_the_ID(), 'cmsms_project_video_links', true);
            } else {
                $img_number_list = explode(',', str_replace(' ', '', str_replace('img_', '', get_post_meta(get_the_ID(), 'cmsms_post_images', true))));
                $cmsms_post_image_link = get_post_meta(get_the_ID(), 'cmsms_post_image_link', true);
                $cmsms_post_aside_text = get_post_meta(get_the_ID(), 'cmsms_post_aside_text', true);
                $cmsms_post_quote_text = get_post_meta(get_the_ID(), 'cmsms_post_quote_text', true);
                $cmsms_post_quote_author = get_post_meta(get_the_ID(), 'cmsms_post_quote_author', true);
                $cmsms_post_link_text = get_post_meta(get_the_ID(), 'cmsms_post_link_text', true);
                $cmsms_post_link_address = get_post_meta(get_the_ID(), 'cmsms_post_link_address', true);
                $cmsms_post_video_link = get_post_meta(get_the_ID(), 'cmsms_post_video_link', true);
                $cmsms_post_video_links = get_post_meta(get_the_ID(), 'cmsms_post_video_links', true);
            }
            if ($post_type != 'testimonial') {
                if ($show_images == 'true') {
                    $out .= '<div class="wrap_project">';
                    if ($type == 'slider' || $type == 'album' || $type == 'gallery') {
                        if (has_post_thumbnail()) {
                            $out .= '<figure>' . get_the_post_thumbnail(get_the_ID(), 'post-thumbnail', array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</figure>';
                        } else {
                            if (sizeof($img_number_list) > 0 && !has_post_thumbnail()) {
                                $out .= '<figure>' . wp_get_attachment_image($img_number_list[0], 'post-thumbnail', false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</figure>';
                            } else {
                                $out .= '<figure>' . '<img src="' . get_template_directory_uri() . '/img/PT-gallery.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" class="fullwidth" />' . '</figure>';
                            }
                        }
                    } else {
                        if ($type == 'image' && $cmsms_post_image_link) {
                            $out .= cmsms_thumb(get_the_ID(), 'post-thumbnail', true, false, true, false, true, false, $cmsms_post_image_link);
                        } else {
                            if (has_post_thumbnail()) {
                                $out .= cmsms_thumb(get_the_ID(), 'post-thumbnail', true, false, true, false, true, false, false);
                            } else {
                                $out .= '<figure>' . '<img src="' . get_template_directory_uri() . '/img/PT-' . ($type == 'image' || $type == '' ? 'placeholder' : $type) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" class="fullwidth" />' . '</figure>';
                            }
                        }
                    }
                    $cmsms_imagelink = wp_get_attachment_image_src($img_number_list[0], 'full');
                    $link_href = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full');
                    $out .= '<div class="portfolio_rollover">';
                    if ($type != 'video' && ($cmsms_imagelink != 0 || $cmsms_post_image_link != 0 || has_post_thumbnail())) {
                        if ($post_type == 'project' && ($type == 'slider' || $type == 'album' || $type == 'gallery')) {
                            $out .= '<a href="' . $cmsms_imagelink[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>';
                        } else {
                            $out .= '<a href="' . $link_href[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>';
                        }
                    } else {
                        if ($type == 'video' && ($cmsms_project_video_link != '' || $cmsms_project_video_links != '' || $cmsms_post_video_link != '' || $cmsms_post_video_links != '')) {
                            if ($post_type == 'project') {
                                $out .= '<a href="' . $cmsms_project_video_link . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>';
                            } else {
                                $out .= '<a href="' . $cmsms_post_video_link . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>';
                            }
                        }
                    }
                    $out .= '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_link"></a>';
                    $out .= '</div>';
                    if (sizeof($img_number_list) > 1) {
                        unset($img_number_list[0]);
                        $out .= '<div class="dn">';
                        foreach ($img_number_list as $img_number_list_image) {
                            $link_href = wp_get_attachment_image_src($img_number_list_image, 'full');
                            $out .= '<figure>' . '<a href="' . $link_href[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="preloader highImg jackbox">' . wp_get_attachment_image($img_number_list_image, 'project-thumb-half', false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</a>' . '</figure>';
                        }
                        $out .= '</div>';
                    }
                    $out .= '</div>';
                }
                $out .= '<header class="entry-header">' . '<h4 class="entry-title">' . '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '">' . cmsms_title(get_the_ID(), false) . '</a>' . '</h4>';
                if ($show_info == 'true') {
                    $out .= '<abbr class="published" title="' . get_the_date() . '">' . get_the_date() . '</abbr>';
                }
                $out .= '</header>';
            } else {
                if ($show_content == 'true') {
                    $out .= '<div class="tl-content_wrap">' . '<div class="tl-content">' . '<blockquote>' . theme_excerpt(60, false) . '</blockquote>' . '</div>' . '</div>';
                }
                if ($show_images == 'true') {
                    if (has_post_thumbnail() != '') {
                        $out .= get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false), 'style' => 'width:50px; height:50px;'));
                    }
                }
                if ($show_info == 'true') {
                    if ($cmsms_testimonial_author != '' && $cmsms_testimonial_author_link != '') {
                        $out .= '<h6 class="tl_author"><a target="_blank" href="' . $cmsms_testimonial_author_link . '" class="tl_author">' . $cmsms_testimonial_author . '</a></h6>' . "\n";
                    } elseif ($cmsms_testimonial_author != '' && $cmsms_testimonial_author_link == '') {
                        $out .= '<p class="tl_author">' . $cmsms_testimonial_author . '</p>' . "\n";
                    }
                    if ($cmsms_testimonial_company != '') {
                        $out .= '<p class="tl_company">' . $cmsms_testimonial_company . '</p>';
                    }
                }
            }
            $out .= '</article>';
            $col_counter++;
            if ($post_slide == 'false') {
                if ($col_counter == 3) {
                    $out .= '<div class="cl"></div>';
                    $col_counter = 0;
                }
            }
        }
    }
    if ($post_slide == 'true') {
        $out .= '</li>' . '</ul>';
    }
    $out .= '<div class="cl"></div>' . '</section>';
    wp_reset_postdata();
    return $out;
}
Exemple #9
0
}
?>

<!--_________________________ Start Slider Project _________________________ -->
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class('format-slider');
?>
 data-category="<?php 
echo $pj_categs;
?>
">
<?php 
if (has_post_thumbnail() && $cmsms_project_featured_image_show == 'true') {
    echo '<div class="media_box">' . cmsms_thumb(get_the_ID(), $pj_img_size, true, false, true, false, true, false, false) . '</div>' . '<div class="project_rollover">' . '<div class="project_rollover_inner">';
    cmsms_heading(get_the_ID(), 'project', true, 'h5');
    cmsms_meta('project', 'page', get_the_ID(), 'pj-sort-categs', 'fullwidth');
    echo '</div>' . '</div>';
} else {
    echo '<div class="media_box">' . '<figure class="preloader">' . '<img src="' . get_template_directory_uri() . '/img/PFP-XL-gallery.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" class="fullwidth" />' . '</figure>' . '</div>' . '<div class="project_rollover">' . '<div class="project_rollover_inner">';
    cmsms_heading(get_the_ID(), 'project', true, 'h5');
    cmsms_meta('project', 'page', get_the_ID(), 'pj-sort-categs', 'fullwidth');
    echo '</div>' . '</div>';
}
?>
</article>
<!--_________________________ Finish Slider Project _________________________ -->

Exemple #10
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     $latest = isset($instance['latest']) ? $instance['latest'] : true;
     $popular = isset($instance['popular']) ? $instance['popular'] : true;
     $recent = isset($instance['recent']) ? $instance['recent'] : true;
     $number = isset($instance['number']) ? (int) $instance['number'] : '';
     $widget_width = isset($instance['widget_width']) ? $instance['widget_width'] : 'one_first';
     if (empty($instance['number']) || !($number = absint($instance['number']))) {
         $number = 3;
     } elseif ($number < 1) {
         $number = 1;
     } elseif ($number > 15) {
         $number = 15;
     }
     echo '<div class="' . $widget_width . '">' . $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     echo '<div class="tab lpr">' . '<ul class="tabs">';
     if ($latest) {
         echo '<li>' . '<a href="#"><span>' . __('Latest', 'cmsmasters') . '</span></a>' . '</li>';
     }
     if ($popular) {
         echo '<li>' . '<a href="#"><span>' . __('Popular', 'cmsmasters') . '</span></a>' . '</li>';
     }
     if ($recent) {
         echo '<li>' . '<a href="#"><span>' . __('Comments', 'cmsmasters') . '</span></a>' . '</li>';
     }
     if (!$latest && !$popular && !$recent) {
         echo '<li>' . '<a href="#"><span>' . __('Latest', 'cmsmasters') . '</span></a>' . '</li>';
     }
     echo '</ul>' . '<div class="tab_content">';
     if ($latest) {
         $l = new WP_Query(array('posts_per_page' => $number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'post_type' => 'post'));
         if ($l->have_posts()) {
             echo '<div class="tabs_tab tab_latest">' . '<ul>';
             while ($l->have_posts()) {
                 $l->the_post();
                 $pt_format = get_post_format();
                 $attachments =& get_children(array('post_type' => 'attachment', 'post_mime_type' => 'image', 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => 'ASC'));
                 $post_link_text = get_post_meta(get_the_ID(), 'post_link_text', true);
                 $post_link_link = get_post_meta(get_the_ID(), 'post_link_link', true);
                 echo '<li>';
                 if ($pt_format == 'image' || $pt_format == 'gallery') {
                     echo '<div class="alignleft">';
                     if (has_post_thumbnail()) {
                         cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, false);
                     } elseif (!has_post_thumbnail() && sizeof($attachments) > 0) {
                         if (isset($att_counter)) {
                             unset($att_counter);
                         }
                         foreach ($attachments as $attachment) {
                             if (!isset($att_counter) && ($att_counter = true)) {
                                 cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, $attachment->ID);
                             }
                         }
                     } else {
                         echo '<figure>' . '<a href="' . get_permalink() . '"' . ' title="' . cmsms_title(get_the_ID(), false) . '">' . '<img src="' . get_template_directory_uri() . '/img/PF-' . ($pt_format == 'image' ? 'placeholder' : $pt_format) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" style="width:50px; height:50px;" />' . '</a>' . '</figure>';
                     }
                     echo '</div>';
                 } else {
                     echo '<div class="alignleft">';
                     if (has_post_thumbnail() && $pt_format != 'video') {
                         cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, false);
                     } else {
                         echo '<figure>' . '<a href="' . get_permalink() . '"' . ' title="' . cmsms_title(get_the_ID(), false) . '">' . '<img src="' . get_template_directory_uri() . '/img/PF-' . ($pt_format == '' ? 'placeholder' : $pt_format) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" style="width:50px; height:50px;" />' . '</a>' . '</figure>';
                     }
                     echo '</div>';
                 }
                 echo '<div class="ovh">';
                 if ($pt_format != 'aside' && $pt_format != 'link' && $pt_format != 'quote') {
                     echo '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '">' . cmsms_title(get_the_ID(), false) . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>';
                 } elseif ($pt_format == 'link') {
                     echo '<a href="' . $post_link_link . '" title="' . $post_link_text . '">' . $post_link_text . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>';
                 } elseif ($pt_format == 'aside') {
                     echo '<div class="entry-content">';
                     theme_excerpt(10);
                     echo '</div>' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>';
                 } elseif ($pt_format == 'quote') {
                     echo '<div class="entry-content">';
                     theme_excerpt(10);
                     echo '</div>' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>';
                 }
                 echo '</div>' . '<div class="cl"></div>' . '</li>';
             }
             echo '</ul>' . '</div>';
         }
         wp_reset_postdata();
         wp_reset_query();
     }
     if ($popular) {
         $p = new WP_Query(array('posts_per_page' => $number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'post_type' => 'post', 'order' => 'DESC', 'orderby' => 'meta_value', 'meta_key' => 'cmsms_likes'));
         if ($p->have_posts()) {
             echo '<div class="tabs_tab tab_popular">' . '<ul>';
             while ($p->have_posts()) {
                 $p->the_post();
                 $pt_format = get_post_format();
                 $attachments =& get_children(array('post_type' => 'attachment', 'post_mime_type' => 'image', 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => 'ASC'));
                 $post_link_text = get_post_meta(get_the_ID(), 'post_link_text', true);
                 $post_link_link = get_post_meta(get_the_ID(), 'post_link_link', true);
                 echo '<li>';
                 if ($pt_format == 'image' || $pt_format == 'gallery') {
                     echo '<div class="alignleft">';
                     if (has_post_thumbnail()) {
                         cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, false);
                     } elseif (!has_post_thumbnail() && sizeof($attachments) > 0) {
                         if (isset($att_counter)) {
                             unset($att_counter);
                         }
                         foreach ($attachments as $attachment) {
                             if (!isset($att_counter) && ($att_counter = true)) {
                                 cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, $attachment->ID);
                             }
                         }
                     } else {
                         echo '<figure>' . '<a href="' . get_permalink() . '"' . ' title="' . cmsms_title(get_the_ID(), false) . '">' . '<img src="' . get_template_directory_uri() . '/img/PF-' . ($pt_format == 'image' ? 'placeholder' : $pt_format) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" style="width:50px; height:50px;" />' . '</a>' . '</figure>';
                     }
                     echo '</div>';
                 } else {
                     echo '<div class="alignleft">';
                     if (has_post_thumbnail() && $pt_format != 'video') {
                         cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, false);
                     } else {
                         echo '<figure>' . '<a href="' . get_permalink() . '"' . ' title="' . cmsms_title(get_the_ID(), false) . '">' . '<img src="' . get_template_directory_uri() . '/img/PF-' . ($pt_format == '' ? 'placeholder' : $pt_format) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" style="width:50px; height:50px;" />' . '</a>' . '</figure>';
                     }
                     echo '</div>';
                 }
                 echo '<div class="ovh">';
                 if ($pt_format != 'aside' && $pt_format != 'link' && $pt_format != 'quote') {
                     echo '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '">' . cmsms_title(get_the_ID(), false) . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>';
                 } elseif ($pt_format == 'link') {
                     echo '<a href="' . $post_link_link . '" title="' . $post_link_text . '">' . $post_link_text . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>';
                 } elseif ($pt_format == 'aside') {
                     echo '<div class="entry-content">';
                     theme_excerpt(10);
                     echo '</div>' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>';
                 } elseif ($pt_format == 'quote') {
                     echo '<div class="entry-content">';
                     theme_excerpt(10);
                     echo '</div>' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>';
                 }
                 echo '</div>' . '<div class="cl"></div>' . '</li>';
             }
             echo '</ul>' . '</div>';
         }
         wp_reset_postdata();
         wp_reset_query();
     }
     if ($recent) {
         $rcomments = get_comments(array('number' => $number, 'post_type' => 'post', 'status' => 'approve'));
         if ($rcomments) {
             echo '<div class="tabs_tab tab_comments">' . '<ul>';
             foreach ($rcomments as $comment) {
                 $comment_post_ID = $comment->comment_post_ID;
                 $comment_author = $comment->comment_author;
                 $comment_author_url = $comment->comment_author_url;
                 $comment_date = mysql2date('U', $comment->comment_date, false);
                 $comment_content = $comment->comment_content;
                 $comment_array = explode(' ', $comment_content);
                 if (sizeof($comment_array) > 10) {
                     $new_comment_content = '';
                     for ($i = 0; $i < 10; $i++) {
                         $new_comment_content .= $comment_array[$i] . ' ';
                     }
                     $new_comment_content = trim($new_comment_content) . '...';
                 } else {
                     $new_comment_content = $comment_content;
                 }
                 echo '<li>' . ($comment_author_url != '' ? '<a href="' . $comment_author_url . '" title="' . $comment_author_url . '" target="_blank">' : '') . $comment_author . ($comment_author_url != '' ? '</a>' : '') . ' <span>' . __('on', 'cmsmasters') . '</span> <a href="' . get_permalink($comment_post_ID) . '#comments" rel="bookmark">' . cmsms_title($comment_post_ID, false) . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff($comment_date, current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>' . '<p>' . $new_comment_content . '</p>' . '</li>';
             }
             echo '</ul>' . '</div>';
         }
     }
     echo '</div>' . '</div>' . $after_widget . '</div>';
 }
Exemple #11
0
			<?php 
cmsms_heading(get_the_ID());
?>
			<div class="cmsms_post_info">
				<?php 
cmsms_post_date();
if (!post_password_required()) {
    cmsms_comments();
}
cmsms_meta();
?>
			</div>
			<?php 
if (!post_password_required()) {
    if (has_post_thumbnail() && $cmsms_post_featured_image_show == 'true') {
        cmsms_thumb(get_the_ID(), 'full-thumb', true, false, true, false, true, true, false);
    }
    if (!empty($cmsms_post_audio_links) && sizeof($cmsms_post_audio_links) > 0) {
        foreach ($cmsms_post_audio_links as $cmsms_post_audio_link_url) {
            $audio_link[$cmsms_post_audio_link_url[0]] = $cmsms_post_audio_link_url[1];
        }
        echo '<div class="cmsms_blog_media">' . "\n" . cmsmastersSingleAudioPlayer($audio_link) . "\r\t\t" . '</div>' . "\r\t\t";
    }
}
?>
		</header>
		<footer class="entry-meta">
			<?php 
cmsms_exc_cont();
cmsms_more(get_the_ID());
cmsms_tags(get_the_ID(), 'post', 'page');
Exemple #12
0
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class('format-album');
?>
 data-category="<?php 
echo $pj_categs;
?>
">
	<?php 
if (has_post_thumbnail() && $cmsms_project_featured_image_show == 'true') {
    echo '<div class="media_box">' . cmsms_thumb(get_the_ID(), $pj_img_size, true, false, true, false, true, false, false) . '</div>';
} else {
    if (sizeof($cmsms_project_images) > 0 && $cmsms_project_images[0] != '') {
        echo '<div class="media_box">' . cmsms_thumb(get_the_ID(), $pj_img_size, false, 'img_' . get_the_ID(), true, false, true, false, $cmsms_project_images[0]) . '</div>';
    } else {
        echo '<div class="media_box">' . '<figure class="preloader">' . '<img src="' . get_template_directory_uri() . '/img/PFP-XL-gallery.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" class="fullwidth" />' . '</figure>' . '</div>';
    }
}
if (sizeof($cmsms_project_images) > 1) {
    unset($cmsms_project_images[0]);
    echo '<div class="dn">';
    foreach ($cmsms_project_images as $cmsms_project_image) {
        $link_href = wp_get_attachment_image_src($cmsms_project_image, 'full');
        echo '<figure>' . '<a href="' . $link_href[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="preloader highImg jackbox">' . wp_get_attachment_image($cmsms_project_image, $pj_img_size, false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</a>' . '</figure>';
    }
    echo '</div>';
}
?>
	<div class="project_rollover">