PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 8.0.5
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v8.0.5
8.0.5 8.0.4 8.0.3 8.0.1 8.0.2 8.0.0 7.9.9.7 7.9.9.6 7.9.9.5 7.9.9.4 7.9.9.3 7.9.9.2 7.9.9.1 7.9.9 7.9.8 7.9.7 7.9.6 7.9.5 7.9.4 7.9.3 7.9.2 7.9.1 7.9.0 7.8.9 7.8.8 All 47 releases
← All changes | templates/inline-achievement.php +42 -0 7.9.3 → 8.0.5 View file →
@@ -1,0 +1,42 @@
1 +<?php
2 +/**
3 + * Inline Achievement template
4 + *
5 + * This template can be overridden by copying it to yourtheme/gamipress/inline-achievement.php
6 + * To override a specific achievement type just copy it as yourtheme/gamipress/inline-achievement-{achievement-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-achievement';
18 +} else {
19 + $thumbnail_size = array( $thumbnail_size, $thumbnail_size );
20 +} ?>
21 +
22 +<span id="gamipress-inline-achievement-<?php the_ID(); ?>" class="gamipress-inline-achievement">
23 +
24 + <?php // Link to the achievement page
25 + if( $a['link'] === 'yes' ) : ?>
26 + <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="gamipress-inline-achievement-link">
27 + <?php endif; ?>
28 +
29 + <?php // Achievement Image
30 + if( $a['thumbnail'] === 'yes' ) : ?>
31 + <span class="gamipress-inline-achievement-thumbnail"><?php echo gamipress_get_achievement_post_thumbnail( get_the_ID(), $thumbnail_size ); ?></span>&nbsp;
32 + <?php endif; ?>
33 +
34 + <?php // Achievement Ttitle ?>
35 + <span class="gamipress-inline-achievement-title"><?php the_title(); ?></span>
36 +
37 + <?php // Link to the achievement page
38 + if( $a['link'] === 'yes' ) : ?>
39 + </a>
40 + <?php endif; ?>
41 +
42 +</span>