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