/**
  * Displays the output
  *
  * @param array $args
  * @param array $instance
  * @since Achievements (3.1)
  */
 public function widget($args, $instance)
 {
     $title = !empty($instance['title']) ? $instance['title'] : __('Redeem achievement', 'achievements');
     $title = apply_filters('dpa_redeem_achievements_widget_title', $title, $instance, $this->id_base);
     // WordPress filters widget_title through esc_html.
     $title = apply_filters('widget_title', $title, $instance, $this->id_base);
     echo $args['before_widget'];
     echo $args['before_title'] . $title . $args['after_title'];
     dpa_get_template_part('form-redeem-code');
     echo $args['after_widget'];
 }
 /**
  * Displays the output
  *
  * @param array $args
  * @param array $instance
  * @since Achievements (3.4)
  */
 public function widget($args, $instance)
 {
     $settings = $this->parse_settings($instance);
     // Use this filter
     $settings['title'] = apply_filters('dpa_available_achievements_title', $settings['title'], $instance, $this->id_base);
     // WordPress filters widget_title through esc_html.
     $settings['title'] = apply_filters('widget_title', $settings['title'], $instance, $this->id_base);
     echo $args['before_widget'];
     echo $args['before_title'] . $settings['title'] . $args['after_title'];
     dpa_get_template_part('content-leaderboard', 'widget');
     echo $args['after_widget'];
 }
 /**
  * Display the "achievement unlocked" javascript template and return to ensure that post/page contents are displayed first.
  * 
  * Note: this is a JS template, not a HTML template. This template is wrapped inside <script> tags which will be used with
  * underscore.js' _.template() method. It compiles these JS templates into functions that can be evaluated for rendering.
  *
  * @return string Contents of output buffer
  * @since Achievements (3.5)
  */
 public function display_notifications_template()
 {
     $this->unset_globals();
     $this->start();
     dpa_get_template_part('feedback-notifications');
     return $this->end();
 }
		<?php 
    dpa_get_template_part('pagination-achievements');
    ?>

		<?php 
    dpa_get_template_part('loop-achievements');
    ?>

		<?php 
    dpa_get_template_part('pagination-achievements');
    ?>

	<?php 
} else {
    ?>

		<?php 
    dpa_get_template_part('feedback-no-achievements');
    ?>

	<?php 
}
?>

	<?php 
do_action('dpa_template_after_achievements_index');
?>

</div>
예제 #5
0
		</tr>
	</tfoot>

	<tbody>

		<?php 
do_action('dpa_template_before_leaderboard_loop');
?>

		<?php 
while (dpa_leaderboard_has_users()) {
    dpa_the_leaderboard_user();
    ?>

			<?php 
    dpa_get_template_part('loop-single-leaderboard');
    ?>

		<?php 
}
?>

		<?php 
do_action('dpa_template_after_leaderboard_loop');
?>

	</tbody>

</table>

<?php 
예제 #6
0
<ul class="dpa-archive-achievements-grid js-masonry" data-masonry-options='{ "columnWidth": "li", "gutter": 10, "itemSelector": "li", "isOriginLeft": <?php 
echo is_rtl() ? 'false' : 'true';
?>
 }'>

	<?php 
do_action('dpa_template_before_achievements_loop');
?>

	<?php 
while (dpa_achievements()) {
    dpa_the_achievement();
    ?>

		<?php 
    dpa_get_template_part('loop-single-achievement');
    ?>

	<?php 
}
?>

	<?php 
do_action('dpa_template_after_achievements_loop');
?>

</ul><!-- .dpa-archive-achievements-grid -->

<?php 
do_action('dpa_template_after_achievements_loop_block');
예제 #7
0
/**
 * Load a template part into an output buffer, and return it.
 *
 * @param string $slug Template part to load.
 * @param string $name Optional.
 * @param bool $echo Optional. Echo (default) or return the output buffer contents.
 * @return string|void If $echo is true, a value will not be returned.
 * @since Achievements (3.4)
 */
function dpa_buffer_template_part($slug, $name = '', $echo = true)
{
    ob_start();
    dpa_get_template_part($slug, $name);
    $output = ob_get_clean();
    if ($echo) {
        echo $output;
    } else {
        return $output;
    }
}
 * @subpackage ThemeCompatibility
 *
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
?>

<?php 
do_action('dpa_template_before_leaderboard');
?>

<?php 
if (dpa_has_leaderboard()) {
    ?>

	<?php 
    dpa_get_template_part('loop-leaderboard');
    ?>

	<?php 
    dpa_get_template_part('pagination-leaderboard');
    ?>

<?php 
}
?>

<?php 
do_action('dpa_template_after_leaderboard');
예제 #9
0
_e('Unlocked By', 'achievements');
?>
</h1>

<?php 
do_action('dpa_template_before_progress_loop');
?>

<ul class="dpa-single-progress-unlockedby">

	<?php 
while (dpa_progress()) {
    dpa_the_progress();
    ?>

		<?php 
    dpa_get_template_part('loop-single-progress');
    ?>

	<?php 
}
?>

</ul>

<?php 
do_action('dpa_template_after_progress_loop');
?>

<?php 
do_action('dpa_template_after_progress_loop_block');
		<?php 
dpa_achievement_content();
?>

		<?php 
do_action('dpa_template_after_achievement_content');
?>


		<?php 
if (dpa_has_progress()) {
    ?>

			<?php 
    dpa_get_template_part('loop-progresses');
    ?>

		<?php 
}
?>

	</div><!-- #dpa-achievement-<?php 
dpa_achievement_id();
?>
 -->

	<?php 
do_action('dpa_template_after_single_achievement');
?>