本文整理汇总了PHP中cmsms_thumb函数的典型用法代码示例。如果您正苦于以下问题:PHP cmsms_thumb函数的具体用法?PHP cmsms_thumb怎么用?PHP cmsms_thumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cmsms_thumb函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: the_post
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;
示例2: get_header
* @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'] . '×' . $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, __('← Previous', 'cmsmasters'));
?>
</div>
<div class="fr"><?php
next_image_link(false, __('Next →', 'cmsmasters'));
?>
</div>
<div class="cl"></div>
<br />
</div>
<?php
echo '</div>' . "\n" . '<div class="divider"></div>';
示例3: cmsmsLike
<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 _________________________ -->
示例4: get_the_ID
}
}
}
}
}
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');
示例5: foreach
<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";
示例6: foreach
<?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');
示例7: foreach
<?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">
示例8: posttype_shortcode
//.........这里部分代码省略.........
$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) {
示例9: the_ID
}
?>
<!--_________________________ 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 _________________________ -->
示例10: widget
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'));
//.........这里部分代码省略.........
示例11: cmsms_heading
<?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');
示例12: the_ID
<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">