本文整理汇总了PHP中wptouch_get_comment_count函数的典型用法代码示例。如果您正苦于以下问题:PHP wptouch_get_comment_count函数的具体用法?PHP wptouch_get_comment_count怎么用?PHP wptouch_get_comment_count使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wptouch_get_comment_count函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wptouch_fdn_comments_pagination
function wptouch_fdn_comments_pagination()
{
if (get_option('comments_per_page') < wptouch_get_comment_count()) {
return true;
} else {
return false;
}
}
示例2: elseif
<?php
if (is_sticky($post_ID)) {
echo '<div class="sticky-pushpin"></div>';
}
?>
<?php
if (wptouch_get_comment_count() && wptouch_theme_use_calendar_icons()) {
?>
<div class="comment-bubble <?php
if (wptouch_get_comment_count() > 9) {
echo 'double';
} elseif (wptouch_get_comment_count() > 99) {
echo 'triple';
}
?>
">
<?php
comments_number('0', '1', '%');
?>
</div>
<?php
}
?>
<?php
if (wptouch_theme_use_calendar_icons()) {
?>
示例3: wptouch_the_permalink
<!-- post loop -->
<a href="<?php
wptouch_the_permalink();
?>
" class="loop-link tappable clearfix <?php
if (!bauhaus_should_show_thumbnail()) {
echo 'no-thumbs';
}
?>
">
<?php
if (wptouch_get_comment_count() > 0 && comments_open()) {
?>
<div class="comments">
<span><?php
comments_number('0', '1', '%');
?>
</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
示例4: wptouch_post_classes
<div class="<?php
wptouch_post_classes();
?>
rounded-corners-8px">
<!-- text for 'back and 'next' is hidden via CSS, and replaced with arrow images -->
<div class="post-navigation nav-top">
<div class="post-nav-fwd">
<?php
classic_get_next_post_link();
?>
</div>
<div class="post-nav-middle">
<?php
if (wptouch_get_comment_count() > 0) {
echo '<a href="javascript: return false" class="middle-link no-ajax">' . __("Skip to Responses", "wptouch-pro") . '</a>';
}
?>
</div>
<div class="post-nav-back">
<?php
classic_get_previous_post_link();
?>
</div>
</div>
<div class="<?php
wptouch_content_classes();
?>
示例5: foundation_determine_images
function foundation_determine_images()
{
global $foundation_featured_posts;
global $foundation_featured_data;
global $post;
$settings = foundation_get_settings();
$foundation_featured_posts = array();
$foundation_featured_data = array();
$args = foundation_featured_get_args();
$new_posts = false;
switch ($settings->featured_type) {
case 'tag':
$new_posts = new WP_Query('tag=' . $settings->featured_tag . '&posts_per_page=' . $args['max_search']);
break;
case 'category':
$new_posts = new WP_Query('category_name=' . $settings->featured_category . '&posts_per_page=' . $args['max_search']);
break;
case 'posts':
if (function_exists('wptouch_custom_posts_add_to_search')) {
$post_types = wptouch_custom_posts_add_to_search(array('post', 'page'));
} else {
$post_types = array('post', 'page');
}
$post_ids = explode(',', str_replace(' ', '', $settings->featured_post_ids));
if (is_array($post_ids) && count($post_ids)) {
$new_posts = new WP_Query(array('post__in' => $post_ids, 'posts_per_page' => $args['max_search'], 'post_type' => $post_types, 'orderby' => 'post__in'));
}
break;
case 'post_type':
$new_posts = new WP_Query('post_type=' . $settings->featured_post_type . '&posts_per_page=' . $args['max_search']);
break;
case 'latest':
default:
break;
}
if (!$new_posts) {
$new_posts = new WP_Query('posts_per_page=' . $args['max_search']);
}
while ($new_posts->have_posts()) {
$new_posts->the_post();
$image = get_the_post_thumbnail($post->ID, 'foundation-featured-image');
if (preg_match('#src=\\"(.*)\\"#iU', $image, $matches)) {
$image = $matches[1];
$our_size = sprintf("%d", WPTOUCH_FEATURED_SIZE);
if (strpos($image, $our_size) === false) {
// It's not our image, so just use the WP medium size
$image = get_the_post_thumbnail($post->ID, 'large');
if (preg_match('#src=\\"(.*)\\"#iU', $image, $matches)) {
$image = $matches[1];
}
}
}
if ($image) {
$results = new stdClass();
$results->image = $matches[1];
$results->date = get_the_date();
$results->title = get_the_title();
$results->link = get_permalink();
$results->comments_number = wptouch_get_comment_count();
$foundation_featured_data[] = $results;
$foundation_featured_posts[] = $post->ID;
}
// Break out if we have enough images
if (count($foundation_featured_data) == $args['num']) {
break;
}
}
add_filter('parse_query', 'foundation_featured_modify_query');
}
示例6: wptouch_the_comment_count
function wptouch_the_comment_count()
{
echo wptouch_get_comment_count();
}
示例7: wptouch_the_permalink
<a href="<?php
wptouch_the_permalink();
?>
" class="loop-link tappable clearfix <?php
if (!bauhaus_should_show_thumbnail()) {
echo 'no-thumbs';
}
?>
">
<?php
if (wptouch_get_comment_count() > 0 && (comments_open() || wptouch_have_comments())) {
?>
<div class="comments">
<span><?php
wptouch_the_comment_count();
?>
</span>
</div>
<?php
}
?>
<?php
if (bauhaus_should_show_thumbnail() && wptouch_has_post_thumbnail()) {
?>
<img src="<?php
wptouch_the_post_thumbnail('thumbnail');
示例8: foundation_get_settings
<?php
$settings = foundation_get_settings();
?>
<div class='one-swipe-image' style='visibility: hidden;'>
<a href='<?php
echo the_permalink();
?>
' class='needsclick'>
<div class='comments-number'><span><?php
echo wptouch_get_comment_count();
?>
</span></div>
<img src='<?php
echo foundation_featured_get_image();
?>
' alt='<?php
the_title();
?>
' / >
<p class='featured-date'><?php
wptouch_the_time();
?>
</p>
<p class='featured-title'><span><?php
the_title();
?>
</span></p>
</a>
</div>
示例9: wptouch_comment_bubble_size
function wptouch_comment_bubble_size()
{
if (wptouch_get_comment_count() > 9 && wptouch_get_comment_count() < 99) {
echo 'double';
} else {
if (wptouch_get_comment_count() > 99) {
echo 'triple';
}
}
}
示例10: foundation_determine_images
function foundation_determine_images()
{
global $foundation_featured_posts;
global $foundation_featured_data;
global $post;
$settings = foundation_get_settings();
$foundation_featured_posts = array();
$foundation_featured_data = array();
$args = foundation_featured_get_args();
$new_posts = false;
switch ($settings->featured_type) {
case 'tag':
$new_posts = new WP_Query('tag=' . $settings->featured_tag . '&posts_per_page=' . $args['max_search']);
break;
case 'category':
$new_posts = new WP_Query('category_name=' . $settings->featured_category . '&posts_per_page=' . $args['max_search']);
break;
case 'posts':
$post_ids = explode(',', str_replace(' ', '', $settings->featured_post_ids));
if (is_array($post_ids) && count($post_ids)) {
$new_posts = new WP_Query(array('post__in' => $post_ids, 'posts_per_page' => $args['max_search'], 'post_type' => 'any'));
}
break;
case 'latest':
default:
break;
}
if (!$new_posts) {
$new_posts = new WP_Query('posts_per_page=' . $args['max_search']);
}
while ($new_posts->have_posts()) {
$new_posts->the_post();
$image = get_the_post_thumbnail($post->ID, 'foundation-featured-image');
$real_image = preg_match('#src=\\"(.*)\\"#iU', $image, $matches);
if ($real_image) {
$results = new stdClass();
$results->image = $matches[1];
$results->date = get_the_date();
$results->title = get_the_title();
$results->link = get_permalink();
$results->comments_number = wptouch_get_comment_count();
$foundation_featured_data[] = $results;
$foundation_featured_posts[] = $post->ID;
}
// Break out if we have enough images
if (count($foundation_featured_data) == $args['num']) {
break;
}
}
add_filter('parse_query', 'foundation_featured_modify_query');
}