PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 8.0.1
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v8.0.1
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 7.8.7 7.8.6 All 45 releases
gamipress / includes / widgets / inline-achievement-widget.php

inline-achievement-widget.php in GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI 8.0.1, at includes/widgets/inline-achievement-widget.php

49 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Inline Achievement Widget
4 *
5 * @package GamiPress\Widgets\Widget\Inline_Achievement
6 * @author GamiPress <[email protected]>, Ruben Garcia <[email protected]>
7 * @since 2.3.1
8 */
9 // Exit if accessed directly
10 if( !defined( 'ABSPATH' ) ) exit;
11
12 class GamiPress_Inline_Achievement_Widget extends GamiPress_Widget {
13
14 /**
15 * Shortcode for this widget.
16 *
17 * @var string
18 */
19 protected $shortcode = 'gamipress_inline_achievement';
20
21 public function __construct() {
22
23 parent::__construct(
24 $this->shortcode . '_widget',
25 __( 'GamiPress: Inline Achievement', 'gamipress' ),
26 __( 'Display a desired achievement inline.', 'gamipress' )
27 );
28
29 }
30
31 public function get_fields() {
32
33 // Need to change field title to show_title to avoid problems with widget title field
34 $fields = GamiPress()->shortcodes[$this->shortcode]->fields;
35
36 return $fields;
37
38 }
39
40 public function get_widget( $args, $instance ) {
41
42 // Build shortcode attributes from widget instance
43 $atts = gamipress_build_shortcode_atts( $this->shortcode, $instance );
44
45 echo gamipress_do_shortcode( $this->shortcode, $atts );
46
47 }
48
49 }