forked from tenman/raindrops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop.php
128 lines (107 loc) · 3.11 KB
/
loop.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
/**
* Template for display loops.
*
* @package Raindrops
* @since Raindrops 0.1
*/
if ( !defined( 'ABSPATH' ) ) {
exit;
}
?>
<?php
/**
* Display navigation to next/previous pages when applicable
*/
raindrops_prepend_loop();
raindrops_next_prev_links();
if ( have_posts() ) {
raindrops_loop_title();
$raindrops_loop_number = 1;
while ( have_posts() ) {
the_post();
$raindrops_loop_class = raindrops_loop_class( $raindrops_loop_number, get_the_ID() );
printf( "\n". str_repeat("\t", 8 ). '<li class="loop-%1$s%2$s">', esc_attr( trim( $raindrops_loop_class[ 0 ] ) ), esc_attr( rtrim( $raindrops_loop_class[ 1 ] ) )
);
$raindrops_loop_number++;
?>
<div id="post-<?php the_ID(); ?>" class="<?php echo raindrops_article_wrapper_class();?>">
<<?php raindrops_doctype_elements( 'div', 'article' ); ?> <?php raindrops_post_class(); ?>>
<?php
$format = get_post_format();
/**
* In category gallery
*
*
*
*
*/
if ( in_category( "gallery" ) || has_post_format( "gallery" ) ) {
get_template_part( 'part', 'gallery' );
/**
* In category blog
*
*
*
*
*/
} elseif ( in_category( "blog" ) || has_post_format( "status" ) ) {
get_template_part( 'part', 'blog' );
} elseif ( $format !== false ) {
get_template_part( 'part', $format );
/**
* Default loop
*
*
*
*
*/
} else {
?>
<?php raindrops_entry_title();?>
<?php
if( 'before' == raindrops_warehouse( 'raindrops_posted_on_position' ) ) {
?> <div class="posted-on" ><?php
raindrops_posted_on();
?>
</div>
<?php
}
if( 'before' == raindrops_warehouse( 'raindrops_posted_in_position' ) ) {
?><?php
raindrops_posted_in();
?><?php
}
?>
<div class="entry-content clearfix">
<?php raindrops_prepend_entry_content();?>
<?php raindrops_entry_content(); ?>
<br class="clear" />
<?php raindrops_append_entry_content(); ?>
</div>
<?php
if( 'after' == raindrops_warehouse( 'raindrops_posted_on_position' ) ) {
?><div class="posted-on-after"><?php
raindrops_posted_on();
?></div><?php
}
if( 'after' == raindrops_warehouse( 'raindrops_posted_in_position' ) ) {
?><div class="entry-meta"><?php
raindrops_posted_in();
?></div><?php
}
?>
<?php
}
?>
</<?php raindrops_doctype_elements( 'div', 'article' ); ?>>
</div>
</li>
<?php
} //end while
?>
</ul>
<?php raindrops_next_prev_links( "nav-below" );
}//if have_posts
raindrops_append_loop();
?>