-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop.php
71 lines (52 loc) · 2.16 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
<?php
/**
* The loop that displays posts.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop.php or
* loop-template.php, where 'template' is the loop context
* requested by a template. For example, loop-index.php would
* be used if it exists and we ask for the loop with:
* <code>get_template_part( 'loop', 'index' );</code>
*
* @package Quality_Control
* @since Quality Control 0.1
*/
global $query_string, $quality_options, $authordata;
print_r( $authordata );
query_posts( $query_string . '&orderby=modified&post_type=ticket' ); if( have_posts() ) : ?>
<ol class="ticket-list">
<?php while ( have_posts() ) : the_post(); $i++; ?>
<li <?php post_class( 'ticket ' . ( $i % 2 ? '' : 'alt ' ) . quality_ticket_status( $post->ID, 'slug' ) ); ?>>
<p class="ticket-author">
<?php _e( 'created by', 'quality' ); ?> <?php the_author_posts_link(); ?>
</p>
<a href="<?php bloginfo( 'url' ); ?>/status/<?php echo quality_ticket_status( $post->ID, 'slug' ); ?>/" class="ticket-status <?php echo quality_ticket_status( $post->ID, 'slug' ); ?>"><?php echo quality_ticket_status( $post->ID, 'name' ); ?></a>
<h2 class="ticket-title">
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'quality' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<ul class="ticket-meta">
<?php get_template_part( 'ticket-meta' ); ?>
</ul>
</li>
<?php endwhile; ?>
</ol>
<?php if( quality_show_pagination() ) : ?>
<div class="tabber-navigation bottom">
<ul>
<li><?php next_posts_link( __( 'Older Tickets', 'quality' ) ); ?></li>
<li class="alignright"><?php previous_posts_link( __( 'Newer Tickets', 'quality' ) ); ?></li>
</ul>
</div><!-- #nav-above -->
<?php endif; ?>
<?php else : ?>
<ol class="ticket-list">
<li class="ticket no-results">
<?php _e( 'Sorry, we couldn't find any results.', 'quality' ); ?>
</li>
</ol>
<?php endif; ?>