本文整理汇总了PHP中wptouch_has_post_thumbnail函数的典型用法代码示例。如果您正苦于以下问题:PHP wptouch_has_post_thumbnail函数的具体用法?PHP wptouch_has_post_thumbnail怎么用?PHP wptouch_has_post_thumbnail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wptouch_has_post_thumbnail函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wptouch_get_post_classes
function wptouch_get_post_classes()
{
global $post;
$post_classes = array('post', 'section');
// Add the post ID as a class
if (isset($post->ID)) {
$post_classes[] = 'post-' . $post->ID;
}
// Add the post title
if (isset($post->post_name)) {
$post_classes[] = 'post-name-' . $post->post_name;
}
// Add the post parent
if (isset($post->post_parent) && $post->post_parent) {
$post_classes[] = 'post-parent-' . $post->post_parent;
}
// Add the post parent
if (isset($post->post_author) && $post->post_author) {
$post_classes[] = 'post-author-' . $post->post_author;
}
if (is_single()) {
$post_classes[] = 'single';
} else {
$post_classes[] = 'not-single';
}
if (is_page()) {
$post_classes[] = 'page';
} else {
$post_classes[] = 'not-page';
}
if (wptouch_has_post_thumbnail()) {
$post_classes[] = 'has-thumbnail';
} else {
$post_classes[] = 'no-thumbnail';
}
return apply_filters('wptouch_post_classes', $post_classes);
}
开发者ID:jamesfacts,项目名称:gissler_wp_touch,代码行数:37,代码来源:theme.php
示例2: wptouch_the_post_thumbnail
?>
</span>
</div>
<?php
}
?>
<?php
if (bauhaus_should_show_thumbnail() && wptouch_has_post_thumbnail()) {
?>
<img src="<?php
wptouch_the_post_thumbnail('thumbnail');
?>
" alt="thumbnail" class="post-thumbnail wp-post-image" />
<?php
} else {
if (bauhaus_should_show_thumbnail() && !wptouch_has_post_thumbnail()) {
?>
<div class="date-circle">
<span class="month"><?php
the_time('M');
?>
</span>
<span class="day"><?php
the_time('j');
?>
</span>
</div>
<?php
}
}
?>
开发者ID:phanhoanglong2610,项目名称:flowershop,代码行数:31,代码来源:post-loop.php
示例3: wptouch_post_classes
$query->the_post();
?>
<li class="<?php
wptouch_post_classes();
?>
">
<?php
if (classic_should_show_thumbnail() && wptouch_has_post_thumbnail()) {
?>
<img src="<?php
wptouch_the_post_thumbnail('thumbnail');
?>
" alt="thumbnail" class="post-thumbnail wp-post-image" />
<?php
} elseif (classic_should_show_thumbnail() && !wptouch_has_post_thumbnail()) {
?>
<span class="placeholder"><!-- styled in css --></span>
<?php
}
?>
<p class="date"><?php
wptouch_the_time();
?>
</p>
<a href="<?php
wptouch_the_permalink();
?>
"><?php
the_title();
?>
开发者ID:satoshishimazaki,项目名称:mknowhere,代码行数:31,代码来源:search.php
注:本文中的wptouch_has_post_thumbnail函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论