<div class="item-avatar"> <a href="<?php dpa_achievement_slug_permalink(); ?> "><?php dpa_achievement_picture(); ?> </a> <p style="width: <?php dpa_achievement_picture_width(); ?> px" title="<?php printf(__("This Achievement is worth %s points.", 'dpa'), bp_core_number_format(dpa_get_achievement_points())); ?> "><?php dpa_achievement_points(); ?> </p> </div> <div class="item"> <div class="item-title"><a href="<?php dpa_achievement_slug_permalink(); ?> "><?php dpa_achievement_name(); ?> </a></div> <?php if (dpa_is_achievement_unlocked()) { ?>
/** * Outputs the content for the custom columns on the achievement post type index screen * * @param string $column * @param int $post_id * @since Achievements (3.0) */ function dpa_achievement_custom_column($column, $post_id) { if ('karma' === $column) { dpa_achievement_points($post_id); } elseif ('achievement_type' === $column) { $existing_events = wp_get_post_terms($post_id, dpa_get_event_tax_id(), array('fields' => 'ids')); $existing_type = empty($existing_events) ? __('Award', 'achievements') : __('Event', 'achievements'); echo $existing_type; } elseif ('dpa_thumb' === $column) { the_post_thumbnail('dpa-thumb'); } }