| @@ -1,0 +1,26 @@ | ||
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Inline Ranks template | |
| 4 | + * | |
| 5 | + * This template can be overridden by copying it to yourtheme/gamipress/inline-ranks.php | |
| 6 | + * To override a specific rank type just copy it as yourtheme/gamipress/inline-ranks-{rank-type}.php | |
| 7 | + */ | |
| 8 | +global $gamipress_template_args; | |
| 9 | + | |
| 10 | +// Shorthand | |
| 11 | +$a = $gamipress_template_args; ?> | |
| 12 | + | |
| 13 | +<span class="gamipress-inline-ranks"> | |
| 14 | + | |
| 15 | + <?php foreach( $a['ranks'] as $index => $rank_id ) : | |
| 16 | + $a['id'] = $rank_id; ?> | |
| 17 | + | |
| 18 | + <?php // Display the rank inline ?> | |
| 19 | + <?php echo gamipress_inline_rank_shortcode( $a ); ?> | |
| 20 | + | |
| 21 | + <?php // Separator ?> | |
| 22 | + <?php echo ( $index !== ( count( $a['ranks'] ) -1 ) ? '<span class="gamipress-inline-ranks-separator">, </span>' : '' ); ?> | |
| 23 | + | |
| 24 | + <?php endforeach; ?> | |
| 25 | + | |
| 26 | +</span> | |