| 1 |
<?php |
| 2 |
/** |
| 3 |
* Inline Rank template |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/gamipress/inline-rank.php |
| 6 |
* To override a specific rank type just copy it as yourtheme/gamipress/inline-rank-{rank-type}.php |
| 7 |
*/ |
| 8 |
global $gamipress_template_args; |
| 9 |
|
| 10 |
// Shorthand |
| 11 |
$a = $gamipress_template_args; |
| 12 |
|
| 13 |
// Setup thumbnail size |
| 14 |
$thumbnail_size = absint( $a['thumbnail_size'] ); |
| 15 |
|
| 16 |
if( $thumbnail_size === 0 ) { |
| 17 |
$thumbnail_size = 'gamipress-rank'; |
| 18 |
} else { |
| 19 |
$thumbnail_size = array( $thumbnail_size, $thumbnail_size ); |
| 20 |
} ?> |
| 21 |
|
| 22 |
<span id="gamipress-inline-rank-<?php the_ID(); ?>" class="gamipress-inline-rank"> |
| 23 |
|
| 24 |
<?php // Link to the rank page |
| 25 |
if( $a['link'] === 'yes' ) : ?> |
| 26 |
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="gamipress-inline-rank-link"> |
| 27 |
<?php endif; ?> |
| 28 |
|
| 29 |
<?php // Achievement Image |
| 30 |
if( $a['thumbnail'] === 'yes' ) : ?> |
| 31 |
<span class="gamipress-inline-rank-thumbnail"><?php echo gamipress_get_rank_post_thumbnail( get_the_ID(), $thumbnail_size ); ?></span> |
| 32 |
<?php endif; ?> |
| 33 |
|
| 34 |
<?php // Achievement Ttitle ?> |
| 35 |
<span class="gamipress-inline-rank-title"><?php the_title(); ?></span> |
| 36 |
|
| 37 |
<?php // Link to the rank page |
| 38 |
if( $a['link'] === 'yes' ) : ?> |
| 39 |
</a> |
| 40 |
<?php endif; ?> |
| 41 |
|
| 42 |
</span> |
| 43 |
|