1. Customize
  2. Customizations
  3. Make achievements and ranks of any type private

Make achievements and ranks of any type private

Since 1.4.6 we introduced new filters when the registered achievement types and rank types are registered as WordPress post types.

The filter for achievement types is gamipress_public_achievement_{achievement_type_slug} where {achievement_type_slug} should be replaced by the achievement type slug we want to turn private.

A example of this:

// Turn badges achievement type private
add_filter( 'gamipress_public_achievement_badges', '__return_false' );

// Turn quests achievement type private
add_filter( 'gamipress_public_achievement_badges', '__return_false' );

The filter for rank types is gamipress_public_rank_{rank_type_slug} where {rank_type_slug} should be replaced by the rank type slug we want to turn private.

A example of this:

// Turn levels rank type private
add_filter( 'gamipress_public_rank_levels', '__return_false' );

// Turn grades rank type private
add_filter( 'gamipress_public_rank_grades', '__return_false' );
Was this article helpful to you? Yes No

How can we help?