Example #1
0
function wptouch_fdn_comments_pagination()
{
    if (get_option('comments_per_page') < wptouch_get_comment_count()) {
        return true;
    } else {
        return false;
    }
}
Example #2
0
			<?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()) {
        ?>
<!-- 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 
Example #4
0
		
		<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();
    ?>
Example #5
0
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');
}
Example #6
0
function wptouch_the_comment_count()
{
    echo wptouch_get_comment_count();
}
Example #7
0


			
<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');
<?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>
Example #9
0
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';
        }
    }
}
Example #10
0
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');
}