예제 #1
0
파일: page.php 프로젝트: TheRojam/raindrops
                                <?php 
        raindrops_append_entry_content();
        ?>
                            </div>
                            <div class="linkpage clearfix">
                                <?php 
        wp_link_pages('before=<p class="pagenate">&after=</p>&next_or_number=number&pagelink=<span>%</span>');
        ?>
                            </div>
                            <br class="clear" />
                            <div class="postmetadata">
                                <?php 
        the_category(', ');
        echo "&nbsp;";
        edit_post_link(esc_html__('Edit', 'raindrops') . raindrops_link_unique('Post', $post->ID), '<span class="edit-link">', '</span>');
        raindrops_delete_post_link(esc_html__('Trash', 'raindrops') . raindrops_link_unique('Post', $post->ID), '<span class="edit-link">', '</span>');
        ?>
                            </div>
                            <?php 
        comments_template('', true);
        ?>
                            </<?php 
        raindrops_doctype_elements('div', 'article');
        ?>
>
							</div><?php 
        raindrops_after_article();
        ?>
                        </div>
                        <?php 
    }
예제 #2
0
    function raindrops_list_of_posts()
    {
        global $raindrops_list_of_posts_per_page;
        global $raindrops_list_of_posts_length;
        global $raindrops_list_of_posts_more;
        global $raindrops_list_of_posts_use_toggle;
        $query = get_query_var('paged');
        if (!isset($raindrops_list_of_posts_per_page)) {
            $raindrops_list_of_posts_per_page = get_option('posts_per_page');
        }
        if (!isset($raindrops_list_of_posts_excerpt_length)) {
            $raindrops_list_of_posts_length = 200;
        }
        if (!isset($raindrops_list_of_posts_excerpt_more)) {
            $raindrops_list_of_posts_more = '[...]';
        }
        if (!isset($raindrops_list_of_posts_use_toggle)) {
            $raindrops_list_of_posts_use_toggle = true;
        }
        if (!isset($raindrops_list_of_posts_per_page)) {
            $raindrops_list_of_posts_per_page = get_option('posts_per_page');
        }
        if ($query == 0) {
            $start = 1;
        } else {
            $start = ($query - 1) * $raindrops_list_of_posts_per_page + 1;
        }
        $raindrops_args = array('post_status' => 'publish', 'post_per_page' => $raindrops_list_of_posts_per_page, 'paged' => $query);
        $raindrops_list_of_post_query = new WP_Query($raindrops_args);
        if ($raindrops_list_of_post_query->have_posts()) {
            ?>
				<ol start="<?php 
            echo $start;
            ?>
" class="list-of-post-list">
				<?php 
            while ($raindrops_list_of_post_query->have_posts()) {
                $raindrops_list_of_post_query->the_post();
                $raindrops_list_of_posts_empty_flag = false;
                ?>
					<li id="post-<?php 
                the_ID();
                ?>
" <?php 
                raindrops_post_class('list-of-post-items');
                ?>
>
						<?php 
                raindrops_entry_title();
                ?>
						<ul class="list-of-post-toggle">
							<?php 
                $raindrops_list_of_posts_excerpt = apply_filters('the_content', get_the_content());
                $raindrops_list_of_posts_excerpt = preg_replace('!\\[[^\\]]*\\]!', '', $raindrops_list_of_posts_excerpt);
                if (empty($raindrops_list_of_posts_excerpt)) {
                    $raindrops_list_of_posts_excerpt = esc_html__('Empty content', 'raindrops');
                    $raindrops_list_of_posts_empty_flag = true;
                }
                $raindrops_list_of_posts_contents = $raindrops_list_of_posts_excerpt;
                $raindrops_list_of_posts_excerpt = wp_html_excerpt($raindrops_list_of_posts_excerpt, $raindrops_list_of_posts_length, $raindrops_list_of_posts_more);
                if ($raindrops_list_of_posts_use_toggle == true) {
                    $raindrops_toggle_title_class = 'raindrops-toggle raindrops-toggle-title';
                    $raindrops_toggle_content_class = 'raindrops-toggle';
                } else {
                    $raindrops_toggle_title_class = 'no-toggle-title';
                    $raindrops_toggle_content_class = 'no-toggle-content';
                }
                if ($raindrops_list_of_posts_empty_flag == true) {
                    $raindrops_toggle_title_class = 'no-toggle-title';
                    $raindrops_toggle_content_class = 'no-toggle-content';
                }
                printf('<li class="%1$s">', $raindrops_toggle_title_class);
                echo $raindrops_list_of_posts_excerpt;
                if ($raindrops_list_of_posts_use_toggle == true and $raindrops_list_of_posts_empty_flag == false) {
                    printf('</li><li class="%1$s">', $raindrops_toggle_content_class);
                    echo $raindrops_list_of_posts_contents;
                }
                ?>
					</li>
				</ul>
				<div class="list-of-post-edit-link">
					<?php 
                raindrops_delete_post_link(__('Trash', 'raindrops'), '<span class="delete-link">', '</span>');
                edit_post_link(__('Edit', 'raindrops'), '<span class="edit-link">', '</span>');
                ?>
				</div>
			</li>
		<?php 
            }
            //end while
            wp_reset_postdata();
            ?>
		</ol>
		<?php 
        }
        //end have_posts
        ?>
		<div class="list-of-post-next-prev">
			<div class="left">
				<?php 
        next_posts_link(__('&laquo; Older Entries', 'raindrops'), $raindrops_list_of_post_query->max_num_pages);
        ?>
			</div>
			<div class="right">
				<?php 
        previous_posts_link(__('Newer Entries &raquo;', 'raindrops'), $raindrops_list_of_post_query->max_num_pages);
        ?>
			</div>
		</div>
		<?php 
    }
예제 #3
0
<div class="posted-on-after"><?php 
    raindrops_posted_on();
    ?>
</div><?php 
}
?>
        <div class="entry-utility entry-meta">
            <?php 
$category_id = get_cat_ID('Gallery');
$category_link = get_category_link($category_id);
printf('%4$s<a href="%1$s" title="%2$s">%3$s</a> | ', esc_url($category_link), esc_attr__('View posts in the Gallery category', 'raindrops'), ' ' . esc_html__('Gallery', 'raindrops'), esc_html__('Link to Category', 'raindrops'));
?>
            <span class="comments-link">
            <?php 
$raindrops_comments_are_closed = raindrops_warehouse_clone('raindrops_comments_are_closed');
if ('hide' == $raindrops_comments_are_closed) {
    $comment_off_message = '';
} else {
    $comment_off_message = 'Comments off';
}
comments_popup_link(esc_html__('Leave a comment', 'raindrops'), esc_html__('1 Comment', 'raindrops'), esc_html__('% Comments', 'raindrops'), '', $comment_off_message);
?>
            </span>
                <?php 
edit_post_link(esc_html__('Edit', 'raindrops') . raindrops_link_unique('Post', $post->ID), '<span class="edit-link">', '</span>');
raindrops_delete_post_link(esc_html__('Trash', 'raindrops'), '<span class="edit-link">', '</span>');
?>
        </div>

<?php 
do_action('raindrops_after_part_' . basename(__FILE__, '.php') . '_' . basename($template));